Linking error when building Parse in Xcode 7 - swift

I am trying to add the Parse.com SDK to my Xcode 7 project. I have followed the getting started guide and I have managed to do it before in Xcode 6.
However this time I am being shown this error message when I try to build:
ld: framework not found Bolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks

There seems to be an issue with Xcode 7 beta where the search path for manually added frameworks is missing.
To fix the issue add the search path by doing the following:
Select Project
Click on Targets
Click Build Settings
Search for: Framework Search Path
Add the following without the quotes: "$(PROJECT_DIR)" and choose recursive option.
The project should build now.

I suggest you integrate Parse using CocoaPods.
Cocoapods manages the library dependencies in a much better way.
The following is a sample PodFile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
inhibit_all_warnings!
target '**YourProjectName**' do
pod 'Parse', '~> 1.7.1'
pod 'AFNetworking', '2.2.3'
end

Related

ld: framework not found Lightning

I'm trying to add the lightning framework to my Xcode project, and the project is not building with an error:
ld: framework not found Lightning
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I'm working in the .xcworkspace, and I've tried to do use the commands pod deintegrate, pod install. I've also tried deleting the framework from Linked Frameworks and Libraries and readding but nothing is working
Try basic solutions like clean Xcode (press Cmd+Shift+K ), close Xcode and reopen If doen't help remove framework , do pod install and add again your framework and pod install ...

Xcode 10 Error: linker command failed with exit code 1

I just updated my Xcode to Xcode 10 and now my project will not run and I get the error:
ld: library not found for -lstdc++.6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I do not know what this means and how to fix it. I tried googling everywhere for the answer and came up with nothing. How can I fix this?
Open the projectname.xcworkspace if you are using cocoapods not the projectname.xcodeproj.
Alternatively, using terminal
$ open projectname.xcworkspace
Hope this helps.
I had this problem today in C++ using a newly upgraded Xcode 10 in a project that does not use pods, unlike the other answers.
When I clicked on the linker error there were no details given. This stumped me for a while and then I realised you can right-click the linker error and click "reveal in log".
In my case it was just a function that I had renamed-but-not-updated-all-the-references-to-it causing a linker error, but the real problem was that the linker error details were not being shown when the error occurred.
go to your project directory in the terminal
Type:
pod deintegrate
pod install
In your project, open the Project Navigator, and expand the Frameworks folder. You will see the file -lstdc++.6 highlighted in red, delete it, rebuild your project and you're good to go.
You can open the RN..xcworkspace, and expand the Frameworks folder. You will see the file highlighted in red, delete it,
Learn the build and rebuild the project,
This problem will be resolved. goog cluck!
please use cocoapods for dependency management, if you already using it then remove all pods and add it again / update all pods
https://stackoverflow.com/a/52050043/9978212

Firebase Cocoapods - Error message; Could not build Objective-C module 'Firebase

I'm trying to import Firebase after installing Cocoapods via terminal but i'm getting the following error message:
Could not build Objective-C module 'Firebase
Can someone help me out with this?
This is my Podfile content:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Login_test' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Login_test
pod 'Firebase/Core'
end
Assuming that you have installed FireBase properly via CocoaPods. Try the following steps
Step 1 - Close Xcode
Step 2 - Clear your derived data. You can find your derived data in here
~/Library/Developer/Xcode/DerivedData
Step 3 - Open your .xcworkspace
Step 4 - Clean your project (⌘+Shift+K)
Step 5 - Build your project (⌘+B)
Hope this helps.
for beginners:
make sure you read the message after installing the Pod,
you need to close the xcode project and use the .xcworkspace for this project from now on.
For me the issue was simple. I have a new m1 mac and it has trouble loading cocoa pods sometimes. Simply click your pods project(blue pods)->Click all & build settings ->Excluded architectures -> add "arm64" to both debug and release -> set any SDK on left side -> do this on your main project folder too -> build it your good to go
See Example

Cocoapods + Command Line Tool - dyld: Library not loaded: #rpath/Realm.framework/Versions/A/Realm

I created a Command Line Tool project in Xcode 8.2.1, then I ran pod init and added RealmSwift to it. After pod install, I opened the .xcworkspace file.
The project compiles fine, but at runtime I get the following error:
dyld: Library not loaded: #rpath/Realm.framework/Versions/A/Realm
Referenced from: /Users/myuser/Library/Developer/Xcode/DerivedData/myproject-eqotetgxsfjvxjfevywenvddnfdm/Build/Products/Debug/myproject
Reason: image not found
Program ended with exit code: 9
How can I use cocoapods here?
https://github.com/CocoaPods/CocoaPods/issues/3707
In other words cocoa pods don't work with "Command Line Tool" projects.
in podfile, comment the use_frameworks! line
credit here.
Please make sure your project setting under Link Binary with Libraries as 'Optional' not as 'Required' for Pod_PROJECT-NAME.framework

Firebase SDK pod installation linker error

I wanted to implement Firebase SDK in my Swift project. I followed the instructions and installed pods, created a Podfile as follows:
platform :ios, '7.0'
target 'MyApp' do
pod 'Firebase'
project '/Users/MyName/Desktop/MyApp/MyApp.xcodeproj'
end
Then as I do install pods, it comes out with the following in terminal:
Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 7 total pods installed.
So I thought it worked but after reading various posts online apparently this is supposed to produce a xcworkspace file which I'm supposde to use instead of xcodeproj- is that correct? And if so why hasn't it generated it? I don't understand what is going wrong.
It might also be relevant info that I added all the bits to my xcodeproj file (before realising I should be working with xcworkspace instead) so the pods had come up in my xcodeproj, I added the import Firebase header file, the Google service info, plist and the import+ FIRApp.configure() in delegate and added $(inherited) in other linkers and when I try to use simulator it comes up with an error saying:
Library not found for GoogleToolBoxForMac
Linker command code failed with exit code 1 (use -v to see invocation).
How come it allowed me to do all this if the initial install was incorrect? And where do I go from here?
Can I please get some help about what is going wrong? And how can I solve this problem? Or at least am I able to go back to step one and reverse all these changes smoothly?
If possible please use examples, I am a newbie.
Incase someone else is having this error. The problem was that I was in the wrong directory and had attempted to put a Podfile with the directory leading to 'MyApp.xcodeproj'. This is incorrect as the Podfile should just be in the folder. Initially I was not able to locate this folder (even though it was on my Desktop) so I used in terminal:
cd ~/Desktop
then
cd ~/Desktop/MyApp
and then
pod init
and edited the Podfile followed by
pod install...