在我的podfile中,我使用後安裝掛鉤將構建階段腳本添加到Pods項目目標並構建每個目標。我遇到的問題是我是我使用在podfile中構建目標post_install鉤子
system "xcodebuild -target #{target.name} -sdk iphonesimulator"
,因爲我在爲反對莢項目由podfile產生並傳遞到安裝後的豆莢目錄正在建設當前莢項目鉤。所以我想知道是否有人遇到了可以在post_install鉤子中構建目標的方法或ruby gem?我一直在嘗試幾天,並沒有找到任何解決方法,我能找到的唯一解決方案意味着運行pod安裝兩次,首先添加腳本並整合項目,然後構建目標以運行那些小於理想。
post_install do | installer |
installer.project.targets do |target|
// adding build script to target
target.build() <-- this is what i need, some way to build this target.
end
end
謝謝。
或者替代方案是實施後期整合掛鉤,而不是後期安裝掛鉤。我試圖用一個線程,我把睡覺一段時間,讓整合的機會完成,但如果我使用thread.join整合階段不會完成,直到線程已被執行,並沒有線程.join程序剛剛結束執行,線程從未調用過。 – user