在设备上构建失败,退出代码为1 [英] Build on device fails with exit code 1
问题描述
我成功构建了一个应用程序.稍作更改后,在模拟器上的构建和运行仍然可以按预期正常运行,但是使用我的物理设备进行的构建和运行意外失败:
PhaseScriptExecution [CP] \ Embed \ Pods \ Frameworks/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Intermediates/WhagooAppFramework.Build/Debug-iphoneos/WhaCoB2E2A.B2E6C.E2SHcd"/Users/oliverapel/Dropbox/WhaGoO/Project WhaGoO/App.iOS/development"/bin/sh -c/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Intermediates/WhagooAppFramework.build/Debug-iphoneos/WhagooAppFramework.build/Script-26D4BA954C72P.
mkdir -p/用户/oliverapel/库/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworksrsync -av --filter-CVS/" --filter-.svn/" --filter-.git/" --filter-.hg/" --filter-标头" --filter-PrivateHeaders"--filter"-Modules"/用户/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/Alamofire/Alamofire.framework"/Users/oliverapel/Library/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks正在建立档案清单...完成Alamofire.framework/
已发送147个字节,已接收26个字节346.00个字节/秒总大小为1073519,加速率为6205.31使用身份iPhone开发人员的代码签名/用户/oliverapel/库/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework/usr/bin/codesign --force --sign B68B8D50CF4B9D2517527291D6F3D051423B194F --preserve-metadata = identifier,entitles"/用户/oliverapel/库/开发人员/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexhtjfdaw.app/Frameworks/Alamofire.framework"/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework:用户取消了该操作.命令/bin/sh失败,退出代码为1
在最后一行中,我看到用户取消了该操作.
,但是我什么也不做.
我已经清理了构建文件夹,删除了派生数据,现在我不知道该怎么办.
尝试从首选项更新证书->帐户->选择开发人员帐户并选择适当的团队->查看详细信息->下载所有配置文件.
此外,请尝试使用Cmd + Shift + Alt + K进行深度清洁.确保在常规设置中选择了正确的开发人员团队.
此外,将设置"更改为自动".这样它将自动获取正确的证书.
之后,转到构建阶段->链接二进制框架->添加所需的框架.对您拥有的所有目标执行此操作.
尝试一下,让我知道是否仍然出现错误.
希望有帮助.
I build an app successfully. After changing a bit, the build and run on simulator works still fine as expected, but the build and run with my physical device fails unexpected:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Intermediates/WhagooAppFramework.build/Debug-iphoneos/WhagooAppFramework.build/Script-26D4B954E53A2CB72C219E1A.sh cd "/Users/oliverapel/Dropbox/WhaGoO/Project WhaGoO/App.iOS/development" /bin/sh -c /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Intermediates/WhagooAppFramework.build/Debug-iphoneos/WhagooAppFramework.build/Script-26D4B954E53A2CB72C219E1A.sh
mkdir -p /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/Alamofire/Alamofire.framework" "/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks" building file list ... done Alamofire.framework/
sent 147 bytes received 26 bytes 346.00 bytes/sec total size is 1073519 speedup is 6205.31 Code Signing /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework with Identity iPhone Developer: Oliver Apel (W65P7YG9ZK) /usr/bin/codesign --force --sign B68B8D50CF4B9D2517527291D6F3D051423B194F --preserve-metadata=identifier,entitlements "/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework" /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework: User canceled the operation. Command /bin/sh failed with exit code 1
In the last line I see user canceled the operation.
but I do nothing like this.
I already cleaned build folder, removed derived data and now I don´t know what to do.
Try updating Certificates from Preference -> Accounts -> Choose developer account and Proper Team -> View Details -> Download all profiles.
Also, try doing Deep clean using Cmd+Shift+Alt+K. Make sure you have selected correct developer team in your general settings.
Also, Change Provisioning to Automatic. So that it will automatically fetch proper certificates.
After that, Goto Build Phases ->Link Binary frameworks-> Add Frameworks you want. Do this for all targets that you have.
Try this and let me know if error still occurs.
Hope it helps..
这篇关于在设备上构建失败,退出代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!