I followed the instructions in https://developers.google.com/admob/ios/quick-start (I've tried twice already), but when I run my app it crashes. It seems like it can't find the FBLPromises.framework
. In the project navigator that framework and some other files are in red.
At first, it wouldn't even build, but I found an article that said to set the Pod's script to run on installs only. So now it builds but crashes immediately.
The error I get is this:
dyld: Library not loaded: @rpath/FBLPromises.framework/FBLPromises Referenced from: /Users/me/Library/Developer/CoreSimulator/Devices/9E7DEF6C-2C86-4E3C-82CF-13F2388060B5/data/Containers/Bundle/Application/70DE82B4-0792-4645-9197-07C9CE191D88/myapp.app/My app Reason: image not found
My pod file (I removed the info for the tests and a watch extension since I only want ads on the one target):
# Uncomment the next line to define a global platform for your project
platform :ios, '14.0'
target 'My app' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Google-Mobile-Ads-SDK'
# Pods for My app
end
I tried commenting out use_frameworks!
and adding something about headers on the podfile, but it didn't do anything. I also tried changing the pod path on build settings, but also nothing.
I downloaded the framework version for manual download and tried adding the missing framework, but the files seem to have different names, so I couldn't tell which file to put where.