だから、私はcocoapodsによって作成されたターゲットにフォルダ参照を追加しようとしています。
私はこの解決策を見つけましたが、それは私にとってはうまくいきません。https://github.com/CocoaPods/CocoaPods/issues/3521
私はココアポッド0.39を使用しています。そして、それが非推奨projects
になったpods_project
ので、私はに変更しただけです。
また、実行時にログを有効にするにはどうすればよいですかpod update
。試しましたpod update --verbose
が、puts
表示されません。:/
===========更新===========
post_install do |installer|
puts "printing tests"
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == "TargetWhereToAddTheFolderOrFileReference"
source_files = target.source_build_phase.files
folderReference = installer.project.add_file_reference("/AbsolutePath/To/FileOrFolder", installer.project.pod_group("PodGroupWhereToAddTheFileOrFolder"), true)
target.source_build_phase.add_file_reference(btsdata, true)
end
end
end
end
post_install do |installer|
// another post install script is here.
end
失敗しているスクリプトを添付しましたが、その下に別のpost_installスクリプトがありました。それputs "printing tests"
も呼ばれていません…。
===========更新された終了===========
ああ、スクリプトは最後のpost_installのみを実行し、両方は実行しないと思います。最初のpost_install内のコードを最後のコードに入れることはできますか?
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加