I recently updated to the newest version of Xcode (7.3.1) and with the use of Firebase in project I receive this error:
ld: warning: directory not found for option '-
F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/Developer/Library/Frameworks'
ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
cannot be used together
However, I am still able to build and run the project on the simulator. I've tried deleting unnecessary libraries inside the framework paths, but it still gives me this error. Does it have to do with the Firebase frameworks I am using?
Set Build Setting-> Bitcode = NO;(See Below image)
Related
I running my code old code in the latest XCode 13.2 iOS 15 version. While running my application I got the following error,
duplicate symbol '__toSelectedDate' in:
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/BarGraph.o
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/AdherenceOut.o
duplicate symbol '_y_MarkerLblRange' in:
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/AppDelegate.o
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/LoginViewController.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have already cleaned my project & removed derived data but not worked. There is no double import or declaration or added in compile sources in xcode build setting.
My code is perfectly runnable on Xcode 10.1 version for iOS 12 version. But apple does not upgrade the build version to upload the build in-app store why I'm stuck to making a compatible code version with the latest iOS.
I resolved this issue using a change in XCode build settings,
GCC_NO_COMMON_BLOCKS = YES to NO
I have a Unity project which I have successfully built for Android without issue. When trying to build for iOS I am encountering an issue once the project is in Xcode.
Unity compiles without any errors and creates an Xcode project.
Upon opening the Xcode project I have NO simulators available. I can get these simulators by selecting ios in the Supported Platforms section, at which point simulators become available - originally Supported Platforms is set to iphoneos. This seems extremely odd behaviour to me, and suggests something larger going wrong.
After getting a simulator to select I get the following error when trying to compile/run/build:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The full error is available on Pastebin (too large to post directly on here):
https://pastebin.com/3fYR8fE3
I'm really at a loss on what I can do. I have tried a number of things, including:
Building from Unity as Debug and Release
Building from Unity with 'Symlink Unity Libraries' on and off
Building from Unity with .Net 3.5 and .Net 4.* flavours
Manually adding the libiconv.2.dylib file in the linked frameworks tab as the .tbd equivalent
Setting the target minimum version of iOS to 9.0 (negates the need for libiconv.2.dylib entirely)
I am using latest versions of everything:
Unity 2018.2.17f1
Xcode 10.1
It seems like you have the library il2cpp built for another architecture, have you tried to change your target's "Build Settings > Build Active Architectures Only" to "No"?
However I made some researches and it seems that Unity for iPhone doesn't deploy on simulator. It only works on device or in the Unity editor. Check this link out
I updated to XCode 7 today. As suggested in the Cordova Facebook Plugin I cloned the git repo and am installing the plugin from there. Before the update to XCode 7 I had no problems building. Now I am getting the below error.
Error:
ld: 'App/Plugins/phonegap-facebook-plugin/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.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 armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any thoughts?
I tried removing and re-adding the ios platform with no luck.
Also this builds fine to the emulator.
You have to disable bitcode (next cordova ios release will come with bitcode disabled)
You can do that on the xcode project, open the .xcodeproj on yourProject/platforms/ios/, and on the project build settings search for ENABLE_BITCODE and set it to NO
Or you can go to /platforms/ios/cordova and add this line on the build.xcconfig
ENABLE_BITCODE = NO
I have created a custom Objective-C framework. I would like to import it into any given iOS project and use its provided functionality on both the iOS Simulator and an actual device. To import the framework, I link it using the Build Phases > Link Binary With Libraries setting in the app's target. I'm then able to import it into one of my classes with this statement:
#import <CustomFramework/CustomFramework.h>
I can instantiate my framework's classes just fine, but when I try to run my project on a device, I get the following error message:
dyld: Library not loaded: #rpath/CustomFramework.framework/CustomFramework
Referenced from: /var/mobile/Applications/A61E882D-481A-4C0B-B4FD-69F5D24968BF/TestApp.app/TestApp
Reason: image not found
And if I try to run it on the simulator, I get a different error message:
ld: warning: ignoring file /Users/user/Desktop/CustomFramework.framework/CustomFramework, missing required architecture i386 in file /Users/user/Desktop/CustomFramework.framework/CustomFramework (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CustomFramework", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This occurs when I instantiate a class from the framework. If I import the framework but don't actually use it, my app builds successfully. It just errors whenever I instantiate a class from the framework for some reason.
To get the app to build on a device, I followed this SO answer. Instead of linking the framework, I added a new Copy Files phase in the target's Build Phases setting, set the Destination to Framework, and added my framework.
That works great; however, I'd like to test my app on the iOS Simulator as well. When I try to run my app on the simulator, I still get the "missing required architecture i386" error. I've tried the solutions proposed at just about every related SO topic I could find, and nothing has helped me resolve this issue.
Please note that I am trying to use my custom framework in a new Xcode project, so none of the app/build settings have been changed from their defaults.
How can I fix this error so that I can run my app on both the iOS Simulator and a device with my framework included in the project? Any insight would be greatly appreciated!
The issue was that the framework was not compiled for the iOS Simulator's architecture, which is i386. Xcode only compiles a framework for the target architecture, so if I built the framework for the iOS Simulator, it wouldn't work on a device, and if I built the framework for a device, it wouldn't work on the iOS Simulator.
I created my framework from scratch with help from this tutorial: http://www.raywenderlich.com/65964/create-a-framework-for-ios
The multi-architecture build script is what allowed my framework to run on both the iOS Simulator and a device.
I encountered this same problem with Xcode 7.1 when trying to build for the simulator.
Someone else said it worked for them under Xcode 8.2.1, so I tried building/running there and it worked. I didn't have to change targets or anything in my project.
So try upgrading your Xcode if you can, you will presumably get additional bug fixes as well.
I'm trying to build an iOS app using Google Cast SDK 2.5.0 and am able to build on an iPhone 5 device, but when I try to build on an iPhone 6 device, I get the following build error:
ld: warning: ignoring file ./GoogleCast.framework/GoogleCast, missing required architecture arm64 in file ./GoogleCast.framework/GoogleCast (3 slices)
I noticed a post about a similar issue here:
Google Cast SDK 2.3.0 for iOS doesn't support 64-bit
And so I tried this:
ranlib GoogleCast.framework/Versions/A/GoogleCast
But I'm still missing arm 64. Has anyone had a similar issue?
As charmingToad mentioned in the comments, I had two versions of the Cast SDK being linked in my application. Removing the older version fixed the linking errors.
If you are using Cocoapods, all you need is a pod update to update your version of the Cast SDK.
If after upgrade Xcode is complaining about linker issues, adding -all_load as a compiler flag worked for me.