2.下载sdk
![](https://img.haomeiwen.com/i4459977/da2c7b8435e3aa46.png)
https://developers.google.com/admob/ios/download
- 下载示例
- 打开示例
-
导入sdk
image.png
image.png
-
检查这里的状态
image.png
7.继续按照文档
![](https://img.haomeiwen.com/i4459977/b29516cc227d8fa4.png)
8.继续按照文档 修改应用ID
![](https://img.haomeiwen.com/i4459977/d30940326dafb6fe.png)
9.编译运行出现一个Bug 按照提示百度找到该文档
https://blog.csdn.net/lvmaker/article/details/100061183
![](https://img.haomeiwen.com/i4459977/2733aa2ce2db3fcd.png)
10.编译运行 广告跑起来了
![](https://img.haomeiwen.com/i4459977/45a9a4f07e05cbd3.png)
11.在公司电脑跑起来正常 回到家在跑一遍流程 异常报错
![](https://img.haomeiwen.com/i4459977/b2d60ed747b9062f.png)
google后
https://stackoverflow.com/questions/61865403/admob-could-not-find-auto-linked-framework-fblpromises
I had the same error. I had forgotten to add the following libs: nanopb.xcframework, PromisesObjC.xcframework, UserMessagingPlatform.framework - included in GoogleMobileAdsSdkiOS.. I just added the missed libraries and now everything is OK.
意思是 这个人少导了库 所以失败 全部导入后正常
按照这个意思把7个文件夹都导入
果然成功了
官方文档只写了4个库 所以这里是个坑 谨记!!!
![](https://img.haomeiwen.com/i4459977/ada19b667710a0bc.png)
实际导入7个库
![](https://img.haomeiwen.com/i4459977/2cea3f1860689425.png)
网友评论