我正在编写一个shell脚本,它可以帮助我自动运行我的xcode ios项目并在模拟器上启动它的构建。按照现在,我可以在模拟器上构建我的xcode项目,启动模拟器和自动安装应用程序。但无法在模拟器上启动应用程序,启动模拟器后发生应用程序崩溃并抛出错误,
Build Begin
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/username
ONLY_ACTIVE_ARCH = YES
=== BUILD TARGET BuddyAdmin OF PROJECT BuddyAdmin WITH CONFIGURATION Debug ===
Check dependencies
** BUILD SUCCEEDED **
Instruments Usage Error : No template (-t) specified
instruments, version 6.3 (57536)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
An error was encountered processing the command (code=4):
The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.)
Build End
logout
我的剧本是,
#!/bin/bash
echo Build Begin
xcodebuild -project /Users/username/Work/My_Projects/BuddyProjects/BuddyAdmin/BuddyAdmin.xcodeproj -configuration Debug -target BuddyAdmin ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=/Users/username
xcrun instruments -w "iPad 2 (8.3 Simulator)"
xcrun simctl install booted /Users/username/Buddy\ Admin\ 3.app
xcrun simctl launch booted prefix.com.coname.proname
echo Build End
我无法找出确切的错误。没有任何记录。我搜索了很多,我找到了独特的答案,重置模拟器,清洁项目和干净的派生数据,但它不适合我。我正在寻找错误和解决方案的实际原因。
答案 0 :(得分:0)
我今天遇到过这个问题,最后通过将我的包ID封装到“”,即“prefix.com.coname.proname”中来解决这个问题,而且字符串区分大小写。 :)