Google places with objective c errors - objective-c

Hello I just used pods to implement google places with my application but when I try to run my app I get this error.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GMSPlacesClient", referenced from:
objc-class-ref in ViewController.o
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
this is my pod file:
source 'https://github.com/CocoaPods/Specs.git'
project '/Users/GeorgeYoung/Desktop/Travel/Travel.xcodeproj'
target 'Travel' do
pod 'GooglePlaces'
end
The error apears to be coming from the AppDelegate.m
[GMSPlacesClient provideAPIKey:#"AIzaSyBYRDTp7U-633XB81qsBeOiVGhokPrc6_M"];
Podfile.lock:
PODS:
- GoogleMaps/Base (2.4.0)
- GooglePlaces (2.4.0):
- GoogleMaps/Base (= 2.4.0)
DEPENDENCIES:
- GooglePlaces
SPEC CHECKSUMS:
GoogleMaps: 8436ab5d1c25e36915b2f7416d0c8e3fa2e76c61
GooglePlaces: aafe5990fa7951e98e078761bbdaaf236d7e0c65
PODFILE CHECKSUM: e564be8d79cfc6ae7b4a4a197ee6149eac7d65d2
COCOAPODS: 1.3.1

If source code for the library is available, CocoaPods is pretty good about making sure the correct architecture is built. In this case, the Google Places library is a pre-build library so there is a risk that it did not contain a slice with correct architecture. The file command can be used to check if a library contains a slice. The next possibility is that somehow the library was not included in the link. This can happen if you open the Xcode project instead of the Xcode workspace created by CocoaPods. Checking that the workspace is indeed being used and that Pod library is being linked can be used to eliminate this problem. Finally, if all else fails (and again CocoaPods usually seems to get this correct) make sure the 'Other Linker Flags' build setting contains the -ObjC setting. This is need to force the loading on some Objective-C symbols from static libraries.
So in summary
Check prebuilt libraries contain the needed slice
Make sure you're using the workspace not the project
Make sure the Pod library is included in the link
Make sure -ObjC is specified in
the 'Other Linker Flags'

You're either not linking against the library that contains GMSPlacesClient or you built the library with the wrong architecture.

Modify your pod file:
pod 'GooglePlaces'
pod 'GooglePlacePicker'
pod 'GoogleMaps'

Related

iOS manually exporting library causes issues

I made a library and I want to test it in a dummy project I made. Both projects are made in Objective-C. When I build my library I get a Successful Build message and three files under the Product directory:
FooIOS.bundle
libFooIOS.a
include
I place these three files at the root level of my dummy project and when I open my myDummyProject.xcworkspace file I see them in my project hierarchy. However, when I build my project I get the following error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FooSelectedPageViewController", referenced from:
objc-class-ref in libFooIOS.a(FooViewController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I did away with some of the obvious checks:
Made sure to reference my external library
I also made sure that both my library and project architectures are set as armv7 arm64
I don't know what else to do. I may be missing another configuration step or it may even be the way I declared something in my library that doesn't conform with my dummy project. Or a discrepancy between projects, perhaps? Any hints or leads would be a great help. Thanks.

Undefined symbols for architecture armv7s dealing with Appboy iOS integration

I am trying to integrate appboy into my Xcode 5.1.1 project. I have followed all the steps on their SDK integration page found here: http://documentation.appboy.com/SDK_Integration/iOS. I was able to successfully install the pods, but when I try to compile and run my project I get the following errors:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_Appboy", referenced from:
objc-class-ref in CAppDelegate.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The code causing this issue it the code to upgrade the app delegate found in CAppDelegate.m under the method application:didFinishLaunchingWithOptions:
[Appboy startWithApiKey:#"(I PUT MY API KEY HERE)"
inApplication:application
withLaunchOptions:launchOptions];
Make sure that your app target includes "$(inherited)" if it is overriding any of the settings of Pods.xcconfig. You can check this under Build Settings >> Your App Target >> Other Linker Flags.
If you need any additional support on this issue, feel free to contact support#appboy.com.

ObjC Lbrary Usage: Undefined symbols for architecture armv7

I have XCode library I wrote which I use inside Unity3D application.
The library works and now I need to make a change in the implementation, not the interface.
The problem is that in the XCode project created from Unity3D, when I use my library .a file I get this error (I've remove the specific class names).
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ABNUnityativeController", referenced from:
_OBJC_CLASS_$_ABUnityNativeController in libABSDK_Unity_NativeController_iOS.a(ABUnityNativeController.o)
"_OBJC_METACLASS_$_ABNativeController", referenced from:
_OBJC_METACLASS_$_ABUnityNativeController in libABSDK_Unity_NativeController_iOS.a(ABUnityNativeController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm pretty sure the problem is how I compile my library.
I find that my project settings were bad.
When I choose the main project (I also have sub XCode project in it) inside Build Phases -> Link Binary With Libraries I had to add my sub-project which was listed under Workspace directory.

"ld: library not found for -lPods" only when run in real device

I entered the mysterious phenomenon that I can build my app for simulator but I can't build for real device. The error is as below (which doesn't appear when build for simulator):
ld: library not found for -lPods-TechMoviePlus
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(I'm using Cocoapods and attach one of my app's targets, so that the name of library is a little different.)
Project > Target > General > Linked Frameworks and Libraries is as below:
Thank you for your kindness!
Assigning the target in Podfile has resolved the problem.
target :TechMoviePlus do
pod "AFNetworking", "~> 2.0"
pod "LBGIFImage"
end
Open your pbxproj file with an editor and check for references to Pods-Application. If you renamed your application after pod install, you may have some references to the old pods.
Remove all the references to Pods-Application, launch xcode, full clean, and build.
It worked for me.

AWS IOS SDK 1.7.0 -> Undefined symbols for architecture armv7s:

I'm trying to use the amazon AWS for iOS SDK but I keep getting several Apple Mach-O Linker errors in Xcode 5.0.1
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_S3CreateBucketRequest", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_S3Region", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_AmazonEndpoints", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_AmazonS3Client", referenced from:
objc-class-ref in CreationViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I went into the build phases and made sure the AWSES.framework is included in link binary with libraries. In the compile sources CreationViewController.m is also included.
Target Memberships also seem to be correct. What else can I do?
I had the same problem. My solution was to delete the AWSRuntime.framework and the AWSS3.framework from the project. I then went back to the Amazon site to re-download the aws-ios-sdk-1.6.1. Using the Build Phase -> Link Binary Libraries (+) button I added the fresh frameworks back to the Xcode project and it ran with no problems. I had moved the project from Dropbox to a loaner and back again via Dropbox after my hard drive died. My guess is that this corrupted the files or Amazon has something in the code that frowns on copping the it from one place to another rather than getting it straight from them.