app mos
app mos

Reputation: 33

Missing framework in cocoapod

I use Cocoapod to pod Google-Mobile-Ads-SDK (7.4.0) into my project in swift. But the pod.framework and foundation.framework can't be found. (show Red color) I guess it is the path problem.

My pod.framework is in Macintosh HD ▸ Users ▸ yumo ▸ library ▸ Developer ▸ Xcode ▸ DerivedData ▸ LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj ▸ Build ▸ Products ▸ Debug-iphonesimulator My project is built in Macintosh HD ▸ Users ▸ yumo ▸ Desktop ▸ LEARNTUBE ▸ Pods

I have tried before to just drag out the LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj file into my pod file in my project directory but still not work. I do think there is some problem in configuration in my building setting. Please help.

Below is my coding in my podfile.

platform :ios, ‘8.2’

use_frameworks!

inhibit_all_warnings!

xcodeproj '/Users/yumo/Desktop/LEARNTUBE/LEARNTUBE.xcodeproj'

pod 'Google-Mobile-Ads-SDK', '~> 7.4.0'

After that I manually copy and paste and framework and put it in my project directory, I appear another error.

Ld /Users/yumo/Library/Developer/Xcode/DerivedData/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Products/Debug-iphonesimulator/Pods.framework/Pods normal x86_64 cd /Users/yumo/Desktop/LEARNTUBE/Pods export IPHONEOS_DEPLOYMENT_TARGET=8.2 export PATH="/Applications/Xcode-Beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-Beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode-Beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/Users/yumo/Library/Developer/Xcode/DerivedData/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Products/Debug-iphonesimulator -F/Users/yumo/Library/Developer/Xcode/DerivedData/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Products/Debug-iphonesimulator -F/Users/yumo/Desktop/LEARNTUBE/Pods/Google-Mobile-Ads-SDK/GoogleMobileAdsSdkiOS-7.4.0 -F/Users/yumo/Desktop/LEARNTUBE/Pods/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Products/Debug-iphonesimulator -filelist /Users/yumo/Library/Developer/Xcode/DerivedData/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods.build/Objects-normal/x86_64/Pods.LinkFileList -install_name @rpath/Pods.framework/Pods -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.2 -framework Pods -framework Foundation -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/yumo/Library/Developer/Xcode/DerivedData/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods.build/Objects-normal/x86_64/Pods_dependency_info.dat -o /Users/yumo/Library/Developer/Xcode/DerivedData/LEARNTUBE-ejrntnmsywldgagnqwkkxwvzsqmj/Build/Products/Debug-iphonesimulator/Pods.framework/Pods

ld: framework not found Pods clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 3

Views: 9839

Answers (2)

greenhouse
greenhouse

Reputation: 1281

my solution was real simple but took forever for me to figure out.

  • when i ran $ pod install it generated a workspace for me in the same dir as my .xcodeproj file.
  • however i had already created a workspace to use as its parent directory.
  • so then i simply deleted my old workspace and went with the one that pods created

enter image description here


glhf!

Upvotes: 2

Mike Demidov
Mike Demidov

Reputation: 1127

What's the Pods.framework? Try to add a dependency again.

Remove the Pods/ folder in your project root directory, then remove .xcworkspace file (it's a dir actually) and Podfile.lock file, after open .xcodeproj and delete xcconfig files under Pods folder (they will be marked as red).

Then update the Podfile to (if your target hasn't the name "LEARNTUBE" use actual one)

target 'LEARNTUBE' do

pod 'Google-Mobile-Ads-SDK', '~> 7.4.0'

end

after try

pod update

after check target's 'Build Phases' -> 'Link Binary With Libraries' that there are all well.

Upvotes: 6

Related Questions