2017-05-28 4 views
1

私は、いくつかのポッドを利用するプライベートフレームワークを作成しました。私は現在、このフレームワーク(podspecファイルを持っています)をCocoapodsを使ってプロジェクトで使用したいと考えています。プロジェクトのポッドファイル内にプライベートフレームワーク(ポッドあり)を使用

私は多くの時間を検索しましたが、実際の例は見つかりませんでした。私のユースケースは複数のアプリケーションを作成していることですが、これらのアプリケーションは多くのコードとアセット(ストーリーボード、ファイルなど)を共有しています。したがって、フレームワークにはこれらの共通コンポーネントがすべて含まれており、各アプリターゲットで使用する必要があります。

私は現在、これを持っているが、それはそれが必要として動作しません:

platform :ios, '9.0' 
use_frameworks! 
workspace 'Project.xcworkspace' 

def shared_pods 
    pod 1 
    pod 2 
    pod 3 
end 

target 'Target1' do 
    shared_pods 
end 

target 'Target2' do 
    shared_pods 
end 

target 'MyPrivateFramework' do 
    project 'MyPrivateFrameworkDirectory/MyPrivateFramework.xcodeproj' 
    shared_pods 
end 

target 'TestsTarget' do 
    inherit! :search_paths 
    # Pods for testing 
end 

私が受け取る警告がある:

[!] The Podfile contains framework targets, for which the Podfile does not contain host targets (targets which embed the framework). 
If this project is for doing framework development, you can ignore this message. Otherwise, add a target to the Podfile that embeds these frameworks to make this message go away (e.g. a test target). 

答えて

関連する問題