Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage build with XCode 14 failed - No Destination #411

Open
davidmoore1 opened this issue Sep 14, 2022 · 6 comments · May be fixed by #431
Open

Carthage build with XCode 14 failed - No Destination #411

davidmoore1 opened this issue Sep 14, 2022 · 6 comments · May be fixed by #431
Labels
bug Something isn't working

Comments

@davidmoore1
Copy link

Expected Behavior

Typically this builds using scheme Amplitude-iOS

Current Behavior

XCRun failed before it got to that point processing the Amplitude scheme

Possible Solution

I was able to make it get through the Carthage build by marking the Amplitude scheme as not shared

Steps to Reproduce

  1. Set up in Cartfile - github "amplitude/Amplitude-iOS" ~> 8.0.1
    2.Do a carthage update which got the latest release 8.13.0
    3.Do a carthage build - carthage build --use-xcframeworks --platform ios --no-use-binaries

Environment

  • SDK Version: XCode 14
  • Device: IMac
  • OS Version: Monterey

Error received in terminal running carthage build:
DMooreMac:app-ios-TemplateApp david$ carthage build --use-xcframeworks --platform ios --no-use-binaries
*** xcodebuild output can be found in /var/folders/5p/dz0d7m8139vgnnhvk6xrmbth0000gp/T/carthage-xcodebuild.vaqrpS.log
*** Building scheme "AnalyticsConnector" in AnalyticsConnector.xcodeproj
A shell task (/usr/bin/xcrun xcodebuild -project /Users/david/Source/Github/app-builders/ios/app-ios-TemplateApp/Carthage/Checkouts/Amplitude-iOS/Amplitude.xcodeproj -scheme Amplitude -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions) failed with exit code 6:
2022-09-14 11:17:24.577 xcodebuild[50592:261263] [MT] DVTAssertions: ASSERTION FAILURE in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-21335/IDEFoundation/Execution/RunDestinations/IDERunDestinationCLI.m:566
Details: Unhandled/unexpected case where no run destinations were produced.
Object:
Method: +resolveRunDestinationsWithWorkspace:scheme:buildAction:schemeCommand:schemeTask:destinationSpecifications:architectures:timeout:runDestinationManager:deviceManager:fallbackPreferredSDK:fallbackPreferredArchitectures:skipUnsupportedDestinations:shouldSkipRunDestinationValidation:didDisambiguate:disambiguatedMatches:disambiguatedMatchesDescription:error:
Thread: <_NSMainThread: 0x600001e4c440>{number = 1, name = main}
Hints:

Backtrace:
0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 +[IDERunDestinationCLI resolveRunDestinationsWithWorkspace:scheme:buildAction:schemeCommand:schemeTask:destinationSpecifications:architectures:timeout:runDestinationManager:deviceManager:fallbackPreferredSDK:fallbackPreferredArchitectures:skipUnsupportedDestinations:shouldSkipRunDestinationValidation:didDisambiguate:disambiguatedMatches:disambiguatedMatchesDescription:error:] (in IDEFoundation)
4 -[Xcode3CommandLineBuildTool _resolveRunDestinationsForBuildAction:] (in Xcode3Core)
5 -[Xcode3CommandLineBuildTool _resolveInputOptionsWithTimingSection:] (in Xcode3Core)
6 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
7 XcodeBuildMain (in libxcodebuildLoader.dylib)
8 start (in dyld)

@davidmoore1 davidmoore1 added the bug Something isn't working label Sep 14, 2022
@craigreyenga
Copy link

Can confirm that I am also seeing this issue.

@hzh137940556
Copy link

hzh137940556 commented Sep 15, 2022

@djih I have same error. Can you fix it ? thanks

@antonyalkmim
Copy link

Does anyone have any idea why this error happens with Carthage?

Using amplitude through SPM/Cocoapods is working fine

@davidmoore1
Copy link
Author

davidmoore1 commented Sep 16, 2022

My temporary solution has been to change my build scripts to remove the Amplitude scheme from the checked out source using my Fastlane build scripts:
sh("cd .. && rm -rf Carthage")
sh("cd .. && carthage checkout --use-submodules")
sh("cd .. && rm ./Carthage/Checkouts/Amplitude-iOS/Amplitude.xcodeproj/xcshareddata/xcschemes/Amplitude.xcscheme")
sh("cd .. && carthage build --use-xcframeworks --platform ios --no-use-binaries")

@anuragajwani
Copy link

anuragajwani commented Oct 7, 2022

The target (Amplitude) that Carthage to tries to build does not exist

Screenshot 2022-10-07 at 17 59 38
Screenshot 2022-10-07 at 17 59 49

Update: deleting this scheme with the missing target, carthage build only for iOS succeeds:

carthage build --no-skip-current --platform iOS --use-xcframeworks

@emartinson
Copy link

Can we expect official fix for this? Quite annoying to have this over than 6 months.

@Aranoledur Aranoledur linked a pull request Mar 8, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants