I have a shell script "dopack.sh" which contains the following lines:
# clean project first
xcodebuild clean -sdk "${TARGET_SDK}" -configuration "${TARGET_CONFIG}"
# start build project
xcodebuild -workspace "${PROJECT_NAME}.xcworkspace" -scheme "${PROJECT_NAME}" SYMROOT="${BUILD_DIR}" -configuration "${TARGET_CONFIG}" -sdk "${TARGET_SDK}" > "${SHELLLOGFILE}"I also have a php script "testpack.php":
<?php
$result = exec('/absolute-path-to/dopack.sh Release');
if ($result) {
echo 'YES';
} else {
echo 'NO';
}
?>These two scripts works perfectly fine with me for more than two years. It works fine with Xcode5.x to Xcode6.4.
But when i upgraded my Xcode to 7.0, strange things occured.
When i ran the following commmand directly in Terminal, it worked fine and reached the line "** BUILD SUCCEEDED **"
xcodebuild -workspace "${PROJECT_NAME}.xcworkspace" -scheme "${PROJECT_NAME}" SYMROOT="${BUILD_DIR}" -configuration "${TARGET_CONFIG}" -sdk "${TARGET_SDK}"And when i execute the php script directly in Terminal, it also worked perfectly fine
php testpack.phpBut when i ran testpack.php on my apache server, i got the following errors:
[MT] IBPlatformTool: *** Failed to launch tool with description <IBCocoaTouchPlatformToolDescription: 0x7f860bbddbb0> System content 1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed to find or create execution context for description <IBCocoaTouchPlatformToolDescription: 0x7f860bbddbb0> System content 1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime : 9.0 (13A340) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 (Failure reason: Failed to create SimDeviceSet at path /Users/wangruicheng/Library/Developer/Xcode/UserData/IB Support/Simulator Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator to see why creating the SimDeviceSet failed.)I even deleted all of the xib files in my project , yet still cann't get the right output:
builtin-validationUtility /absolute-path-to/PROJECT_NAME.app -validate-for-store
error: Failed to read Info.plist of app /absolute-path-to/PROJECT_NAME.app (Couldn't load Info dictionary for <DVTFilePath:0x7fb00a6a9910:'/absolute-path-to/PROJECT_NAME.app'>)The user i configed in Apache's httpd.conf is just the same as the user i ran command "php testpack.php".
Any workaround or hint will be greatly appreciated. And i'm sorry for my poor english in advance.