GoogleMapsSDK : Undefined symbols for architecture x86_64 - ios

I am trying to install the Google maps SDK and I am running through this error when running:
Undefined symbols for architecture x86_64:
"_CBAdvertisementDataManufacturerDataKey", referenced from:
-[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
"_CBAdvertisementDataServiceDataKey", referenced from:
-[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[GMSx_PEBeaconScanner scanIfAppropriate] in GoogleMaps(PEBeaconScanner.o)
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in GoogleMaps(PEBeaconScanner.o)
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in GoogleMaps(PEBeacon.o)
objc-class-ref in GoogleMaps(PEBeaconScanner.o)
"_vImageBoxConvolve_Planar8", referenced from:
(anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.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 noticed the following changes when I upgraded an app that was using the older Google maps SDK that had been installed manually:
Need to link to CoreBluetooth.framework and Accelerate.framework in Build Phases -> Link Bundle with Libraries.
The -all_load flag under "Other Linker Flags" will cause "duplicate symbol" errors. (Use -ObjC instead.)
If you use the CocoaPods method of installation (per their current instructions), it should take of the required frameworks but it'll still get messed up by -all_load.

make sure following are included
GoogleMaps SDK framework and bundle
GoogleMaps (with .framework extension) is present at your root directory (where your .xcodeproj is)
GoogleMaps (with .bundle extension) is referenced in your xcode project
Following Frameworks
Accelerate.framework
AVFoundation.framework
CoreBluetooth.framework
CoreData.framework
CoreGraphics.framework
CoreLocation.framework
CoreText.framework
GLKit.framework
ImageIO.framework
libc++.dylib
libicucore.dylib
libz.dylib
OpenGLES.framework
QuartzCore.framework
Security.framework
SystemConfiguration.framework
Build Settings
Architecture value in your project settings includes armv7.
Other Linker Flags has -ObjC , if not present add it

**_vImageBoxConvolve_Planar8, referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)**
This required "Accelerate.framework". So, please add it.
Steps:
1)Build Phases -> Link Bundle with Libraries.
2)Click "+",
3)Select "Accelerate.framework". Finish.
===================================
Others errors required "CoreBluetooth.framework. So, please add it also in similar way.

It looks like Google's API needs CoreBluetooth for Beacon location. Link against CoreBluetooth.framework in your build phases and everything should be fine.
EDIT:
Make sure to install GoogleMaps through those instructions to avoid any issue: https://developers.google.com/maps/documentation/ios/start

I am having same problem, in my case I am having 2 reference of GoogleMap.framework, I deleted old framework reference and problem get solved :)
Click on project
In Build Phases -> Link Binary With Libraries -> Check any duplicate reference is present for GoogleMaps.framework
If yes then delete one, which you not added.

**_vImageBoxConvolve_Planar8, referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)**
This required "Accelerate.framework". So, please add it.
Steps:
1)Build Phases -> Link Bundle with Libraries.
2)Click "+",
3)Select "Accelerate.framework". Finish.

Removing -all_load flag from (Targets->Build Settings->Other linker flag) resolved my issue while using cocoa pods.

If anyone is experiencing this today, Linking CoreLocation.framework binary in Build Settings did the trick for me

Related

Adding Firebase Framework to iOS Undefined symbols

I am trying to add Firebase Messaging to my iOS Project. I can't use Pods because something with them is broken on my Developermachine. So I am adding the Framework manually. As mentioned by the Readme I added all Frameworks of the Analytics and Messaging Folders along with the Firebase.h to my Xcode Project. I added Storekit.framework, libz, libc++ and libsqlite3.0 as mentioned on other Stackoverflow Questions to get rid of the most linker errors. But still I can't compile/link my project because of the following errors:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAInAppPurchaseTransactionReporter_ca1fe3eb82b823d5f96d3f8b4baedc9c.o)
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAProductsRequest_8f770071350872416d311668917f3a41.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't get why they are missing or which library I need to add to make this run. Does someone know what to do ?
And I should also mention that I am using Qt on this project.
Thanks in advance,
I had the same issue.
I don't know why this framework is required, but i added StoreKit.framework to Linked Frameworks and Libraries which made it compile.
Hope it helps! 👍
You can try go to the entry header file of your project then add
#import "Firebase.h"
to see if problem is solved.

Linking errors when trying to install Google signin

I am trying to integrate Google Sign In into my iOS Apps but while doing this i am getting below error.
Is there any solution to remove below errors?
Undefined symbols for architecture armv7: "_inflate", referenced
from:
l002 in GoogleSignIn(GTMNSData+zlib.o) "_deflate", referenced from:
l001 in GoogleSignIn(GTMNSData+zlib.o) "_inflateEnd", referenced from:
l002 in GoogleSignIn(GTMNSData+zlib.o) "deflateInit2", referenced from:
l001 in GoogleSignIn(GTMNSData+zlib.o) "inflateInit2", referenced from:
l002 in GoogleSignIn(GTMNSData+zlib.o) "_deflateEnd", referenced from:
l001 in GoogleSignIn(GTMNSData+zlib.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
This is very common error and doesn't have any specific solution. Although may be following workaround may help you:
If you are not using cocoa-pods use them to add new repos.
Check that you haven't imported .m instead of .h.
Check you haven't add two frameworks accidenlty.
Remove -ObjC Linker flag from `-otherLinkerFlags'
Sometimes using older version of sdk may solve the problem.
Navigate to YourProject--Build Phases and check you haven't added one file more than once. And also any Link Binary and Libraries are not missing from there.
Here is the Image Showing OtherLinkerFlags
For More Detail Refer to this Link
Good Luck... :)
You can fallow below steps
Go to Build settings / Linking / Other Linker Flags and add the "-ObjC" without the quotes. This assume you are using some "header
file" to map Google framework and for Swift approach.
Go to Build Phases >Link Binary with Librairies > + > Add other, the go to de /usr/lib directory and select "libz.dylib"
Compile
Adding -ObjC and libz solved my problem. However in my case I can't find libz.dylib in path /usr/bin. I used libz.tbd in the iOS 9.3 folder instead and it also worked fine and dismissed those same errors.

Linker errors (undefined symbols) with Parse.framework

I added Parse.framework to my project. In AppDelegate.m, I just import it and set the application ID. It seemed OK, but when I run it, I get 4 errors.
What other frameworks should I add, or what else should I do ?
Here are the frameworks I added:
AudioToolbox.framework
CFNetwork.framework
CoreGraphics.framework
CoreLocation.framework
MobileCoreServices.framework
QuartzCore.framework
Security.framework
StoreKit.framework
SystemConfiguration.framework
libz.dylib
libsqlite3.dylib
Parse.framework
And here are the errors I am getting:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_BFExecutor", referenced from:
objc-class-ref in Parse(Parse.o)//And other six
"_OBJC_CLASS_$_BFTask", referenced from:
objc-class-ref in Parse(Parse.o)//And other six
"_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
objc-class-ref in Parse(PFOfflineStore.o)//And other six
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You must also add the Bolts.framework that comes with the Parse SDK as described in Step 2 on the quick start page:
https://www.parse.com/apps/quickstart#parse_data/mobile/ios/native/existing.
And ensure it gets listed under "Build Phases -> Link Binary with Libraries."
EDIT
Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error
Found this.
This usually happens when you have multiple classes with same name in your. You might have included a file more then once.
Also check if you have by any chance imported .m file into some file.

How to use private framework's .h file in Xcode

I am trying to use SBSRemoteNotificationClient.h file of SpringBoardServices framework downloaded from GitHub. I directly drag and dropped downloaded SBSRemoteNotificationClient.h file into Xcode and tried to compile it. But I am facing below error during compiling.
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SBSRemoteNotificationClient", referenced from:
objc-class-ref in MyClass.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I added #import "SBSRemoteNotificationClient.h" to my MyClass.m file.I also added path of SBSRemoteNotificationClient.h in Build Settings -> Search paths -> User Header Search paths like this /Users/awsuser006/Desktop/iphone-private-frameworks-master/SpringBoardServices/
But I am facing above mentioned error. Is this the right way of using .h files of private frameworks?
This is a linker error. The header was correctly parsed, but the framework symbols were not found. Make sure you are linking the SpringBoardServices framework.
Use
find /Applications/Xcode.app/ -name 'SpringBoardServices.framework'
to find it, then add -framework SpringBoardServices and -F /the/path/returned/by/find/ (without SpringBoardServices.framework at the end of the path) to your compilation flags.
Adding the framework using Build Phases > Link Binary With Libraries > (+) in your Xcode project may also work.
Find the framework symbols
Drag & drop them into Link with binaries...

google admob undefined symbol for architecture armv7

i have replaced older version of admob 6.6.1 with latest admob library version 6.12.0 but i get this error although every thing is fine. I am using xcode 6.0.1, how to resolve this issue, any help?
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_EKEvent", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_OBJC_CLASS_$_EKEventEditViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had same issue but i solved by adding eventKit and eventUIKit framework into my project. Hope it will work for you too.
This error is mostly because update of your ADMOB SDK.
1) Go to build phases->Open list of frameworks.
2) Locate libGoogleAdMobAds.a. Remove this file by pressing - sign.
3) Again add this libGoogleAdMobAds.a file back by pressing + sign and selecting "Add other". select this file from ADMOB folder of your project.
4) Clean, then build and run your project.
Also, check you have -ObjC set to Other Linker Flags in your project's target build settings and required frameworks are added.
add Framework EventKit and EventKitUI.

Resources