我有多个目标的项目(质量检查,分期等等)。所有目标都包含动态框架(比方说捆绑标识符:com.sdk.demosdk)。对于某些目标,我使用的是带有一些预处理器标志(干净)的sdk,对于其他目标,则是使用不同的标志进行编译的。
例如: 进行质量检查-我正在使用sdkFull 进行质量检查-我正在使用sdkClean
但两者具有相同的捆绑包标识符。
但是无论如何,对于测试目标,我总是运行包含sdkClean的目标。
我正在使用Fastlane scan
从Jenkins管道运行测试。参见下面的代码:
lane :testify do |options|
app = options[:app]
podinstall
scan(
scheme: "DemoTests_" << app,
code_coverage: true,
xcargs: "OTHER_SWIFT_FLAGS='$(inherited) \"-D\" \"COCOAPODS\" -DAUTHENTICATION_PRODUCTION -Dappstore'",
output_directory: "./fastlane/test_output_" << app,
device:"iPhone 8"
)
end
有时我会遇到以下错误:
2018-07-17 02:48:23.975 xcodebuild [82663:24489158]错误 Domain = IXUserPresentableErrorDomain代码= 1“此应用无法 此时已安装。” UserInfo = {NSLocalizedDescription =此应用程序 目前无法安装。NSUnderlyingError= 0x7fa8106dab80 {Error Domain = MIInstallerErrorDomain代码= 57“找到了位于 /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdkCleanAPI.framework 具有与捆绑包相同的标识符(com.sdk.demosdk) /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdk.framework” UserInfo = {LegacyErrorString = DuplicateIdentifier, FunctionName =-[MIInstallableBundle performPreflightWithError:], SourceFileLine = 391,NSLocalizedDescription =在以下位置找到了包 /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdkCleanAPI.framework 具有与捆绑包相同的标识符(com.sdk.demosdk) /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdk.framework}}} 2018-07-17 02:48:23.975 xcodebuild [82663:24489158]错误 域= IDETestOperationsObserverErrorDomain代码= 6“早期意外 退出,操作从未完成引导-不会重新启动 已尝试“ UserInfo = {NSLocalizedDescription =早期意外退出, 操作从未完成引导-不会尝试重新启动, NSUnderlyingError = 0x7fa8156bf370 {错误 Domain = IXUserPresentableErrorDomain代码= 1“此应用无法 此时已安装。” UserInfo = {NSLocalizedDescription =此应用程序 目前无法安装。NSUnderlyingError= 0x7fa8106dab80 {Error Domain = MIInstallerErrorDomain代码= 57“找到了位于 /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdkCleanAPI.framework 具有与捆绑包相同的标识符(com.sdk.demosdk) /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdk.framework” UserInfo = {LegacyErrorString = DuplicateIdentifier, FunctionName =-[MIInstallableBundle performPreflightWithError:], SourceFileLine = 391,NSLocalizedDescription =在以下位置找到了包 /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdkCleanAPI.framework 具有与捆绑包相同的标识符(com.sdk.demosdk) /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdk.framework}}}}}
测试失败:测试目标ShindanTests_DemoApp遇到错误 (早期意外退出,操作从未完成自举-否 将尝试重新启动。潜在错误:错误 Domain = IXUserPresentableErrorDomain代码= 1“此应用无法 此时已安装。” UserInfo = {NSLocalizedDescription =此应用程序 目前无法安装。NSUnderlyingError= 0x7fa8106dab80 {Error Domain = MIInstallerErrorDomain代码= 57“找到了位于 /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdkCleanAPI.framework 具有与捆绑包相同的标识符(com.sdk.demosdk) /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdk.framework” UserInfo = {LegacyErrorString = DuplicateIdentifier, FunctionName =-[MIInstallableBundle performPreflightWithError:], SourceFileLine = 391,NSLocalizedDescription =在以下位置找到了包 /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdkCleanAPI.framework 具有与捆绑包相同的标识符(com.sdk.demosdk) /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app /Frameworks/demosdk.framework}}}) **测试失败**
我尝试了几种清理脚本,例如:
rm -rf -r ~/Library/Developer/Xcode/DerivedData
rm -rf $(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache
rm -rf -r ~/Library/Caches/com.apple.dt.Xcode
xcrun simctl uninstall booted com.cellebrite.shindan
杀死事件模拟器过程并重新启动它,但有时还是成功,有时却不成功...
谁能帮助我了解可以做什么?