iOS build succeeds but fails to archive - ios

I have been working on my first ResearchKit app. Since the last time I created an archive, I have included a custom library for creating JSON strings. See my previous question.
After importing the .h file in that bridging-header file, I was able to use the package.
The project was running fine in the simulator. I even did a fresh clean and build for the "Generic iOS Device", and that completed with no errors. When I went to archive the project, during the linking stage, I get this error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ORKLocation", referenced from:
objc-class-ref in ORKESerialization.o "_OBJC_CLASS_$_ORKConfirmTextAnswerFormat", referenced from:
objc-class-ref in ORKESerialization.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
My Xcode version is 7.1.1. I have been searching around the web for possible answers. Apparently it might have something to do with these architecture version, but I can't seen to pinpoint the problem. Any help would be appreciated. Thanks!

This sounds like a bug. Best bet is to file it on Github.

Related

Undefined symbols for architecture armv7 - linker command failed

I am working on a game developed with unity, when i try to build it for iOS i got build failed due to undefined symbol.
"_OBJC_CLASS_$_LAContext", referenced from:
objc-class-ref in GoogleSignIn(MDMPasscodeCache_7bfe55864ba5a0ab8141ccdcdc4ab596.o)
"__SuperpowPlugin_ShowCustomerReview", referenced from:
_SuperpowIOS__SuperpowPlugin_ShowCustomerReview_m3277441088 in Bulk_Assembly-CSharp-firstpass_2.o
_SuperpowIOS_ShowCustomerReview_m2157481586 in Bulk_Assembly-CSharp-firstpass_2.o
(maybe you meant: _SuperpowIOS__SuperpowPlugin_ShowCustomerReview_m3277441088)
"__SuperpowPlugin_SetNotifyAppearance", referenced from:
_SuperpowIOS__SuperpowPlugin_SetNotifyAppearance_m2340220546 in Bulk_Assembly-CSharp-firstpass_2.o
(maybe you meant: _SuperpowIOS__SuperpowPlugin_SetNotifyAppearance_m2340220546)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My xcode version is 9.4 and unity 5.6.1f1.
I have been stuck with this since 3 days, have searched a lot and linked missing files and frameworks, solved many errors but this is the one i can't get rid of.
Any help would be great.
Thanks
Try this following steps -
Press "Cmd+Shift+K" to clean up, and quit Xcode.
Delete the cache Run "rm -rf ~/Library/Developer/Xcode/DerivedData" in terminal
Open the project and re-build it
After doing some research, I finally figured it out. I have Gooogle mobile ads plugin and google play game plugins both. I didn't installed cocoa pods and I was adding all frameworks in Xcode.
Installing cocoa pods did the job :)
sudo gem install cocoapods
After that i rebuild the xcode project from unity and add all frameworks and files mentioned in particular plugin installation and it worked.
So anyone having same issue, then please check for your pod installation.

Xcode FIRRemoteConfig Build error

In my xcode project, firebase realtime database and Analytics already implemented and working successfully. To implement, Firebase remote config feature, I added FirebaseRemoteConfig.framework and Protobuf.framework into my project. I am getting build error with following message. I have not write any code yet related with remote config.
Undefined symbols for architecture arm64:
"_kFIRAppIsDefaultAppKey", referenced from:
+[FIRRemoteConfig(FIRApp) receivedReadyToConfigureNotification:] in FirebaseRemoteConfig(FIRRemoteConfig+FIRApp_718fa6fc16d7fc9251249ec4e3a58ce2.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is all framework that I added into my project.
I have found solution of this issue. First you need to add all the updated frameworks of firebase. If you are using it. In my case I was having older version of firebase sdks. I just updated it & error went off. Happy Coding :)

Linker Command Fails When Changing From Debug to Release

I know this is a common error but it's my understanding that there can be many causes. After searching around and trying a few things I have been unable to find something that works for me.
This is all started when I wanted to test to make sure that NSLog() was being surprised correctly in my Release version so I changed the build configuration to Release from Debug under my Run schema. Now I'm getting a link error which points to a file in my unit tests.
I am able to run the unit tests fine so I don't know what the problem is there. Furthermore, why would a release version be trying to compile things in my test folder?
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FDSFTP", referenced from:
objc-class-ref in FDSFTPTests.o
(maybe you meant: _OBJC_CLASS_$_FDSFTPTests)
"_OBJC_CLASS_$_UICKeyChainStore", referenced from:
objc-class-ref in FDSFTPTests.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Turns out I had to add the file which couldn't be linked above, FDSFTP, to my Compiled Sources for my test Target.
I am still unsure as to why I had to do this for my Release build configuration and not Debug but this solved my problem. I'm guessing that there is a flag somewhere in the Build Settings that makes the difference but I was unable to figure out which one.

Venmo touch Braintree payment - compile error: Undefined symbols for architecture i386: "_OBJC_CLASS_$_VTClient"

I have successfully installed braintree ios sdk using cocoapod and It was compiled fine.
However, when I initVTClient in my appdelegate.m file. I was getting compiling error:
Undefined symbols for architecture i386:
"OBJCCLASS_$_VTClient", 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)
and I couldn't find any solutions online at all. any tips?
also submitted an issue here:
https://github.com/braintree/braintree_ios/issues/27
It's possible that you need to put "build settings"->architectures back to "standard architectures" since the old Venmo library (before their big v0 update) was built before the 64bit architecture. That's one solution I've seen.
[EDITED: 2/25/2014, 4:47pm EST]
I got my project to work. The problem for me was that my existing build settings were getting in the way of the build settings that cocoapods wanted to load onto the project. Those are the important ones such as the Venmo Framework, so there's good reason for the issue.
If you go to "build settings" -> "other linker flags", and add a new flag: "$(inherited)", it will work. I put that one at the top of the list so I'd try the same, not sure if order matters. What this does is keeps your old settings / flags, (I was using -ObjC), and imports the new ones from cocoapods. Good luck.
looks like i need to add VenmoTouch.framework into my target->Link Binary with Libraries.
then what's the point of using cocoapods
the official answer:
https://github.com/braintree/braintree_ios/issues/27
Make sure you verify which target CocoaPods is integrating with. There are a number of patterns for specifying this, such as target "name" do ... end and link_with.
See here for more details: http://guides.cocoapods.org/syntax/podfile.html#link_with

Moved Xcode project has missing files from other libraries

I moved the folder of a project in Xcode to another computer, and I"m having some issues. I'm using NMSSH framework, and the libz.dylib file is missing from the project, and I'm unable to locate it, since the Inspector button for it is grayed out. The file is not on my system either. Shouldn't it have been inside my project folder?
Also, I'm using MBProgressHUD, and I'm using it by dragging its Xcode project in, and setting the appropriate links. One of the libraries libMBProgressHUD.a is missing, and I can't locate that either.
Everything was working fine on my other computer, so I'm guessing there's a problem with search paths, etc? Any help would be much appreciated. The errors are as follows:
ld: warning: directory not found for option '-F/Users/ramesh/Documents/CodeDump_Temp/iOS/RasbPiController/../../.Trash'
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NMSSHSession", referenced from:
objc-class-ref in UserPi.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
you can download the missing file from the link below
https://www.dropbox.com/s/au2irnctslcpjih/libz.dylib
and paste it in your iOS Simulator folder. I hope it will work .

Resources