我在 Windows7 中使用 Visual Studio 2015 开发 Cordova 应用程序。
Mac 上的节点版本是 v5.1.0。
在 Mac 上运行 remotebuild 时,从 Visual Studio 开始构建。
在模拟器模式下,它似乎可以正确构建(msk.test.build.app 是在 'platforms/ios/build/emulator' 中创建的。)
在设备模式下,构建失败并出现以下错误。
我发现 'platforms/ios/build/device' 没有创建,但不知道如何修复。
Submitting new build request to: https://Macintosh.local:3000/cordova/build/tasks?command=build&vcordova=5.4.0&cfg=debug&options=--device&buildNumber=1403&loglevel=warn
------ new build: {"command":"build","vcordova":"5.4.0","cfg":"debug","options":"--device","buildNumber":"1403","loglevel":"warn","status":"Uploaded","buildCommand":"build","buildPlatform":"ios","configuration":"debug","buildLang":"ja-JP","buildDir":"/Users/User/.taco_home/remote-builds/taco-remote/builds/1403","logLevel":0,"submissionTime":"2015-11-18T21:38:43.650Z","changeList":null,"buildSuccessful":false,"messageArgs":null,"message":"Uploaded build request payload.","tgzFilePath":"/Users/User/.taco_home/remote-builds/taco-remote/builds/1403/upload_1403.tgz","appDir":"/Users/User/.taco_home/remote-builds/taco-remote/builds/1403/cordovaApp","statusTime":"2015-11-18T21:38:43.652Z"}
error - Build failed with error Command failed: /bin/sh -c xcrun -v -sdk iphoneos PackageApplication platforms/ios/build/device/msk.test.build.app -o /Users/User/.taco_home/remote-builds/taco-remote/builds/1403/cordovaApp/platforms/ios/build/device/BuildTest2.ipa
xcrun: note: PATH = '/Users/User/.taco_home/node_modules/taco-remote-lib/1.2.0/node_modules/taco-remote-lib/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:”/Applications/Adobe'
xcrun: note: SDKROOT = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk'
xcrun: note: TOOLCHAINS = ''
xcrun: note: DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer'
xcrun: note: XCODE_DEVELOPER_USR_PATH = ''
xcrun: note: xcrun_db = '/var/folders/_4/x16l03kx0mxbgd6w_5zp0y5w0000gn/T/xcrun_db'
xcrun: note: xcrun via PackageApplication (xcrun)
xcrun: note: database key is: PackageApplication|/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk||/Applications/Xcode.app/Contents/Developer|
xcrun: note: lookup resolved in '/var/folders/_4/x16l03kx0mxbgd6w_5zp0y5w0000gn/T/xcrun_db' : '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication'
MDAVSCLI : error : Specified application doesn't exist or isn't a bundle directory : 'platforms/ios/build/device/msk.test.build.app'
-------------------------------------
我在 Mac 上试过 node@0.12.7,效果更好,谢谢!
构建工作正常,.ipa 在 Windows/Mac 上都创建,但停止将应用程序安装到通过 USB 连接到 Windows 的我的 iphone。
Visual Studio 输出控制台如下所示(单词可能不同,因为我的是日语)。
:
:
1> ------ copying to project: iOS
2>------ start configuration: project: MSK App, composition:Debug iOS ------