I have updated Xcode to 12.0 in order to test React Native project on iOS 14.0.
When I build the project I'm getting the following error. I tried Excluding arm64 architecture from Debug, tried removing bitcode from debug.
in
~/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o),
building for iOS Simulator, but linking in object file
(~/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o))
built for iOS, file
'~/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a'
for architecture arm64
Related
I have a project cordova with the MFP plugin & while compile or build on the simulator the Xcode project in Xcode ver 12.2 getting below error.
Building for iOS Simulator, but linking in dylib built for iOS, file '.../Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation' for architecture arm64
Go to the Build Settings of the project, locate the VALID_ARCHS property of User-Defined, and add x86_64. As shown below.
Getting linker error in Xcode 12 when I am trying to build my large iOS app (hybrid, swift+objc). The application is building fine for real device, but It gives linker error when I am trying to run in Simulator directly with Debug configuration.
I have tried all possible solutions in other post here, but unfortunately it didn't work. Although the error in other post is different. I have checked Build for active architectures only to YES for Debug configs and NO for Release configs.
Other post error,
building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
My error,
building for iOS Simulator, but linking in object file built for macOS, file for architecture x86_64
How can I resolve this issue? I need to run in both iOS real device and Simulator.
Wherever you got your library you should request the library that is compiled for iOS Simulator, not for macOS, although they have the same binary architectures that are returned via lipo -info <file>.
You can verify that your static (.a) or dynamic library (.dylib) is compiled for iOS Simulator using this command:
otool -l <path-to-library> | grep platform
The output means the following:
platform 7 - iOS Simulator
platform 6 - Mac Catalyst
platform 4 - watchOS
platform 2 - iOS
platform 1 - macOS
Here is the full definition of the enum for platform.
Try to add x86_64 in VALID_ARCHS in the User-defined section in Build Settings.
I've been struggling with an error building my app with ionic and cordova.
Everything started when I tried a "ionic cordova build ios --prod --release". It retrieved an error regarding FirebaseAnalytics for architecture arm64
"clang: error: linker command failed with exit code 1"
Reinstalling the pods and removing and adding the ios platform again I got this error even without the --release flag.
error: Building for iOS Simulator, but the embedded framework 'WebRTC.framework' was built for iOS. (in target 'Qvadis' from project 'Qvadis')
and I'm stuck here and I don't know if something changed with the latest XCode version (12.0) or the latest iOS version (14) or I have a dependencies problem.
Before that, it compiled just fine.
Thank you in advance,
Borja.
I found a solution:
In Build Settings, selecting your app as Target, you have to type "arm64" in "Excluded architectures".
However, this doesn't allow you to archive and publish it so you have to remove the "arm64" excluded architecture to perform those actions.
I don't know if this is a good approach, but this is the one that works for me.
I have Unity3D project and I built it for iOS. If I run it using XCode's simulator it works fine. But if I want to compile it for "iOS Device" or for a physical device connected to my Mac, I get lots of errors and as a result I can't create an Archive.
For a testing purpose, I even created an empty Unity3D project, built it for iOS and still get the same errors, although this project does absolutely nothing.
The errors are the following:
ld: library not found for -liPhone-lib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And these are the settings I use:
Architectures: armv7, armv7s, arm64 (also tried removing arm64 without any positive result)
Base SDK: iOS 7.1
Build active: no
Supported platform: iOS
Valid arch: armv7, armv7s, arm64
I use XCode 5.1.1 and Unity 4.5.1 (previously even tried 4.3.2)
How can I build the project and create the Archive?
I've run into the same issue some time ago and it was fixed by replacing quotes under library search path:
replace
"$(SRCROOT)/Libraries"
with
$(SRCROOT)/Libraries
more: http://answers.unity3d.com/questions/538363/error-when-i-updated-to-xcode-5-to-get-import-to-i.html
I have a framework that uses a dylib file that is only compiled for armv7, armv7s and arm64. When I build it in Xcode, it compiles fine in both Debug and Release configurations. But when I try to get it to compile into the main app using Carthage, Carthage tries to build it twice - once using SDKROOT = iphoneos10.3 and again using SDKROOT = iphonesimulator10.3. This is even when I use the --platform ios flag. When it compiles for iphonesimulator10.3 it crashes, obviously.
Is there a way I can stop Carthage from building for the simulator?