I searched and searched and couldnt find the answer.
I added google analytics to my project.
I have two projects in the same workspace that use google analytics.
I linked them both. In the past this wasnt an issue.
But then I needed to add another library, so i ran "pod update"
and since then i've been getting this error.
Now, both locations are EXACTLY the same file.
How can I fix this error?
(as a sub note, no .m files were imported, and there are no duplicate library entries in the pbxproj file regarding this thing)
duplicate symbol _UselessFunctionThatExistsSolelySoThatIDontGetErrorsAboutEmptyLibsF474397331760491295374 in:
/Users/Lena/Dev/workspace/app/myapp/../Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(StaticLibraryEmptySourceFile.o)
/Users/Lena/Dev/workspace/app/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(StaticLibraryEmptySourceFile.o)
ld: 1 duplicate symbol for architecture x86_64
Related
I'm adapting an (apparently outdated) Cordova plugin for use in my app (PhoneRTC if you're curious).
As a Linux/CLI guy at heart I've been struggling with XCode for a day, and I managed to iron out most of the deprecated code using a lot of Google and some blind guessing. However, now I'm stuck with a final error during the linking phase:
"Undefined symbols for architechture arm64: "_utf8_nextCharSafeBody", referenced from: [snip]"
The plugin's original installation instructions mention linking the binary to the library libicucore.dylib, but this seems to have been removed in the latest XCode (there are references of the same name with .tbh extensions available but these aren't valid for that dialog - even though I can select them, but whatever).
Some more Googling offered suggestions for linking various *.frameworks instead, but to no avail - the error remains.
Does anyone have any idea what I need to link to to make this function available? Or if it's permanently removed I'd also like to know, although that would involve rebuilding the binaries which wouldn't be something I'm looking forward to...
Or if you don't know, would there be a way to grep through Apple's libraries somehow to see which one is supposed to be defining a missing symbol?
(Needless to say, IF I can get this working it's going to be forked from the original repo and donated back to the community :))
So, I'm not sure what I changed exactly, but suddenly I could add libicucore.tbh as a linked library. I probably changed the build target or something, but in any case the linking error disappeared (to be replaced by a signing error because XCode, but that I can solve).
I've been banging my head against the wall on this for hours. I've been playing around with CMUSphinx's pocketsphinx library, running on OSX 10.10/XCode 7.2,and want to get my .app bundle to work on computers besides my own. Most importantly, there are three dynamic libraries that have to be embedded in the .app bundle(libpocketsphinx.3.dylib, libsphinxad.3.dylib, and libsphinxbase.3.dylib), and then loaded using Runpath Search Paths settings in XCode.
I've read just about everything I can find on how to get this to work. I should note that the .app bundle compiles/runs as intended on my own machine. I've made sure that the libraries are copied into the .app bundle's /Contents/Frameworks folder. The libraries are not using references, but are copied into my source folder (as per a forum post on this exact issue on CMUSphinx's page). I've tried just about every combination of using install_name_tool for #rpath/libraryname.dylib, as well as #loader_path and #executable_path in both the executable (so changing it in XCode to #whatever_path/../Frameworks), as well as the three library files. I also have tried #loader_path/Frameworks per another post here, but no luck.
Whats weird is the error I'm getting seems like it is loading libsphinxad.3.dylib, as both libsphinxad.3.dylib and libsphinxad.3.dylib rely on libsphinxbase.3.dylib, but I get this error in the crash report:
Dyld Error Message:
Library not loaded: /usr/local/lib/libsphinxbase.3.dylib
Referenced from: /Volumes/SunGate/VoiceCommander.app/Contents/Frameworks/libsphinxad.3.dylib
Reason: image not found
Note, the /Volumes/SunGate/ is just a drive on another machine I'm testing this on.
I would really appreciate help with this! I will do my best to provide any other information that might help solve this!
I found this lib by using the "find" command on my system. Not surprisingly it was here
sphinxbase/src/libsphinxbase/.libs/libsphinxbase.3.dylib
I linked it to /usr/local/lib/
ln -s sphinxbase/src/libsphinxbase/.libs/libsphinxbase.3.dylib /usr/local/lib/libsphinxbase.3.dylib
And all set to go!
dyld: Library not loaded: #rpath/libswift_stdlib_core.dylib
dyld: Library not loaded: #rpath/libswiftCore.dylib. Issue persist
I know that theses question have been answered several times, but "dyld: Library not loaded: #rpath/libswiftContacts.dylib" I have not been able to find a proper solution to this error when I am coding a Swift
application for XCode 7.2:
Here I use Contact & ContactUI Frameworks:: #rpath/libswiftContacts.dylib
dyld: Library not loaded: #rpath/libswiftContacts.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/C0F2B5CB-628C-4643-9473-648D3099D8FB/HomeMadeFood_User.app/HomeMadeFood_User
Reason: image not found
I have tried all these actions:
Restarting Xcode, iPhone, computer
Cleaning & rebuilding
Revoking and creating new certificate/provision profile
Runpath Search Paths is '$(inherited) #executable_path/Frameworks'
Embedded Content Contains Swift Code is 'Yes'
Code Signing Identity is developer
deleting Xcode's Derived Data directory.
but I have always got the same error...
I tried like this: but i am getting an error like:
/Users/mac-jarc/Library/Developer/Xcode/DerivedData/HomeMadeFood_User-bmwdevsopruaqxfrbibhaspidobn/Build/Products/Debug- iphoneos/HomeMadeFood_User.app/Frameworks/Contacts.framework: bundle format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1
I had this same error for a couple of weeks:
dyld: Library not loaded: #rpath/libswiftContacts.dylib
Basically I was able to run and test my app on device. Then about 2 weeks ago, I wasn't able to run the tests on device anymore. Tests were running fine on simulator. I can't think what changed. The error I saw was the one above. I searched Google for ages trying to find a solution, and tried many fixes unsuccessfully. The fix that finally worked was to delete the Derived Data. Once I did this, I was once again able to run the tests on my device.
Fix that worked for me:
Go to Xcode > Preferences > Locations > Derived Data (click on little arrow to open up the folder in finder)
e.g. /Users/[username]/Library/Developer/Xcode/DerivedData
Delete the entire DerivedData folder
Clean/Build
Test on device - finally works again
In our case, it was clear that there was a bug in the way Xcode was resolving dependencies to our target.
Let's me start by saying, the solution was:
import PassKit
Now, before you raise that eyebrow, here is why this worked:
We relied on a Swift framework that imports PassKit
We distributed the prebuilt binary to team members
The team observed the crash, just as OP mentioned it
Adding that import in the app target made Xcode embed the required swift libraries
Note: Just linking PassKit in the GUI did absolutely nothing.
Cracked it.
Check if the framework you're trying to build or one of it's dependency framework uses any of the Swift standard libraries. If yes, create a NEW key in the build settings
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
This error is caused due to invalid certification of Apple.
Go to your keychain access. Under "Keychains" select "System" and under "Category" select "Certificates". Check whether the "Apple Worldwide Developer Relations Certification Authority" is valid or not. If not download that certificate from Apple site. It'll solve the problem.
I know this is old question, but this is what helped me
Speaking shortly:
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
I developing a game in Unity and I have used Admob, Facebook and GameCenter in it. It was working fine on iOS until I have added the OpenIAB for in-app purchase, though it works fine in Unity Editor.
I am getting this error in xcode:
duplicate symbol __Z14MakeStringCopyPKc in:
/Users/UmerAzeem/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBUnityUtility.o
/Users/UmerAzeem/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AppStoreDelegate.o
ld: 1 duplicate symbol for architecture armv7 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
See error screenshot here
I have tried almost all the solution that I could find over the internet, but still don't understand how can I remove this duplication error, I have tried looking for duplicate files too, but it also went in vain, someone help me out of this, would appreciate it.
Thanks.
Look up in your project for:
MakeStringCopy
And make sure it exists (if exists) only once. If it appears more then once, rename one (make sure to rename it where it being called as well) and try to build again.
I have recently face the same issue. I know Umer Azeem got the answer but to help someone else who may suffer from the same issue I was in.
According to my application flow I am using printer related third party class to print. To use that I have created object of that class in both of my files ImagePrintViewController and PrintResultViewController separately and passed required data to it.
In my scenario I am getting same error with variable name like _printerSetup in two of my files/Library/Developer/Xcode/DerivedData/../x86_64/ImagePrintViewController.o
and /Library/Developer/Xcode/DerivedData/../x86_64/PrintResultViewController.o.
I have search in both of my file for the above variable name. But I couldn't find that.
After searching long on this I got a idea to delete reference of my second file i.e. BRPrintResultViewController.h and BRPrintResultViewController.m after merging code in my first file.
With this I found my solution and my code runs fine after this.
I have an app with both the Parse and Facebook frameworks installed. Parse was installed by dragging the files to the "Frameworks" folder of the project and selecting "copy if needed", while the Facebook SDK was installed by dragging and not selecting the copy option. Both appear under the Linked Binaries list. The problem appears to be that Bolts is included in both SDKs. I tried just using the Facebook one, producing the following Link-O errors:
Undefined symbols for architecture x86_64:
"_BFTaskMultipleExceptionsException", referenced from:
___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke214 in Parse(PFObject.o)
___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke311 in Parse(PFObject.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I deleted the link to the Facebook one and tried dragging the Parse one, but the error persisted. I also got the warning that
ld: warning: ignoring file /Users/milesper/Documents/FacebookSDK/Bolts.framework/Bolts, missing required architecture x86_64 in file /Users/milesper/Documents/FacebookSDK/Bolts.framework/Bolts (2 slices)
even though I had deleted the file from the Facebook SDK.
How should I clean up the project and link to the Parse version of Bolts? Is there something else i should be doing?
Turns out the order in which you include/search the frameworks in your project matters.
Here is what I did to work with Parse 1.6.4 and FacebookSDK without CacoaPods
Use the latest version of Bolts. (1.1.4)
Your include paths should be ordered to find Bolt first, then FacebookSDK, then Parse
Well I found it. The problem was that old files (which were now deleted) were being referenced in the "Library Search Paths Flag". Thanks to this post for giving me the idea. All I had to do was delete the old paths and it now works again.
EDIT: It appears that for some situations the order of the search paths matters as well (see below).
That worked for me Temporary workaround for Parse 1.6.4 and Facebook SDK 3.23
Add to your AppDelegate.m or another class following constant after imports and before implementation section:
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
The explanation of the bug https://stackoverflow.com/a/29136507/1345244
One hack I found for working around missing symbols, was just redefining the missing symbol again in my code.
The BFTaskMultipleExceptionsException string is defined here like this:
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
So maybe just try putting that one line into your code?
From the history on github, it looks like this was just added to Bolts about 19 days ago. Version 1.1.4 of Bolts was released 14 days ago (1.1.3 was from October last year). So it probably is caused by the version mismatch of Bolts that you noticed.
Another option might be to get an older version of Parse from before Bolts 1.1.4 was released.
Presumably this will be fixed once a new Facebook SDK is available with Bolts 1.1.4.
same problem here.
I had both frameworks included with no problem, until I added SponsorPay SDK which needs to add the -ObjC in "Other Linker Flags" on target "Build Settings".
So, in my experience this issue only happens when the flag -ObjC is present.
I tried all the solutions exposed in here but nothing worked for me, I hope anyone can bring more light on how to solve this issue even with the -ObjC flag active.
EDIT:
There's a question related to this, I'll put the link here in case is helpful to someone: Contradicting frameworks on -ObjC
i had some issue, i just remove Parser.framework in
Linked Framework and Libraries and work well.