2

tl;dr; how to use old (what shouldn't use use_frameworks!) and new pods together in podfile?
I had working podfile:

platform :ios, '8.0'
use_frameworks!

    target 'myApp' do
        pod 'Alamofire', '1.3.1'
        pod 'SwiftyJSON', '~> 2.2.1'
    end

Then I added OneSignal pod according to documentation link
So my pod file changed to:

platform :ios, '8.0'
use_frameworks!

target 'myApp' do
    pod 'Alamofire', '1.3.1'
    pod 'SwiftyJSON', '~> 2.2.1'
    pod 'OneSignal'
end

I updated pods and run build - got error:

ld: framework not found OneSignal
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I checked OneSignal pod and it looks differently compared to others: enter image description here
Thats probably because is old style objective-c framework.
I can add this framework manually to my project but I wonder how to make it work properly with cocoapods? This issue relates to my problem I think https://github.com/CocoaPods/CocoaPods/issues/3338


Update
I'm currently using Xcode 6.4

4

1 に答える 1

2

Xcode のどのバージョンを使用していますか?

Alamofire と SwiftyJSON の両方の最新リリース バージョンに更新し、Xcode 7 でビルドすると、ビルド エラーが修正されるはずです。

platform :ios, '8.0'
use_frameworks!

target 'myApp' do
    pod 'Alamofire', '2.0.2'
    pod 'SwiftyJSON', '~> 2.3.0'
    pod 'OneSignal'
end
于 2015-09-28T21:03:06.427 に答える