I have created a Xcode project with cocoa pods and committed into SVN, When i am taking fresh checkout every time the googleAnalytics or some othe library library is missing. I have chanhed all the settings like Library Search paths, Framework Search paths and other linker flags and given -Objc, $(inherited). But still same issue. Below image showing missing library every new checkout
Image which missing libraries from workspace
Every time when i am taking new checkout pods are missing, I dont want to install pods locally every time. I want commit pods to SVN. Next time when i take fresh checkout it should not give these missing errors.
Related
While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device while building or set the Build for Active Architecture only as true in Build Settings.
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
Read the error report to identify the repo that supposedly contains duplicate files.
Drag repo to the trash.
re-clone your repo.
set up your repo with correct remote tracking. git remote add <url.git>, or git remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop for a local dependency, git would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop was no longer pulling from multiple commits at once. Perhaps there was a weird git cache for my repo.
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.
I am using some framework which are integrated with pods . So I want to ask is this good approach to sync these framework on gitHub . For example . In my iOS project I have integrated GoogleMap framework, Should I sync this on Github or i should some reference . I am asking this because When i commit this framework it give me memory issues.
I'd say there's no "best approach" about what should be ignored concerning your pods dependencies.
One would say that it's better to ignore the pods directory to keep your git repository light, but for someone else would say that your pods dependencies are part and parcel of your app, it won't build without it, so you must commit it.
First I chose to include all my pods in my git repo, but I quickly noted that it could be very annoying, given that each time you update one of your dependencies it blows yp your updated commit files list. Now I just include my Podfile and Podfile.lock files and ignore the Pods repository. Just make sure to run pod install each time you pull from the repo.
The main benefit of including all your Pods is to have your project "ready to build", without the need to have CocoaPods installed on your computer to build it first.
For more details, see this related question :
What goes into your .gitignore if you're using CocoaPods?
I have just added Google Analytics to my pods like this:
pod 'Google/Analytics'
just like GA documentation suggests. Now my project won't link. It says:
library not found for -lGGLAnalytics
Did anyone ever encounter this? Thanks
I got the same error. Solved by reseting LIBRARY_SEARCH_PATHS to default value.
Select your target and navigate to Build Settings. Under Search Paths select Library Search Paths and reset it to default by pressing backspace.
In result, the value for Library Search Paths should change from blank:
to default:
Diff in .pbxproj just removes the empty value:
I'm using pods version0.39.0, Xcode 7.2.
In my case the solution was remove all but $(inherited) in Target -> Build Settings -> Other linker flags
Then of course clean and build!
I ran into this and had a very strange cause and different solution from the above, so I figured maybe this might help someone else who shows up here.
I had a working project in my normal directory and I save it to an SVN code repo. I needed to step back to a previous version for something, so I checked out a new copy from SVN and updated it back to the revision I needed.
Then I started getting the library not found for -lGGLAnalytics error.
It turns out that SVN doesn't really like it when you check-in *.a files and it ignores them by default. So my SVN repo had all of the Google Pod code but was missing the libGGLAnalytics.a files and a couple of other .a files.
How I solved it:
I copied the Pods/Google and Pods/GoogleAnalytics directories over from my real project. Then I did a pod install from the command line which updated my project files to reference those files that were previously missing.
I did a Build Clean and all fixed.
After a pull I suddenly get the following error in xcode:
ld: framework not found Crashlytics
However my team mate has no problem. He updated Crashlytics and pushed his changes on SourceTree as it runs fine on his computer. Even if I totally remove the project and do a git clone, it still doens't work.
The problem is caused by a bug in SourceTree that doesn't detect type changes in binary files. When your team mate updated Crashlytics and Fabric, source tree didn't recognise a few of the binary symlink changes it made. Solution is to do the following:
Go to his terminal
Navigate to his project folder (cd ~/folder/to/project)
Add the missing files (git add --all)
Commit his changes from there (git commit -a -m "My informational commit message")
Push his changes (git push origin branch_name)
And then finally on your computer do a pull (git pull origin branch_name)
please add $(inherited) in FRAMEWORK_SEARCH_PATHS build settings this worked for me.
Check your TARGET - Build Settings - Other Linker Flags
If you just updated to pod 'Firebase/Crashlytics' and there is Crashlytics exists, make it FirebaseCrashlytics.
And also check there is Fabric, If exists that remove it.
(Remove next line framework which is under Fabric line too)
It should build successfully now.
Check your TARGET - Build Settings - Other Linker Flags
If you just updated to pod 'Firebase/Crashlytics' and there is Crashlytics exists, make it FirebaseCrashlytics.
Similarly if you will see in the terminal, pod which is removed please remove from
Other Linker Flags also
Example: Fabric, FirebaseInstanceID.
(Remove next line framework which is under Fabric, FirebaseInstanceID line too)
It should build successfully now.
In case you do not have access to the original repo (in order to check in the missing files), re-adding the framework using FabricĀ“s helper-tool also works as a "repair" for the build.
add $(inherited) in Framework Search Paths in Target Build Settings. Issue gets fixed.
just find in Project .ld file and remove it From Project and then
Debug,
its working perfectly.
after removing all your functionality stay as it is.
its not depended on that .ld file.
so , solution for that one is to remove it.
I checkout a version from SVN, but when i run the project it shows Linker errors and missing frameworks. I solved the problem by adding again the frameworks and missing '.a' files from the folder to Build Phases-> Link Binary with Libraries and also I cleared the Library search path and Framework search paths to make the project run.
But when I checkout from SVN each time I encounter these same errors, how to set the relative path for the Libraries and frameworks. Every member of the project is encountering the same error when they checkout on their Mac machine. How to resolve this error.
Any help is appreciated.
In the below screen the search path shows only the local path, how to change it to absolute path so that every time it can fetch from XCode itself.
Click on 'Framework Search Paths' and make changes as shown in below image.