Unable to build app for iOS simulator
See original GitHub issueYour Environment
- Plugin version: 4.0.3
- Platform: iOS
- OS version: 14.5
- Device manufacturer / model: Simulator (Macbook Pro - both Intel and M1 CPUs)
- React Native version (
react-native -v
): 0.63.4 - Plugin config
Expected Behavior
App builds for iOS regardless if running on a simulator or a physical device
Actual Behavior
App builds only when building for a physical device
Steps to Reproduce
yarn install
cd ios && pod install
- Open Xcode
- Select a simulator (see spec above)
- Run
Context
Just trying to test my app on an ios simulator
Debug logs
ld: warning: ignoring file ../node_modules/react-native-background-fetch/ios/RNBackgroundFetch/TSBackgroundFetch.xcframework/ios-arm64_armv7/TSBackgroundFetch.framework/TSBackgroundFetch, missing required architecture x86_64 in file ../node_modules/react-native-background-fetch/ios/RNBackgroundFetch/TSBackgroundFetch.xcframework/ios-arm64_armv7/TSBackgroundFetch.framework/TSBackgroundFetch (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_TSBackgroundFetch", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in libRNBackgroundFetch.a(RNBackgroundFetch.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As mentioned above, there are no problems when performing exactly the same steps but selecting a physical device as the target to run the app on. Archiving a production build obviously also works.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20 (14 by maintainers)
Top Results From Across the Web
Can't build to simulator on Apple … | Apple Developer Forums
Using Xcode 12.2, the specific error is "building for iOS Simulator, but linking in object file built for iOS, file '.
Read more >Not able to build and run flutter app in IOS simulator
Not able to build and run any flutter app on iOS simulator using the command flutter run, it shows the error code as...
Read more >Unable to deploy to iOS simulator - Microsoft Q&A
First I am a complete newbie to Xamarin. I inherited a project, and have learned enough to get around on the Android side....
Read more >Steps to resolve failed to build iOS app error - YouTube
45,6s Failed to build iOS app Error output from Xcode build : ↳ ** BUILD FAILED ** Could not build the application for...
Read more >How to fix Could not build the application for the simulator ...
Clean the build cache. This will takes a little more time to build/run later. ... If there are still errors you can try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s your problem. In the early days of RN (2016, 2017), manually adding Framework Search Paths used to be part of the Setup Steps.
It’s probably a good idea to re-generate a fresh RN app and migrate your JS code and dependencies into it.
Around 4 years ago 🤷♂️