Macbook M1 : App won't build on simulator but works fine on device
See original GitHub issueProblem
App won’t build on the simulator but works fine on the device
After adding the below setting for a run on the simulator will cause the issue:
Xcode -> Target Project -> Build Setting -> Excluded Architectures > "arm64"
Xcode -> Pod Target -> Build Setting -> Excluded Architectures > "arm64"
ionic info
Ionic:
Ionic CLI : 6.13.1 (/Users/bhuminbhandari/.nvm/versions/node/v10.17.0/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0, ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 15 other plugins)
Utility:
cordova-res : 0.15.3
native-run : 1.3.0
System:
Android SDK Tools : 26.1.1 (/Users/bhuminbhandari/Library/Android/sdk)
ios-deploy : 1.11.4
NodeJS : v10.17.0 (/Users/bhuminbhandari/.nvm/versions/node/v10.17.0/bin/node)
npm : 6.11.3
OS : macOS Big Sur
Xcode v12.5 (12E262) Xcode Error:
Undefined symbol: _CDVPageDidLoadNotification
Undefined symbol: _CDVPluginResetNotification
Undefined symbol: _OBJC_CLASS_$_CDVWebViewProcessPoolFactory
Undefined symbol: _CDVPluginHandleOpenURLNotification
Undefined symbol: _OBJC_METACLASS_$_CDVViewController
Undefined symbol: _OBJC_CLASS_$_CDVPlugin
Undefined symbol: _OBJC_METACLASS_$_CDVPlugin
Undefined symbol: _OBJC_CLASS_$_CDVViewController
Undefined symbol: _OBJC_METACLASS_$_CDVCommandDelegateImpl
Undefined symbol: _OBJC_CLASS_$_CDVPluginResult
Undefined symbol: _OBJC_METACLASS_$_CDVAppDelegate
Undefined symbol: _OBJC_CLASS_$_CDVCommandDelegateImpl
Undefined symbol: _OBJC_CLASS_$_CDVCommandQueue
Undefined symbol: _OBJC_METACLASS_$_CDVCommandQueue
Undefined symbol: _OBJC_CLASS_$_CDVInvokedUrlCommand
Undefined symbol: _OBJC_CLASS_$_CDVAppDelegate
Xcode Build Setting
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Can't build to simulator on Apple Silicon
My project which has Firebase dependencies runs fine on a physical device. To make it run in the simulator, I have to run...
Read more >Macbook M1 : App won't build on simulator but works ... - GitHub
I try to build my app on a MacBook Pro with Silicon M1 chip. After several headhaches on installing homebrew and cocoapods with...
Read more >Xcode error 'building for iOS Simulator, but linking in dylib built ...
The app compiles and runs fine in device when compiled from Apple Silicon Mac. It is just that app refuse to be compiled...
Read more >iOS Weird limitation for iOS development on an M1 Mac
The app fails to link to some dependencies with the error "building for iOS Simulator, but linking in object file built for iOS"....
Read more >How do I run the iOS simulator on my M1-based Mac?
2. Make certain your simulator can run under Rosetta · Quit Xcode if it is running. · Use Finder to locate Xcode.app in...
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 FreeTop 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
Top GitHub Comments
Exact same issue on M1 mac. Cordova iOS 6.2.0… Solution.
Running xcode with Rosetta is a workaround. However I did find a solution.
I had already set my xcode targets to Excluded Architecture for “Any iOS Simulator SDK” = arm64
But turns out you also have to add for CordovaLib sub project. Once I added there, the error is gone and simulator works fine from xcode or ionic cordova emulate …
I found a workaround, close xcode, and then open it with Rosetta.