ios - Google AdMob Podfile - 手动与自动版本更新?

标签 ios swift admob cocoapods

好的,如果这可能被视为“绿色”问题,我们深表歉意......

我已通过 CocoaPods 成功整合了 Google AdMob SDK。

我的 pod 文件如下所示:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'

所以我的 Podfile 应该自动“抓取”比 7.0 版本“更新”的任何版本。

我仍在开发我的应用程序,当我在物理设备上运行测试时,我会在控制台中看到此类消息:

You are currently using version 7.8.0 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes. The latest SDK can be downloaded from ....

因此,我通过终端运行 Podinstall 命令,目标是保存我的开发应用的最新 Xcode 项目的相关目录,并将所有相关的 Google 移动广告 SDK 更新到当前版本。

我猜虽然我的应用程序没有“上线”,但我的 Podfile 在自动更新方面基本上处于非事件状态。

问题:如果我今天将项目上传到 App Store,并将 Podfile 更新为最新的 Google AdMob SDK 版本,此后它会自动将我的项目更新为最新版本吗?我的 Podfile 中的三 (3) 行代码足够吗?

如果这是一个非常基本的问题,请提前表示非常感谢和歉意;)

最佳答案

我自己对 CocoaPods 还很陌生,所以我并不是 100% 理解你的意思

“我想虽然我的应用程序没有‘上线’,但我的 Podfile 在自动更新方面基本上处于非事件状态。”

我相信要更新您的 Pod,您需要运行 Update 命令,它不会自动更新。

如果我今天将项目上传到 App Store,并将 Podfile 更新为最新的 Google AdMob SDK 版本,此后它会自动将我的项目更新为最新版本吗?

我认为不行,您需要运行 podUpdate。

我的 Podfile 中的三 (3) 行代码足够吗?

应该是

这就是我的 pod 文件的样子

  # Uncomment this line to define a global platform for your project
  # platform :ios, '9.0'

  target 'MyGame (iOS)' do
  # Comment this line if you're not using Swift and don't want to use     dynamic frameworks
  use_frameworks!

   pod 'Google-Mobile-Ads-SDK', '~> 7.0'
   pod 'ChartboostSDK'

   # Pods for MyGame (iOS)

   target 'MyGame (iOS) Tests' do
   inherit! :search_paths
   # Pods for testing
   end

 end

CocoaPods 最近实际上发布了一款适用于 OSX 的应用程序,这使得使用它变得更加容易

https://cocoapods.org/app

要了解更多更新与安装的信息,您应该阅读本文。

https://guides.cocoapods.org/using/pod-install-vs-update.html

或者来自 ray wenderlich 的精彩快速教程

https://www.raywenderlich.com/97014/use-cocoapods-with-swift

希望这有帮助

关于ios - Google AdMob Podfile - 手动与自动版本更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37318982/

相关文章:

ios - heightForRowAtIndexPath 中的线程问题

ios - 无法在方向更改时调整 AdMob View 的大小

ios - Objective-c:自定义键盘/输入 View 上的 Siri

ios - Swift 3 - 用于 selectionIndicatorImage 的 UITabBarItem 的全宽

swift - UIApplication.shared.delegate.persistentContainer.viewContext 为零?

swift - 默认情况下,iOS 应用程序支持目录存在于设备上

android - 如何正确更新这个 cordova 插件? (执行() CallbackContext PluginResult)

cordova - Cordova AdMob 插件实现

ios - 使用 AVFoundation 获取视频的持续时间

ios - facebook sdk(iOS) 是否支持 ipv6?