Hello, I have been using detox for a while. Things were nice, until I upgraded Xcode to 12, several days ago.
My build command:
ENVFILE=.env.staging xcodebuild -workspace ios/DoraReactNative.xcworkspace -scheme DoraReactNative -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES
In my app, I'm using Amazon Chime iOS SDK.
And got this error:
The following build commands failed:
Ld /Users/doko/Projects/ReactNative/DoraMobile/ios/build/Build/Intermediates.noindex/DoraReactNative.build/Release-iphonesimulator/DoraReactNative.build/Objects-normal/arm64/Binary/Dora normal arm64
(1 failure)
detox[4011] ERROR: [cli.js] Error: Command failed: ENVFILE=.env.staging xcodebuild -workspace ios/DoraReactNative.xcworkspace -scheme DoraReactNative -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES
This did not happen in Xcode 11, I also ask my co-worker (who is running Xcode 11 to confirm that).
What am I missing?
We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.
Feel free to post your Stack Overflow question here for more visibility. We'll take a look at it.
For issues with Expo apps, it is most likely not an issue with Detox itself, but with the Expo runtime or with incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.
For more information on bots in this repository, read this discussion.
@Doko-Demo-Doa did you ever find a solution? I'm using the same command as you and have the same issue.
Hi! In case you don't want to modify the xcode settings add -destination:
xcodebuild -workspace ... -destination 'platform=iOS Simulator,name=iPhone 11'
and replace "iPhone 11" for your device in detox configuration (.detoxrc.json or package.json)
I hope that helps.
Awesome, thanks @joncolque . It works!
@Doko-Demo-Doa Did you just add the -destination flag with the value as described by @joncolque ? I tried that, even cleared my entire build directory, and tried a few times. But to no avail :(
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/guus/Projects/ApotheekInJeBroekzak/node_modules/@notifee/react-native/ios/NotifeeCore.framework/NotifeeCore' for architecture arm64
Yes, I only have to append destination like so:
xcodebuild -workspace ios/DoraReactNative.xcworkspace -scheme DoraReactNative -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -destination 'platform=iOS Simulator,name=iPhone 8'
Maybe this can solve your issue?
@Doko-Demo-Doa thanks for your time and effort! unfortunately, after trying various things from the stackoverflow post, i see no difference :(
The search continue's!
Most helpful comment
Hi! In case you don't want to modify the xcode settings add
-destination:and replace "iPhone 11" for your device in detox configuration (.detoxrc.json or package.json)
I hope that helps.