aws-amplify / aws-sdk-ios

AWS SDK for iOS. For more information, see our web site:
https://aws-amplify.github.io/docs
Other
1.68k stars 880 forks source link

[AWS Mobile SDK] AWSAPIGateway.framework and AWSCore.framework makes build fail on XCode 12.3 #3346

Closed gielletm closed 3 years ago

gielletm commented 3 years ago

Describe the bug Hi all, it seems that with the update to XCode 12.3, those frameworks which seems to build for iOS and iOS simulator now fails due the more strict enforcement by XCode. Building with XCode 12.2 seems to be fine, do you know if there's a plan to update them to avoid this issue? More details on this thread: https://developer.apple.com/forums/thread/669411?answerId=652663022#652663022

To Reproduce Steps to reproduce the behavior: Try to build an iOS app with AWS Mobile SDK on XCode 12.3

Observed Behavior Build fails on XCode 12.3 with Expected Behavior A clear and concise description of what you expected to happen.

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)? AWS Mobile SDK on iOS

image(1)

Environment(please complete the following information):

aiartsev commented 3 years ago

Has this been addressed? I'm having the same issue on XCode 12.4

palpatim commented 3 years ago

We need to add the build tags for those Xcode versions to our carthage-build.sh script, which is on #3389. In the meantime, you can work around this issue by installing from source: carthage update --no-use-binaries.

aiartsev commented 3 years ago

Thanks! I ended up opening this ticket to better describe my issue: https://github.com/aws-amplify/aws-sdk-ios/issues/3390

palpatim commented 3 years ago

I just realized that the carthage update --no-use-binaries step won't work as listed, since you would also have to exclude the arm64 architecture out of the simulator binary. You'll need to either use a similar script to our build-carthage.sh, or create your own script as explained in the Carthage issue.

We are in the process of releasing support for XCFrameworks for all of the service SDKs except AWSLex, which should solve this problem.

palpatim commented 3 years ago

@gielletm and @aiartsev

We have added the Xcode 12.2, 12.3, and 12.4 build tags to our carthage-build.sh script. You can feel free to use it as a basis for your own build scripts, bearing in mind that you will still need to strip the fat binaries if you use the SDK version 2.22.0 or below.

However, you don't really need it because as of 2.22.1, we distribute the binaries as XCFrameworks. :) Please see Carthage installation instructions or XCFramework installation instructions in the README for more info.

Do note that the AWSLex binary framework currently does not include support for arm64, as that SDK ships with binary frameworks that aren't amenable to that architecture. We're exploring options there, but for now, if you need arm64 support on AWSLex, you can either consume them from source, or use version 2.22.0 or earlier.

Please let us know if you have any further issues.