iOS - GA - library not found - ios

I am trying to add Google Analytics to my iOS app. I followed the step of Google's tutorial but now my projet doesnt compile and I have the following error message.
ld: library not found for -lGoogleAnalyticsServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked and the the library libGoogleAnalytics_debug.a is in my project folder so I dont understand where the problem comes from.
Does anyone have an idea how to fix this?
Many thanks

Go to your project > Build settings > search for the LIBRARY_SEARCH_PATHS and check their paths.

just put lGoogleAnalyticsServices.a near with myapp.xcodeproj, and drag library in your frameworks block in xcode

I also had this error and was able to fix it like this:
Go to the app project settings
Go to the General tab
Under Linked Frameworks and Libraries, drag libGoogleAnalyticsServices.a to be at the end of the list.
Order matters because if a dependency of said library isn't built first, Xcode won't be able to link it.

Related

React Native build release: linker command failed with exit code 1

I'm trying to build an archive of my app developed in react native.
I keep getting the following error though:
I've browsed similar issues on github, like this one:
https://github.com/react-community/react-native-maps/issues/1691 but it's not relevant to my issue since I don't use maps.
I bet some of you have already came through this hell with releasing RN app, any help appreciated.
yes i am in this hell to! i think you have to do this:
xcode > your target > remove -IGTMSessionFetcher library from Libraries folder and "Linked Framwork and Libraries" section,hope this help

ld: library not found for -lVuforia

I'm integrating unity project to native ios project in c++. But I'm getting error
ld: library not found for -lVuforia
clang: error: linker command failed with exit code 1 (use -v to see invocation)
while building xcode project.
I'm using
xCode : 8.2.1
Unity : 5.6.1f1
It doesn't look like you have the "Vuforia" library included in your build.
Under your Unity project, look for a file called Vuforia.framework. This file's inspector should have "iOS" marked in it, so it gets included in the generated Xcode project.
If you integrated a Unity scene using Vuforia, you should be able to see those libraries libVuforia.a and libVuforiaUnityPlayer.a at the path Demo/Vendor/Unity/Libraries/Plugins/iOS/
If you don't see those libraries you should try to integrate your Unity scene once again. If they're here, in Xcode go to Build Phases, then Link Binary With Libraries and make sure you have those above libraries as well as libiPhone.a (those are the libraries given by your Unity scene and you definitely need them), if not add them.
Also, I believe you followed a tutorial to integrate a normal Unity scene, however when you use Vuforia you need to make some other steps. For instance, you'll have to add the folder references of Data AND QCAR. I recommend you to try once again your integration with this tutorial which is more relevant to what you want to do.
I hope this will be useful to you and I wish you good luck in your integration.
Because your code cannot find libVuforia.a, which is library. You have to set "Library search path" at "Build Setting"
or use vuforia sdk
1. download vuforia sdk https://developer.vuforia.com/downloads/sdk
2. create or put your source code put in Sample folder in vuforia-sdk-ios-7-0-43
enter image description here
3.In your project Go to Target > Build Setting > Search Paths > Library Search Path. and Click +
../../build/lib/arm
4.In your project Go to Target > Build Setting > Search Paths > Header Search Path. and Click +
../../build/include
5.Run

ld: library not found for -lPayPalMobile ios

i am working with xcode 6.1 on paypal integration.
i am getting following error each time when i open the project.
ld: library not found for -lPayPalMobile
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
every time i have to remove library search paths value and remove reference of paypal folder and again import it to project.
what is the problem i don't know please tell me what to do?
Edited
one thing more that if project name is "This is test" then what will be difference?
because i can see in library search paths that in first row "This" is coming in second row only "is" is there and in last (i.e. 3rd row) "test" is there.
Thank you.
Follow Below steps,
(1) Add Static library in Your project bundle.
(2) Add it in "link binary with libraries"
You need to go to your Target -> Build phase -> link binary with libraries.
as attached in below image.
(3) Give proper header search path for your linked library.
i.e. ($PROJECT_DIR)/Your path.
You can also read the steps that given in GitHub link of PayPal,
which give you proper direction.
Feel free to ask if you need more help regarding this.
As #Anuj mentioned this can be a problem related with Library Search Paths. Cocoa Pods sometimes gets a mess when updating it, or installing it again if you have it or not under Source Control.
I solved this problem right now by adding this flag under Library Search Paths:
$(inherited)
Hope it helps you
This is usually Header or Library Search Paths. It's better to use CocoaPods to manage your project dependancies. CocoaPods is the dependency manager for Objective-C projects. It has thousands of libraries and can help you scale your projects elegantly. You can import any static library using simple Podfile and command line.
Once you start using CocoaPods, you won't have to worry about header or library search paths. PayPal also has a spec in the CocoaPods Spec repository.

Linker error compiling PDFKit

I am trying to integrate PSPDFKit for iOS in my project and I have not been yet able to success. After downloading the Demo version, adding the framework to my project, adding all the required libraries and placing
#import <PSPDFKit/PSPDFKit.h>
on the 'prefix' file, I get an linker error:
ld: section __objc_const (address=0x00613EA8, size=4651232504) would make the output executable exceed available address range for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
NOTE: My project uses PSTCollectionView and I have successfully compiled PSPDFKit on a test project (created only for that effect).
I would really appreciate any help. Thanks in advance.
Apparently, you have too many included files in your PCH file.
Try removing some of them, and include those files only where you need them, not globally.
As far as I understand it, this is a bug in Apple's compiler/linker chain. Please file a radar at radar.apple.com with your failing project. A workaround is to use the source code as a subproject instead of the precompiled binary.
As soon as I can get my hands on such a project, I can experiment with the settings to see if there's any workaround. Seems to only happen under very specific combinations with other 3rd party code.

Problems adding Google Analytics to iOS App

When I run through implementing Google Analytics in my app, using this walk through:
http://code.google.com/mobile/articles/analytics_end_to_end.html
After adding the libGoogleAnalytics.a CFNetwork and libsqlite3.0.dylib frameworks, and added the GANTracker.h into my AppDelegate.m
I get this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GANTracker", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and the app won't even compile. My app is aimed at iOS 5.0
I'm pretty stuck. Any advice or work throughs would be very highly appreciated.
I actually figured out the answer after posting the comment.
Click on your project in the "Project Navigator", then click on your project under "Targets". You then need to click on "Build Phases". You need to make sure libsqlite3.0dylib and CFNetwork.framework are added to the "Link Binary WIth Libraries". I had this, but what I didnt have was you also need to add libGoogleAnalytics.a to that same area. That fixed the problem for me.
In my case, I add the AdSupport.framework for the missing "_OBJC_CLASS_$_ASIdentifierManager"
Just adding to the answer of #Etch.
Xcode 4.5 dropped armv6 and only supports armv7. Therefore, your lib might be an old version and you need to download version 1.5.1 onward. Download here
Issues: http://code.google.com/p/analytics-issues/issues/detail?id=232
I was working on a Cordova based XCode project. And got stuck with these stupid errors before figuring out what the linking errors meant. So here is what you do..
First, make sure you follow the steps mentioned https://github.com/phonegap/phonegap-plugins/tree/master/iOS/GoogleAnalytics. Next make sure you have the following files under the project linked via Build Phases (You get that when you click on the project name.. figure it out)
GANTracker.h
libsqlite3.0.dylib
libGoogleAnalytics.a
CFNetwork.framework
Also make sure your Plugins folder has 2 files, GoogleAnalyticsPlugin.h and GoogleAnalyticsPlugin.m.
If that doesn't help resolve your bugs. Then God help you. Start praying. Or alternatively try a bug spray. See if that works.
I had the same issue. The solution was move the library to same level of .h files.
But I don't know why this work.
In your Link Binary With Libraries under Build Phases under your target:
Make sure you remove libGoogleAnalytics_debug.a if you added it. And ensure you have AdSupport.framework and of course libGoogleAnalyticsServices.a.

Resources