[英]Using Cocoapods in iOS Framework and App Projects in the same workspace
[英]How to link a cocoapods cordova plugin src to a .framework header file when there's multiple xcode projects in the workspace?
獨特的情況是,這是一個Ionic應用程序,通過pod提取未編譯的插件源。 問題是,在編譯時,插件頭和實現無法找到.framework的頭文件/實現。 演示Cordova應用程序找到.framework,但它們只在一個項目中。
我已經嘗試了“未找到頭文件”的所有建議。
s.vendored_frameworks = 'ValidicMobile.framework
添加到podspec並執行pod update
接下來要嘗試什么? 將供應商.framework包裝在cocoapod中可以幫助插件找到框架,假設pod更適合鏈接嗎? 該插件需要在pod中導入其他Cordova框架,因此不確定我是否可以將src直接放在主應用程序中。
我不確定它是否適用於您的場景,但回過頭來我在podfile
為我的一個pod發布了PCH文件的podfile
。
platform :ios, '7.0'
pod 'A','7.4.1'
pod 'B', '0.3.1-beta2'
pod 'C', '0.6.5'
post_install do | installer |
print "Updating #{installer.sandbox.target_support_files_root}/Pods-A/A.pch\n"
open("#{installer.sandbox.target_support_files_root}/Pods-A/A.pch","a") do |file|
file.puts <<EOF
//your extra stuff goes here
#import "../../../A/Hacks/someExtraHeader1.h"
#import "../../../A/Hacks/someExtraHeader2.h"
EOF
end
end
這允許我在已經檢出pod install
所有源之后,在pod install
期間在pod級別上注入額外的頭部導入。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.