我有一个只有 Objective-C pod 的 podfile,看起来像这样:
source 'https://github.com/CocoaPods/Specs.git'
target "myProject" do
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GooglePlacePicker'
pod 'GoogleMaps'
pod 'RMMapper'
pod 'Parse'
pod 'Mapbox-iOS-SDK'
pod 'PocketSVG', '~> 0.7'
pod 'Fabric'
pod 'Answers'
pod 'lottie-ios'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
和一个看起来像这样的桥接头:
#import <Parse/Parse.h>
#import <GoogleMaps/GoogleMaps.h>
#import "PocketSVG.h"
#import <Lottie/Lottie.h>
现在,我想添加一个 Swift pod 的 Alamofire。所以我必须使用use_frameworks!
,我的 podfile 看起来像这样:
source 'https://github.com/CocoaPods/Specs.git'
target "myProject" do
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GooglePlacePicker'
pod 'GoogleMaps'
pod 'RMMapper'
pod 'Parse'
pod 'Mapbox-iOS-SDK'
pod 'PocketSVG', '~> 0.7'
pod 'Fabric'
pod 'Answers'
pod 'lottie-ios'
pod 'Alamofire' # Added
use_frameworks! # Added
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
但是当我尝试构建我的项目时,我得到了 2 个错误:
第一个在我的桥接头上:
找不到“PocketSVG.h”文件
第二个不在特定文件上:
导入桥接头失败
知道如何解决吗?