CocoaPods iOS Framework Linking i386 Files - ios

I am having problems trying to link frameworks into a test project of mine...
I do understand, mostly, how CocoaPods work, and the reasons I am trying to link the actual frameworks from these files is beyond the scope of this question.
In my CocoaPods "Podfile", I have the following.
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'GasAPI' do
platform :ios, '8.0'
use_frameworks!
pod "Alamofire"
pod "SwiftyJSON"
target 'GasAPITests' do
inherit! :search_paths
# Pods for testing
pod "Alamofire"
pod "SwiftyJSON"
end
end
But, any time I do a "pod install", if I go the Project settings of the "Pods" project, the "Base SDK" changes to "Latest OS X".
I have made sure that all of the "Targets" have "Latest iOS (iOS 9.3) as their Base SDK.
However, when I try to link one of these files into my test project, I get a linker error that appears to me like it is looking for an OS X library, and not an iOS library.
Here is the latest error that I got:
Ld /Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Products/Debug-iphonesimulator/GasApiTestProject2.app/GasApiTestProject2 normal i386
cd /Users/brent/Dropbox/NJVC/API/GasApiTestProject2
export IPHONEOS_DEPLOYMENT_TARGET=9.3
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Products/Debug-iphonesimulator -F/Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Products/Debug-iphonesimulator -filelist /Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Intermediates/GasApiTestProject2.build/Debug-iphonesimulator/GasApiTestProject2.build/Objects-normal/i386/GasApiTestProject2.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=9.3 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Intermediates/GasApiTestProject2.build/Debug-iphonesimulator/GasApiTestProject2.build/Objects-normal/i386/GasApiTestProject2.swiftmodule -framework GasAPI -framework Result -framework SwiftyJSON -framework Moya -framework Alamofire -framework ReachabilitySwift -framework SwiftyBeaver -framework SwiftyRSA -framework Quick -framework Nimble -Xlinker -dependency_info -Xlinker /Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Intermediates/GasApiTestProject2.build/Debug-iphonesimulator/GasApiTestProject2.build/Objects-normal/i386/GasApiTestProject2_dependency_info.dat -o /Users/brent/Library/Developer/Xcode/DerivedData/GasAPI-gsmqzrqwzjzvuhdhmovzfhwbfbow/Build/Products/Debug-iphonesimulator/GasApiTestProject2.app/GasApiTestProject2
ld: framework not found Result
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried removing all Pods and rebuilding and re-adding them to the project, it still seems to want to default to OS X.
I am running Xcode v7.3.1 on OS X 10.11.6 and using CocoaPods v1.0.1
I have found lots of resources on how to link iOS & OS X projects, but that isn't the problem here. It looks like my linker is looking for architectures that it shouldn't be.
What do I need to do to get past this error?
Thanks!

try clicking product, then hold down option, you will see clean turn into clean build folder and click that, then run project.

The i386 really had nothing to do with this issue, but it kind of acted like a red-herring and threw me off.
For the API that I am building, there was no "Copy Files" section.
So, in Xcode, under "Build Phases", I added a new "Copy Files" section and then chose "Frameworks" as the "Destination". I added all of the frameworks that I needed, and everything worked!
Hope this helps anyone else who may run across this!
Perlguy.

Related

Xcode build fails after changing build config in React Native

I have been struggling to get schemes on iOS to work for my react native project reliably.
I followed the suggestions at https://medium.com/#ywongcode/building-multiple-versions-of-a-react-native-app-4361252ddde5, as well as tried using react-native-schemes-manager, which worked 1 time, but couldn't be duplicated onto another computer. I get all kinds of different problems, from libraries not found, to duplicate declarations and other problems. I have tried many many suggestions and none of them seem to work. I believe the problem all have to do with the build paths or search paths, but I am not expert enough in Xcode to figure out what is going wrong. I use quite a number of 3rd party libraries, including Code Push, Fabric, RNConfig, ImageCropPicker amongst others.
So finally I have decided to revert everything and start again from just the basic Debug and Release config, and have deleted all the additional configs and schemes. So, by doing this everything works (Run, and Archive).
Next, I just created a build config by duplicating the Release config, and called it Staging. Next I edited the working scheme release to use the Staging config for archiving, and ran the archive. This fails with the following message:
/opt/react/XXX/ios/XXX/AppDelegate.m:11:9: fatal error: 'CodePush/CodePush.h' file not found
#import <CodePush/CodePush.h>
Before I went through this exercise of deleting all the configs, if I used the previous Staging config in the same scheme, it this other error:
Showing Recent Messages
Ld Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St normal arm64
cd /opt/react/XXX/ios
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -L/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos -L/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Staging-iphoneos/QBImagePickerController -L/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Staging-iphoneos/RSKImageCropper -L/opt/react/XXX/ios -F/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos -F/opt/react/XXX/ios/Pods/Crashlytics/iOS -F/opt/react/XXX/ios/Pods/Fabric/iOS -filelist /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=8.0 -Xlinker -object_path_lto -Xlinker /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos -Xlinker -final_output -Xlinker /Applications/YYY.St.app/YYY.St -fobjc-arc -fobjc-link-runtime -ObjC -lQBImagePickerController -lRSKImageCropper -lc++ -lz -framework Crashlytics -framework Fabric -framework Photos -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -weak_framework CoreFoundation -lz /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libimageCropPicker.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTPdf.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRNFetchBlob.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTVideo.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRNVectorIcons.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTPushNotification.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRNSound.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libReact.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTAnimation.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTActionSheet.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTGeolocation.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTImage.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTLinking.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTNetwork.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTSettings.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTText.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTVibration.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTWebSocket.a -lRNAudio -lRCTCamera -lRNDeviceInfo -lCodePush -lLRDRCTSimpleToast -lRCTOrientation -lPods-XXX -lReactNativeConfig -lRNPhotoView -lReact -lyoga -lcxxreact -ljschelpers -lRNSensitiveInfo -Xlinker -dependency_info -Xlinker /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St_dependency_info.dat -o /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St
ld: library not found for -lPods-XXX
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There are so many variations to the errors that I have had with this, so I can't figure out what I am doing wrong.
Have already set Header Search Paths, Framework Search Paths and Library Search Paths to include $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)
I always clean project before trying another variation, but no luck...
Help!!!
I think question has an answer here:
Why does exact copy of Xcode Build Configuration fail?
I wonder if this is caused by a bug in React Native - this looks similar to what you are reporting:
https://github.com/facebook/react-native/issues/19929
If it is, maybe you can chip in and we'll get more attention towards this problem.

Xcode - 'library not found for -lPods-[Pod]'

So I've added some Cocoapods to a project, and now when I build, I'm getting the following error:
Ld Build/Products/Debug-iphonesimulator/[AppName].app/[AppName] normal x86_64
cd /Users/[username]/Developer/[AppName]
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator -L/Users/[username]/Developer/[AppName] -F/Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator -filelist /Users/[username]/Developer/[AppName]/Build/Intermediates/[AppName].build/Debug-iphonesimulator/[AppName].build/Objects-normal/x86_64/[AppName].LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lCMDQueryStringSerialization -lISO8601 -lReactiveCocoa -lSimpleAuth -lc++ -lpop -framework Foundation -framework UIKit -lPods-CMDQueryStringSerialization -lPods-ISO8601 -lPods-ReactiveCocoa -lPods-SimpleAuth -framework Foundation -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.0 -framework MapKit -framework CoreLocation -lPods -Xlinker -dependency_info -Xlinker /Users/[username]/Developer/[AppName]/Build/Intermediates/[AppName].build/Debug-iphonesimulator/[AppName].build/Objects-normal/x86_64/[AppName]_dependency_info.dat -o /Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator/[AppName].app/[AppName]
ld: library not found for -lPods-CMDQueryStringSerialization
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've uninstalled and reinstalled all the Cocoapods in the workspace several times to no avail. I've also seen so many other similar errors and done what those answers said to do, but I'm still getting the error.
Also, as a side note, earlier I was not getting this error but instead a '233 duplicate symbols for architecture x86_64' error pointing to some (read: a lot of) Objective-C files in some of the pods (i.e. ReactiveCocoa). It seems like these errors came after I added Facebook's Pop pod to my Podfile, but I'm not pointing any fingers because I'm pretty sure that didn't cause all these problems.
Please and thanks for any help!
EDIT:
Here is the Podfile:
pod 'SimpleAuth/LinkedInWeb'
pod 'SimpleAuth/GoogleWeb'
pod 'pop', '~> 1.0'
inhibit_all_warnings!
UPDATE & FIX:
Ok, so I've fixed the problem. Here's what I did:
Remove any pods that are causing the error.
Delete Derived Data sub-folders.
Remove any explicit '-lPods-[Pod]' linker flags in Build Settings -> Other Linker Flags.
Quit/Restart Xcode.
Add back pods and run pod install.
Open .xcworkspace and build. Hopefully it should be fixed!
I'm not sure how necessary all of these steps are, but that's what I did to fix it for me.
Add pod 'SimpleAuth' to your Podfile and run pod install, see if that helps.

Xcode will not link XCTest to the iOSSimulator version

So for one of my classes, we are supposed to refactor this project from last quarter that was left in a pretty bad state.
So we are trying to write unit tests for the project, but they used an old version of Xcode, so we had to re-add the XCTest framework to "Link Binary With Libraries".
I accidentally added the MacOSX version of it the first time, and noticed my error. I removed the OS X version from the linker, and added the iPhoneSimulator version to it. It kept giving me the same error. So I removed all XCTest.framework files from the Build Phases, and it gave me an error about OCMock (which is a totally different problem that I'm not concerned about right now), which means it knows it's gone. So I then tried re-adding XCTest.framework to my test target, making sure it was the iOSSimulator version, and it gives me the same error about it being the Mac OS X version. I have tried restarting Xcode and did correctly that I did before but that did not work. Below is the full output from the error.
Ld /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator/HenryTests.xctest/HenryTests normal x86_64
cd /Users/MY_USERNAME/Git/JrProj-1415-Mike/Code/iOS/Henry
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator -L/Users/MY_USERNAME/Git/JrProj-1415-Mike/Code/iOS/Henry -F/Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Users/MY_USERNAME/Git/JrProj-1415-Mike/Code/iOS/Henry -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/Developer/Library/Frameworks -filelist /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Intermediates/Henry.build/Debug-iphonesimulator/HenryTests.build/Objects-normal/x86_64/HenryTests.LinkFileList -bundle_loader /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator/Henry.app/Henry -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework XCTest -lOCMock -framework UIKit -framework Foundation -framework Firebase -Xlinker -dependency_info -Xlinker /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Intermediates/Henry.build/Debug-iphonesimulator/HenryTests.build/Objects-normal/x86_64/HenryTests_dependency_info.dat -o /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator/HenryTests.xctest/HenryTests
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In case anyone come across this problem too, pretty much the only solution is to make a new project, and add all the files to that new project. I've talked to some professionals in iOS development, and they could come up with no other solution. I think it has something to do with the project being from a pretty old version of Xcode, and the new XCTest framework being pretty new. Good luck to you if you come across this too.

Linker error after change in target name

I have an iOS project with Google AdMob SDK installed using cocoa pods. When I started the project, the name of the project is called MAPPER. Then I renamed the project to GLITTER in Xcode. Xcode changed the name in almost all places except for cocoa pods. I had to rename in manually as in
target 'Glitters' do
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
end
target 'GlittersTests' do
end
I have to manually rename it. Then POD INSTALL worked fine. But my compile is failing with linker error as below
ld: library not found for -lPods-Mapper
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Full log message
Ld /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator/Glitters.app/Glitters normal x86_64
cd /Users/BharathMBA/iOS/Swift/Mapper
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator -F/Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator -F/Users/BharathMBA/iOS/Swift/Mapper/Pods/Google-Mobile-Ads-SDK/GoogleMobileAdsSdkiOS-7.0.0 -filelist /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-Glitters-Google-Mobile-Ads-SDK -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreTelephony -framework EventKit -framework EventKitUI -framework GoogleMobileAds -framework MessageUI -framework StoreKit -framework SystemConfiguration -weak_framework AdSupport -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -force_load -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a -Xlinker -add_ast_path -Xlinker /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters.swiftmodule -mios-simulator-version-min=7.0 -lPods-Mapper -lPods-Glitters -Xlinker -dependency_info -Xlinker /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters_dependency_info.dat -o /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator/Glitters.app/Glitters
In the log I could see -Pods-Mapper is called for linking in line
-Xlinker -add_ast_path -Xlinker /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters.swiftmodule -mios-simulator-version-min=7.0 -lPods-Mapper -lPods-Glitters -Xlinker -dependency_info
I am not sure how to get rid of this issue.
Thanks
Go to the General tab of your target and scroll to section named Linked Frameworks and Libraries.
Here, you should see 2 references to your Pods' framework:
one with the name Pods_<previous-target-name>.framework
a second with the name Pods_<current-target-name>.framework
Delete the reference to pod Pods_<previous-target-name>.framework.
I had the same issue and found that some paths were not changed by xcode. I ended up doing the following:
Select your project file (top most entry in your xcode workspace)
Select the target you use to build your app
Switch to the build phases tab
Find the [CP] Embed Pods Frameworks and the [CP] Copy Pods Frameworks phase
Open them and you will see that they still have the old file path in there.
Change the file paths so they fit your new project name
However, this only gave me more errors. I selected the project itself this time and expanded the Configurations section. Here I saw that a lot of old references were used. Instead of manually changing them I decided that it was easier to deintegrate and install the pods again by using pod deintegrate and pod install which then solved the problem.
I guess the first steps are unnecessary when deintegrating but I think it's good to know that they exist.

Error while trying to Archive an Xcode project

Good evening guys!!
i have an xcode project that i want to publish on App Store. it`s building and running normally on a external device, but when i try to archive it, the following error occurs:
Ld /Users/Dado/Library/Developer/Xcode/DerivedData/MinhaBibliaOffline-bmkcjpxbesptrhdhnfhpudwgicip/Build/Intermediates/ArchiveIntermediates/MinhaBibliaOffline/InstallationBuildProductsLocation/Applications/MinhaBibliaOffline.app/MinhaBibliaOffline normal armv7
cd /Users/Dado/Dropbox/Sistema/MyWorkspace/Apple/MinhaBibliaOffline
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/Dado/Library/Developer/Xcode/DerivedData/MinhaBibliaOffline-bmkcjpxbesptrhdhnfhpudwgicip/Build/Intermediates/ArchiveIntermediates/MinhaBibliaOffline/BuildProductsPath/Release-iphoneos -L/Users/Dado/Dropbox/Sistema/MyWorkspace/Apple/MinhaBibliaOffline/Pods/build/Debug-iphoneos -L/Users/Dado/Dropbox/Sistema/MyWorkspace/Apple/MinhaBibliaOffline/Pods/build/Release-iphoneos -F/Users/Dado/Library/Developer/Xcode/DerivedData/MinhaBibliaOffline-bmkcjpxbesptrhdhnfhpudwgicip/Build/Intermediates/ArchiveIntermediates/MinhaBibliaOffline/BuildProductsPath/Release-iphoneos -filelist /Users/Dado/Library/Developer/Xcode/DerivedData/MinhaBibliaOffline-bmkcjpxbesptrhdhnfhpudwgicip/Build/Intermediates/ArchiveIntermediates/MinhaBibliaOffline/IntermediateBuildFilesPath/MinhaBibliaOffline.build/Release-iphoneos/MinhaBibliaOffline.build/Objects-normal/armv7/MinhaBibliaOffline.LinkFileList -dead_strip -ObjC -lPods-AFNetworking -lPods-MMDrawerController -lPods-WYPopoverController -framework CoreGraphics -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lsqlite3 -framework CoreGraphics -framework UIKit -framework Foundation -lPods-MinhaBibliaOffline -Xlinker -dependency_info -Xlinker /Users/Dado/Library/Developer/Xcode/DerivedData/MinhaBibliaOffline-bmkcjpxbesptrhdhnfhpudwgicip/Build/Intermediates/ArchiveIntermediates/MinhaBibliaOffline/IntermediateBuildFilesPath/MinhaBibliaOffline.build/Release-iphoneos/MinhaBibliaOffline.build/Objects-normal/armv7/MinhaBibliaOffline_dependency_info.dat -o /Users/Dado/Library/Developer/Xcode/DerivedData/MinhaBibliaOffline-bmkcjpxbesptrhdhnfhpudwgicip/Build/Intermediates/ArchiveIntermediates/MinhaBibliaOffline/InstallationBuildProductsLocation/Applications/MinhaBibliaOffline.app/MinhaBibliaOffline
ld: warning: directory not found for option '-L/Users/Dado/Dropbox/Sistema/MyWorkspace/Apple/MinhaBibliaOffline/Pods/build/Debug-iphoneos'
ld: warning: directory not found for option '-L/Users/Dado/Dropbox/Sistema/MyWorkspace/Apple/MinhaBibliaOffline/Pods/build/Release-iphoneos'
ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my Podfile implementation
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "7.0"
target "MinhaBibliaOffline" do
pod "AFNetworking"
pod "MMDrawerController", "~> 0.5.7"
pod "TAOOverlayHelp"
pod "WYPopoverController", "~> 0.2.2"
end
i have looked for a solution for hours, but still didn`t find one that worked
i've just found an answer that worked for me.. i'll write below because it might be useful to somebody.
In my case, i had to update the "Other Linker Flags" in my project target > Build Settings.
There were wrong references to the projects added via CocoaPods:
For example:
before: -l"Pods-AFNetworking"
i changed to: -l"Pods-MinhaBibliaOffline-AFNetworking"
I hope this answer helps
Cheers

Resources