CocoaPod 1.9.3: Как устранить предупреждение APPLICATION_EXTENSION_API_ONLY?

#ios #cocoapods

#iOS #кокосовые стручки #cocoapods

Вопрос:

Я застрял с этим и надеюсь, что кто-нибудь сможет помочь. Как я могу удалить / разрешить эти предупреждения, пожалуйста?

 def shared_pods
  pod 'SSZipArchive'
  pod 'KeychainAccess'
  pod 'SwiftyBeaver'
end

target 'myApp' do
  platform :ios, '11.0'
  use_frameworks!
  shared_pods

  pod 'IQKeyboardManagerSwift'
  pod 'Firebase/Analytics'
  pod 'Firebase/Crashlytics'
  pod 'FacebookSDK/CoreKit'
  pod 'FacebookSDK/ShareKit'
  pod 'Google-Mobile-Ads-SDK'
  pod 'GoogleMobileAdsMediationAdColony'
  pod 'GoogleMobileAdsMediationIronSource'
  pod 'OpenVPNAdapter', :git => 'https://github.com/ss-abramchuk/OpenVPNAdapter.git', :tag => '0.7.0'
  target 'myAppTests' do
    inherit! :search_paths
  end

  target 'myAppUITests' do
  end

  target 'tunnel-ios' do
    pod 'OpenVPNAdapter', :git => 'https://github.com/ss-abramchuk/OpenVPNAdapter.git', :tag => '0.7.0'
  end
end
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
     end
  end
end
  

Я получаю эти предупреждения:

 [!] The `myApp [Debug]` target overrides the `APPLICATION_EXTENSION_API_ONLY` build setting defined in `Pods/Target Support Files/Pods-myApp/Pods-myApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `myApp [Release]` target overrides the `APPLICATION_EXTENSION_API_ONLY` build setting defined in `Pods/Target Support Files/Pods-myApp/Pods-myApp.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `myAppTests [Debug]` target overrides the `APPLICATION_EXTENSION_API_ONLY` build setting defined in `Pods/Target Support Files/Pods-myAppTests/Pods-myAppTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `myAppTests [Release]` target overrides the `APPLICATION_EXTENSION_API_ONLY` build setting defined in `Pods/Target Support Files/Pods-myAppTests/Pods-myAppTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.
  

Ответ №1:

На основе https://github.com/CocoaPods/CocoaPods/issues/9233 похоже, что вы можете переопределить APPLICATION_EXTENSION_API_ONLY настройку с помощью файла xcconfig вместо скрипта post_install, чтобы избежать предупреждения.