Aws-sdk-ios: Carthage can't build SDK with Xcode 10

Created on 17 Sep 2018  路  6Comments  路  Source: aws-amplify/aws-sdk-ios

To help us solve your problem better, please answer the following list of questions.

  • What service are you using?
    AWSiOSSDKv2

  • In what version of SDK are you facing the problem?
    2.6.29

  • Is the issue limited to Simulators / Actual Devices?
    No

  • Can your problem be resolved if you bump to a higher version of SDK?
    No

  • Is this problem related to specific iOS version?
    No

  • How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks?
    Carthage

  • Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.

I use AWS as Carthage dependency. So I run:
carthage update --platform ios --no-use-binaries

When Carthage tries to build AWSMobileClient it fails:

* Building scheme "AWSMobileClient" in AWSAuthSDK.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios/AWSAuthSDK/AWSAuthSDK.xcodeproj -scheme AWSMobileClient -configuration Release -derivedDataPath /Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/0w/b847xs9s09343fl0tg5j524h0000gn/T/aws-sdk-ios SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/0w/b847xs9s09343fl0tg5j524h0000gn/T/carthage-xcodebuild.nKUIWG.log

In build logs:

* BUILD SUCCEEDED *

/usr/bin/xcrun xcodebuild -project /Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios/AWSAuthSDK/AWSAuthSDK.xcodeproj -scheme AWSMobileClient -configuration Release -derivedDataPath /Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/0w/b847xs9s09343fl0tg5j524h0000gn/T/aws-sdk-ios SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios)User defaults from command line:
IDEArchivePathOverride = /var/folders/0w/b847xs9s09343fl0tg5j524h0000gn/T/aws-sdk-ios
IDEDerivedDataPathOverride = /Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29

Build settings from command line:
CARTHAGE = YES
CLANG_ENABLE_CODE_COVERAGE = NO
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
ONLY_ACTIVE_ARCH = NO
SDKROOT = iphoneos12.0
SKIP_INSTALL = YES
STRIP_INSTALLED_PRODUCT = NO

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios/AWSAuthSDK/Sources/AWSMobileClient/Info.plist'. (in target 'AWSMobileClient')

Build system information
warning: duplicate output file '/Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29/Build/Intermediates.noindex/ArchiveIntermediates/AWSMobileClient/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AWSMobileClient.framework/Info.plist' on task: ProcessInfoPlistFile /Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29/Build/Intermediates.noindex/ArchiveIntermediates/AWSMobileClient/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AWSMobileClient.framework/Info.plist /Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios/AWSAuthSDK/Sources/AWSMobileClient/Info.plist (in target 'AWSMobileClient')

Build system information
error: Multiple commands produce '/Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29/Build/Intermediates.noindex/ArchiveIntermediates/AWSMobileClient/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AWSMobileClient.framework/Info.plist':
1) Target 'AWSMobileClient' (project 'AWSAuthSDK') has copy command from '/Users/mak/Projects/myProject/Carthage/Checkouts/aws-sdk-ios/AWSAuthSDK/Sources/AWSMobileClient/Info.plist' to '/Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29/Build/Intermediates.noindex/ArchiveIntermediates/AWSMobileClient/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AWSMobileClient.framework/Info.plist'
2) Target 'AWSMobileClient' (project 'AWSAuthSDK') has process command with output '/Users/mak/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A254a/aws-sdk-ios/2.6.29/Build/Intermediates.noindex/ArchiveIntermediates/AWSMobileClient/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AWSMobileClient.framework/Info.plist'

* ARCHIVE FAILED *

It looks like it's related to Xcode's new build system. Some solutions are here:
https://stackoverflow.com/questions/50718018/xcode-10-error-multiple-commands-produce

It would be nice if you could solve it.

bug

Most helpful comment

Hello @makoni

Thanks for reporting this, we will update the thread once we have a fix for this.

Thanks,
Rohan

All 6 comments

Hello @makoni

Thanks for reporting this, we will update the thread once we have a fix for this.

Thanks,
Rohan

@makoni Thank you for pointing this out. I faced the same issue as well on Xcode 10 Beta. Xcode 10 beta uses the new build system where it complains about the Info.plist file in copy bundle resources phase of a target. I changed it to use the legacy build system and the error went away. But we are discussing the potential solutions and we will update the thread once we find it. Thanks!

Anything on this issue? because I cannot build from Xcode 10, even when switching to Legacy? I would really like to see my app on the new phones and this issue is stopping me. Thanks.

Hi, We have fixed this issue in 2.6.30. Please upgrade to the latest and let us know if it fixes.

Works with 2.6.30, thank you!

Works for me too! Thanks for the fast response, guys!

Was this page helpful?
0 / 5 - 0 ratings