0
我已經通過CocoaPods將Tesseract iOS庫添加到我的Swift項目中,但是我想關閉模擬器上的開發代碼簽名。我已經在項目和我的目標上添加了「不要簽名」,但構建仍然有一個代碼簽名步驟。我的Podfile中還有一些代碼試圖關閉代碼簽名。如何關閉使用CocoaPods在第三方iOS框架上的代碼簽名?
在生成日誌,我看到
Code Signing /Users/ME/Library/Developer/Xcode/DerivedData/PROJECT-fchynlbfcpjfbcfaplehdrryfpqn/Build/Products/Debug-iphonesimulator/PROJECT.app/Frameworks/TesseractOCR.framework with Identity -
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements "/Users/ME/Library/Developer/Xcode/DerivedData/PROJECT-fchynlbfcpjfbcfaplehdrryfpqn/Build/Products/Debug-iphonesimulator/PROJECT.app/Frameworks/TesseractOCR.framework"
的podfile看起來是這樣的:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PROJECT' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'TesseractOCRiOS', :git => "[email protected]:gali8/Tesseract-OCR-iOS.git"
target 'PROJECTTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
end
你確定你試圖在模擬器或iPhone上運行嗎?你不需要對你的項目進行代碼簽名。如果你在模擬器中運行.code簽名只需要當你在device.i中測試你的項目時,我假設你使用Xcode 8.如果是,你必須手動爲代碼簽名你的pod項目。蘋果政策在Swift 3中改變了。當你使用豆莢時)。希望這有助於... – Joe
謝謝,喬。是的,它是Xcode 8和模擬器。它也是Swift的最新版本,正如我所提到的那樣,我使用了pod。我也認爲模擬器不需要代碼簽名,但我想我的Tesseract框架依賴性可能會強制它?這可能嗎?如果是這樣,我該如何關閉它? – karansag
檢查我的帖子。它可能會給你一個提示http://stackoverflow.com/questions/39945377/no-code-signature-found-after-pod-installed-in-xcode-8 – Joe