我已经安装了带有CocoaPods的FBSDK,但由于某些原因无法将其导入到AppDelegate.swft文件中.FBSDK工具包出现在我的Xcode项目中,所以我觉得它应该可以工作. 个
我无论如何都不是iOS开发人员,我只是想为Ffltter SDK编写一个简单的原生插件.有谁有主意吗?
--Here is what the pod file looks like--个
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end
target 'Runner' do
use_frameworks!
# Pods for Runner
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
if File.exists? '../.flutter-plugins'
flutter_root = File.expand_path('..')
File.foreach('../.flutter-plugins') { |line|
plugin = line.split(pattern='=')
if plugin.length == 2
name = plugin[0].strip()
path = plugin[1].strip()
resolved_path = File.expand_path("#{path}/ios", flutter_root)
pod name, :path => resolved_path
else
puts "Invalid plugin specification: #{line}"
end
}
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
---EDIT---个
我收到以下错误ATM:FBSDKCoreKit.framework: No such file or directory
.当我在Xcode中打开Frameworks文件夹时,所有文件名都是红色的:
个
But that exact folder in Finder is empty.所以我猜这就是显示错误的原因.问题是如何解决这个问题.
这是我的embedded binaries
和linked frameworks and libraries
在项目中的样子:
个