在我的iOS应用程序上安装facebook SDK后出现了很多警告

Ale*_*289 6 facebook ios

我想在我的iOS应用程序上安装facebook SDK,以便使用Facebook帐户进行社交登录.但通过cocoapods安装后,它给了我很多警告信息.我正在使用Xcode 9.2.这是使用cocoapods安装时我的podfile上的代码

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

target 'facebook login firebase' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for facebook login firebase

pod 'Bolts'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'

end
Run Code Online (Sandbox Code Playgroud)

这是警告的屏幕截图 在此输入图像描述 https://ibb.co/kx5fCR (这里是链接,以防图像没有出现)

https://developers.facebook.com/docs/ios/getting-started 我在该文档的第4步,但警告出现了.那么这里出了什么问题?我错过了什么吗?

Ale*_*ylo 9

以下是将PodfileSwift SDK安装为静态库且没有警告的完整部分:

  pod 'Bolts', :modular_headers => true, :inhibit_warnings => true
  pod 'FacebookCore', :inhibit_warnings => true
  pod 'FacebookLogin', :inhibit_warnings => true
  pod 'FacebookShare', :inhibit_warnings => true
  pod 'FBSDKCoreKit', :modular_headers => true, :inhibit_warnings => true
  pod 'FBSDKLoginKit', :modular_headers => true, :inhibit_warnings => true
  pod 'FBSDKShareKit', :modular_headers => true, :inhibit_warnings => true
Run Code Online (Sandbox Code Playgroud)

如果您不想打扰个别抑制,请添加到您的顶部 Podfile

inhibit_all_warnings!
Run Code Online (Sandbox Code Playgroud)

此外,如果您正在使用框架

use_frameworks!
Run Code Online (Sandbox Code Playgroud)

那么您可以跳过为依赖项指定模块化头文件的需要

  pod 'FacebookCore'
  pod 'FacebookLogin'
  pod 'FacebookShare'
Run Code Online (Sandbox Code Playgroud)

回答当前截至Xcode 9.4/FacebookLogin 0.3.1/FBSDKLoginKit 4.35.0/Cocoapods 1.5.3


Alp*_*per 0

使用第三方代码时,此类警告很常见。要么在 Bolts 上游修复这个问题,要么接受它,因为它不会真正损害你的产品。