(and until a good answer is added from another user) I really wish not to buy old Intel Mac again just to make things work in simulator.Īnswering my own question in a hope to help others who are having similar problems. If there is no solution available, I want to understand why this is happening in the first place. It is just that app refuse to be compiled and run in iOS simulator from Apple Silicon Mac, and I cannot seem to figure out why. The app compiles and runs fine in device when compiled from Apple Silicon Mac. The app compiles and runs perfectly in both device & simulator when compiled from Intel Mac. I want to know what kind of changes I can make to resolve this issue. My weak conclusion is that GoogleWebRTC cannot be compiled to run in iOS simulator with arm64 for some reason (unlike what its doc says), and lottie-ios cannot be compiled to run in iOS simulator with x86_64. I don't have much insights into what dictates whether or not library can run in x86_64 or arm64 so I couldn't dig to investigate this issue. However, library is not supported running in x86_64 for some reason, and is throwing an error. I guess what is happening is that because I excluded arm64 in build setting for iOS simulator, Xcode is attempting to run my app in x86_64. The second library that I am using is lottie-ios and I am pulling this in with a swift package manager. (not really 100% sure if I solved the 1st error / I might have introduced 2nd error in addition to 1st by adapting two changes)Ĭould not find module 'Lottie' for target 'x86_64-apple-ios-simulator' found: arm64, arm64-apple-ios-simulator When I make both changes and tried building, I now get the following 2nd error during build. When I adapt the second change only, nothing really changes and the same error is thrown. I don't exactly understand if above are necessary even when I am compiling my app on M1 Mac which is running under arm64 architecture, because the solution seems to be applicable only for for Intel Mac which does not support arm64 simulator, as for Intel Mac, simulators might have been running in x86_64, not with arm64, so solution #1 is not applicable in my case. The second option is to mark Build Active Architecture Only for Release build.The first one is by adding arm64 to Excluded Architectures.I searched online and it appears there appears to be 2 workarounds for this issue. Our currently provided API’s are Objective C only. Library that contains the armv7, arm64 and x86_64 slices. This pod contains the WebRTC iOS SDK in binary form. As I have said before, it compiles fine in real device which I believe is running on arm64. The Cocoapods library that I am using is GoogleWebRTC, and according to its doc, arm64 should be supported so I am baffled why above error is getting thrown. The first error that I encountered without making any changes (but moved from Intel Mac to M1 Mac) is like below.īuilding for iOS Simulator, but linking in dylib built for iOS, file '/Users/andy/workspace/app/Pods/GoogleWebRTC/Frameworks/frameworks/amework/WebRTC' for architecture arm64 Not to mention Xcode preview feature isn't working either which is annoying. Without simulator support, debugging turn around time gets gets really long so I am trying to solve this issue. The same app also compiles and runs fine from newer Apple Silicon Mac with M1 processor with physical iPhone devices, but it refuses to be compiled for iOS simulator. I have an app which compiles and runs fine in older Macs with Intel processors in physical devices & iOS simulators.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |