Undefined Symbol when building in Xcode - xcode

I have recently got this problem when building for IOS. First time I got it I was able to restore an old version from Plastic backup and then restore each version until recent and the problem was gone. Now that does not work.
I have been googling a lot but do not understand how to solve this problem and would appreciate some help.
I also have not found a description what U3CPrivateImplementationDetailsU3E ... is.
The errors is:
Undefined symbol: _U3CPrivateImplementationDetailsU3E_tBAB6DC40B1709E21296656960228A17F1BE57FD7____499E4F5C84E20C7347E10100E0EC90C1945EA21C7C80809E4F7F474179B39DF6_12_FieldInfo_var
and
Undefined symbol: _U3CPrivateImplementationDetailsU3E_tBAB6DC40B1709E21296656960228A17F1BE57FD7____9DA6B2C4638D1DC7611B7F458BBFE7FD49FE1B36B67239B00B8A051F4E49558F_22_FieldInfo_var
Here is the Xcode log screenshot with the error part also in text below:
Undefined symbols for architecture arm64:
"_U3CPrivateImplementationDetailsU3E_tBAB6DC40B1709E21296656960228A17F1BE57FD7____499E4F5C84E20C7347E10100E0EC90C1945EA21C7C80809E4F7F474179B39DF6_12_FieldInfo_var", referenced from:
_Parser__cctor_m56CB9BAD206C2D94D0AC23E6E618F2AD736051E9 in libGameAssembly.a(hfu1rd9b20qx.o)
"_U3CPrivateImplementationDetailsU3E_tBAB6DC40B1709E21296656960228A17F1BE57FD7____9DA6B2C4638D1DC7611B7F458BBFE7FD49FE1B36B67239B00B8A051F4E49558F_22_FieldInfo_var", referenced from:
_XsdDateTime__cctor_m4F12859B35713836F38CE50985C1492A7EC4D441 in libGameAssembly.a(hfu1rd9b20qx.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbol: _U3CPrivateImplementationDetailsU3E_tBAB6DC40B1709E21296656960228A17F1BE57FD7____499E4F5C84E20C7347E10100E0EC90C1945EA21C7C80809E4F7F474179B39DF6_12_FieldInfo_var
Undefined symbol: _U3CPrivateImplementationDetailsU3E_tBAB6DC40B1709E21296656960228A17F1BE57FD7____9DA6B2C4638D1DC7611B7F458BBFE7FD49FE1B36B67239B00B8A051F4E49558F_22_FieldInfo_var
Build target Unity-iPhone of project Unity-iPhone with configuration ReleaseForRunning
/Users/xxxx/Dropbox/Unity3D/_CONTENT/MyApp/ExecutableIOS/Unity-iPhone.xcodeproj: warning: Building with bitcode is deprecated. Please update your project and/or target settings to disable bitcode. (in target 'Unity-iPhone' from project 'Unity-iPhone')
/Users/xxxx/Dropbox/Unity3D/_CONTENT/MyApp/ExecutableIOS/Unity-iPhone.xcodeproj: Building with bitcode is deprecated. Please update your project and/or target settings to disable bitcode.
UPDATE
I deleted Unity executable folder and it seems to solve the problem. However, anyone knows what the problem is?

Related

Xcode build failure due to Undefined symbol: __swift_FORCE_LOAD_$_swiftFileProvider

Building failed with Xcode 13beta for React Native 0.64.2 project. It is on macOS Big Sur. The detail of error is:
Undefined symbols for architecture x86_64:
"__swift_FORCE_LOAD_$_swiftFileProvider", referenced from:
__swift_FORCE_LOAD_$_swiftFileProvider_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftFileProvider_$_YogaKit)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What configuration change is needed to eliminate the error?
Create an empty swift file (####.swift) from Xcode in the main project which located Appdelegate.h file. This worked for my React Native project after Xcode version 13 update.
Try creating a new Swift empty file (it's not necessary to create a Bridging Header).
Adding libswiftWebKit.tbd into Link Binary With Libraries build phase in XCode helped to solve the problem:
enter image description here

Failed to add Firebase Database.framework without Cocoapods

I'm trying to add firebase's Database.framework without Cocoapods, but have compilation error
Undefined symbols for architecture arm64:
"_kFIRDefaultAppName", referenced from:
+[FIRDatabase databaseForApp:] in FirebaseDatabase(FIRDatabase.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error
Does anyone know which framework I should add too? Thanks
So from this question Use of unresolved identifier 'FIRDatabase' when using Firebase , I can see that FirebaseDatabase depends on FirebaseAnalytics. After add all FirebaseAnalytics framework into the project, everthing works as expected. Hope this helps others too

_SecTrustEvaluate linking error with Google Cardboard Unity3d SDK

I am trying to run the demo project that comes with the Unity3d package for Google cardboard, but I keep getting this error when I build in xCode.
Undefined symbols for architecture arm64:
"_SecTrustEvaluate", referenced from:
l155 in libvrunity.a(GTMSessionFetcher.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am running Unity 5.2.0f3 and Xcode 6.4. The only things I have in my project are the CardboardSDK and the demo project both downloaded from here: https://developers.google.com/cardboard/unity
Has anyone run into this problem before or know how to fix it?!
You need to add the Security.framework in order for it to build.

Unity project. Undefined symbols for architecture armv7

I make a build for iPhone for the first time and got a problem.
I already checked a lot of posts and didnt find answer.
When i make a build on device a get:
Undefined symbols for architecture armv7:
"RegisterAllStrippedInternalCalls()", referenced from:
RegisterAllInternalCalls() in libiPhone-lib.a(MonoICallRegistration.o)
"RegisterAllClasses()", referenced from:
InitializeEngineNoGraphics() in libiPhone-lib.a(SaveAndLoadHelper.o)
"RegisterMonoModules()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
On simulator ok.
libiPhone-lib.a added to link libraries.
Can somebody tell what it is? Please
Your unity version is not compatible, just download the latest version of unity which I believe is 4.3.1 and try recompiling. Here is the link if you need it. http://unity3d.com/unity/download/download-mac
The new version is compatible with armv7.
ok if anyone else is experiencing the same problem here's a way out:
those 3 methods mentioned are declared in the RegisterMonoModules.cpp in the Libraries folder, usually. so take that cpp file and add it to your target's Build Phases > Compile Sources
then if you have additional SDK's integrated that are not added to the 'Compile Sources' the new build will throw some other errors. just make sure to add the wrapper .mm files from the sdk's to your Compile Sources. Usually one .mm file per sdk. (e.g. for unity facebook sdk it's FbUnityInterface.mm file)
hope this helps

getting linker error even after linking the core data.framework to my project target file

I have linked the target file of my project to the coredata.framework in the Build Phases.
But still I am getting 3 linker errors like below:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CoreDataTableViewController", referenced from:
_OBJC_CLASS_$_RolesTableViewController in RolesTableViewController.o
"_OBJC_METACLASS_$_CoreDataTableViewController", referenced from:
_OBJC_METACLASS_$_RolesTableViewController in RolesTableViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am getting this problem in 2 coredata examples i was following from the tutorials. I tried to find if i missed a step. I think I am doing some small fundamental error...
Please help, what it could be...
I'm sure this is solved now, but I had the same problem. When you copy the files to your project you need to ensure you put a check next to your project under "Add to targets".

Resources