I'm trying to build a project that has ResearchKit in it, and whenever I build and run on a physical device (or the simulator, for that matter) it works fine. But when I attempt to Archive it, I get the following error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ORKVisualConsentStep", referenced from:
objc-class-ref in InformedConsent.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I followed the installation guidelines on the ResearchKit GitHub, and made sure to check that researchKit.framework was under the Frameworks, Libraries and Embedded Content section as well as the "Link Binary With Libraries" section of the build phases tab (as was described in this link as well as a couple others: Xcode build failure "Undefined symbols for architecture x86_64") but still nothing.
Is there something I'm doing wrong, or another setting I might be able to change?
UPDATE:
I noticed that the element that was throwing the error - ORKVisualConsentStep - was deprecated a few iOS versions ago. So by taking that out, I was able to get the project to archive.
I didn't want to put this as the accepted answer, though, because I wanted to see if there was a better solution than just deleting code.
Thanks for your help!
Related
i am new in ios developement.i have a project while run on ios 5.1 simulater it is working fine and not getting any error but in that same project while run on ios 6.0, ios 6.1 simulator i am getting following errors.Can anyone suggest me how can i rectify this problem?
Errors:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GDataOAuthAuthentication", referenced from:
objc-class-ref in GDataOAuthViewControllerTouch.o
"_OBJC_CLASS_$_GDataOAuthSignIn", referenced from:
objc-class-ref in GDataOAuthViewControllerTouch.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Try this,
The main problem was,I thought you are using old GData sdk. You just
change the compiler to LLVM GCC 4.2 from Apple LLVM 4.2 and it
compiles app perfectly.
i have attached screenshot for your reference
Project->Target->Build Settings->Build options
You're linking against external libraries that haven't been compiled for your current architecture/SDK version. I see you're using VDOAds library, which was probably precompiled against the 5.1 SDK. You'll need to get a version that was precompiled for the latest iOS SDK.
TargetSettings -> Build Phases -> Compile Sources and make sure that these missing libraries are included there.
So you have two problems, for the warnings, the libraries were added to your Build Phases but they were deleted from the project and they are still there.
For the error, the library that you are using is not added to Build Phases -> Link Binary With Libraries.
So in order to fix this warnings/errors, go to your project Targets -> Build Phases -> Link Binary With Libraries, and search for libGoogleAnalytics (I think this is the one for GA) and remove it (if not needed).
Also add the VDOAds library there in order to fix the error.
I also add a screenshot with the targets, it will be easier to find it if you don't know about it.
I am new to iphone develop and phonegap also. Now i want to create simple iphone app using phonegap. Now i am using phonegap2.0 in lion mac. MY Xcode version is 4.3. Now my issue is after install the phonegap2.0 in xcode when i run the Xcode in my Simulator 5.0. I got this below error.
"Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_ViewController in ViewController.o
objc-class-ref in AppDelegate.o
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Please help me to solve this issue. Thanks in Advance.
And i have attach the Screen Shot of error page for your reference.
Check if your project links libCordova.a (in my case Xcode forgot about the reference, when moving CordovaLib.xcodeproj to another location).
select your project in the Project Navigator
go to the Summary tab
drag CordovaLib.xcodeproj > Products > libCordova.a to Linked Frameworks and Libraries
Clean & build.
Please check your ViewController.m file and goto to
1. Build phase in xcode
2. Select Compile Sources
3. Press + button to add .m/.mm file
I think it will run successfully now
Remove armv7s from your build settings, for both your project and the referenced subproject Cordova. Set your target to 4.3.
I had a similar issue. Somehow my the NSManagedObject Sub-classes of my Core Data entities were in the Compile Sources table twice. The compiler would choke when it hit the first of these duplicates.
I just went into the Compile Sources table and deleted the second occurrence of each .m listing.
Some simple things sometimes just don't work ;) like this one! Am trying to integrate Google+ SDK into an iPhone App by following the instructions given here:
https://developers.google.com/+/mobile/ios/#initialize_the_google_client
I did every single step. But when I build the App, it complains of the following errors:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GTMOAuth2Keychain", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GooglePlusSignIn.o)
"_OBJC_CLASS_$_GTMOAuth2SignIn", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GooglePlusSignIn.o)
"_OBJC_CLASS_$_GTMOAuth2ViewControllerTouch", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GooglePlusSignIn.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The classes it's reporting of, are part of the Open Source Google Toolbox project (which is also present in the downloaded SDK, but the instructions ask the user to include only GooglePlusShare.h and libGooglePlusUniversal.a in the project in XCode). I tried including the header files from the directory 'google-plus-ios-sdk-1.0.0\OpenSource', but that's of no use. I tried including the entire (not just .h files) from the directory 'google-plus-ios-sdk-1.0.0\OpenSource' & it leads to lot of ARC related errors (more than 500 of them!); so I quit this option.
Any help on how to resolve these linker errors please?
My environment: XCode 4.3.3, iOS 5.0, Mac OS X Lion 10.7.4, testing with iPhone 4
Just select GData.xcodeproj .
select GDataTouchStaticLib from target .
search "othet c flag"
remove "-DGTM_INCLUDE_OAUTH2=1" if exist
add "-DGDATA_INCLUDE_OAUTH2=1"
click on done. clean project and then build.
Missing keychain and auth-stuff usually means you never imported the Security.framework in your project.
Check another time if you really did include the libraries
Security.framework
SystemConfiguration.framework
in your Xcode project as described in step 1 of the instructions you referred to.
To verify this:
Click on your project name in xcode and select your target.
Under the tab "Build Phases" these two frameworks should be listed under the secition called "Link Binary With Libraries".
If not listed, press the + button to add them.
I have the following failed code when i run my application on iPhone 5.1 simulator. My app runs smoothly before i add in the Facebook Connect into my application.
Undefined symbols for architecture i386:
"_FBCreateNonRetainingArray", referenced from:
-[FBSession initWithKey:secret:getSessionProxy:] in FBSession.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
May I know what can i do to get rid of this?
Thanks
2 things that usually get rid of that error.
1) go to: target > build phases > link binary with library -- make sure you've added the correct framework
2) go to: target > build phases > compile sources -- add any implementation files that are in your program but do not appear in that list.
Those two steps usually fix that kind of error.
I just installed Xcode 4 and am getting this error in my project:
ld: warning: directory not found for option '-LDebug-iphonesimulator4.3'
ld: warning: ignoring file /Developer/Projects/BuildOutput/Release-iphoneos/libMyFramework.a, missing required architecture i386 in file
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyRandomNumber", referenced from:
objc-class-ref in myAppDelegate.o
objc-class-ref in RootViewController.o
I have the project set to iOS 4.3 Simulator. I did check that scheme and it is set to debug build configuration. Why does it reference a Release version of the above library?
Also, what is the i386 error about?
I'm seeing this type of error as well. The odd part is that I've been building, linking, and running successfully under the Simulator. I just now tried to fire my app up in my iPhone, and am totally bombing out during the link process.
I've run my app on my iPhone before. I've been building it under Xcode 3.2.x for the last year, and have never seen this problem.
A couple of other SO threads indicate that it could be due to copying a framework into the project folder, and that one should just "move the framework." Okay. Where, and how do I let Xcode know where it is? And if that's not the problem, then what is?
Xcode 4 has a ton of promise, but it is a sore pain in the ass sometimes....