This question already has answers here:
New warnings in iOS 9: "all bitcode will be dropped"
(7 answers)
Closed 7 years ago.
I am trying to convert my code into Swift 2.0 but I am running into an issue.
Can someone please tell me what this means and how to fix it?
ld: warning: directory not found for option
'-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks'
ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
cannot be used together clang: error: linker command failed with exit
code 1 (use -v to see invocation)
Thanks
Switch to project's Build Setting panel, search for BitCode, and set the value of Enable Bitcode to NO
Bitcode is the default but optional so you can disable it.
From Bitcode (iOS, watchOS):
Note: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.
Related
Just upgraded react native from 0.61.4 to 0.63.0-rc using rn diff
Now when I run the app with Xcode I get this unusual error
ld: '{projet-path}/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(bio_lib.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've checked and bitcode is enabled in the Xcode settings, but what's intriguing is that there's no mention of OpenSSL in the podfile
AirWatch SDK allows you to include MDM features in your iOS app. I followed the instructions from VMWare's site here.
Unfortunately, after adding the NuGet package to my iOS project, the project fails to compile and throws more than 300 compilation errors of the type
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: AWWebsiteFilteringPayload.
The symbol '_OBJC_CLASS_$_AWWebsiteFilteringPayload' could not be found
in any of the libraries or frameworks linked with your application.
The reason for the compilation errors is the Platform (iPhone Simulator vs Device) for which the project is built and the Supported Architectures.
Changing the build option to target a real device gets past the compilation errors.
If you scroll through the build output you will see something like this
ld : warning : ignoring file /Path/To/Your/Project/MyApp.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-12.1/mtouch-cache/AWSDK.a, missing required architecture x86_64 in file /Path/To/Your/Project/MyApp.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone10.4-12.1/mtouch-cache/AWSDK.a (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AWWebsiteFilteringPayload", referenced from:
-u command line option
This Stackoverflow answer helped to discover the architectures targeted in the .a file
In a terminal window enter
lipo -info /Path/To/AWSDK.a
which returns
Architectures in the fat file: AWSDK.a are: armv7 arm64
Now right click on the iOS project and bring up the Options window. Navigate to the "iOS Build" section. The Platform dropdown says "iPhone Simulator". Check the Supported architectures dropdown. You will see i386, x86_64, i386+x86_64 which are not supported in the AWSDK.a file.
Change platform to iPhone and you will see the Armxx options.
I am working on building a Swift library and am hosting it on GitHub.
All was going fine until I added BluetoothKit to the project. I then got an Apple Mach-O Linker Error:
ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk/Developer/Library/Frameworks'
ld: /Users/calebklevetertest/Library/Developer/Xcode/DerivedData/Napalm-dblvhbjdwovurocsvzrzaxzkjjyw/Build/Products/Debug-iphonesimulator/Napalm.framework/Napalm compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From reading the error it appears the issue somehow stems from the fact I am using Swift 3, but I can't figure out how to fix it.
I did convert BluetoothKit to Swift 3 when I added it.
There is one class that uses BluetoothKit and it is called NPFBluetooth.
A couple things to note are 1) Even though the class is public, the compiler gives an error of 'unresolved identifier', 2) The class does not show in the auto-complete and 3) All the other classes work fine.
I ran into the error migrating to swift3. As it turns out Xcode keeps copies of built frameworks and moving to swift3 is apparently not a cue to rebuild those (even after finding out it was built using swift2.... no let's throw a vague error instead...)
The solution is to delete the content of your 'derived data' folder.
Works for frameworks installed with Carthage and cocoapods.....
Go to your build settings and switch the target's settings to ENABLE_BITCODE = YES for now.
It's working for me ;)
I am migrating code I wrote fore Xcode4.2 into Xcode 7.2.
I get the following error:
ld: -pie can only be used when targeting iOS 4.2 or later
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Not sure what this is about... ?
Your deployment target is set to 4.0 but -pie can only be used when targeting iOS 4.2 or later as clearly stated by the above error message. Try setting your deployment target to 6.0. This is the lowest deployment target supported by Xcode 7.2.
I am new to Xcode, New to Kinvey.. Fun start..
I followed Kinvey's installation guide for iOS and everything goes pretty well until I try to compile.The Presence of the Kinvey Framework in my project blocks it from compiling with the following error:
ld: file is universal (3 slices) but does not contain a(n) i386 slice: /Users/*path_to_my_project*/KinveyKit.framework/KinveyKit for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looking around at other solutions, nothing seems to fit.. Note that the issue is on i386, not armv7s..
I tried on Xcode 4.6.1 and Xcode 4.6.3 with brand new projects with nothing in them..
Thank you very much for any help.
We ran into this issue awhile back in our project. I believe if you go into the build settings for your main app target and set the property ONLY_ACTIVE_ARCH (Build Active Architecture Only) to NO, that should fix your issue.
After contacting Kinvey, it was found that it was a Bug in the 1.19.1 SDK. It has been fixed in the 1.19.2. Kinvey has been pretty reactive on this.
This question can be closed now.