在升级到ElCapitán为我的Meteor应用程序后,我遇到了无法通过Xcode iOS模拟器登录的问题。我重新安装了Xcode,但这似乎没有帮助。
然后我从我的Meteor应用程序(cordova-plugin-statusbar@1.0.1,ionic-plugin-keyboard@1.0.4)中删除了我的cordova插件,清除了.meteor / local / cordova-plugins,然后转到了测试我的应用程序:
Marks-MacBook-Air:meteor markshust$ meteor run ios-device --settings settings/dev.json --verbose
Adding platform iOS to Cordova project
=> Errors executing Cordova commands:
While adding platform iOS to Cordova project:
Cordova error: CordovaError: Failed to fetch platform ios
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: cordova-ios@3.9.2
at /Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/platform.js:270:25
at _rejected (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:797:24)
at /Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:823:30
at Promise.when (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:741:41)
at /Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:557:44
at flush (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:448:13)
(If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again with the --verbose option to help diagnose the issue.)
所以,我继续安装了cordova-ios和ios-deploy:
Marks-MacBook-Air:meteor markshust$ npm install -g cordova-ios ios-deploy
-
> ios-deploy@1.8.2 preinstall /usr/local/lib/node_modules/ios-deploy
> ./src/check_reqs.js && xcodebuild
=== BUILD TARGET ios-deploy OF PROJECT ios-deploy WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
Write auxiliary files
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-project-headers.hmap
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy.hmap
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-own-target-headers.hmap
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-all-non-framework-target-headers.hmap
/bin/mkdir -p /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.LinkFileList
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-generated-files.hmap
write-file /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-all-target-headers.hmap
CompileC build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.o src/ios-deploy.c normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /usr/local/lib/node_modules/ios-deploy
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=214 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/zf/wj73wl2d71z5d7n2bdrw78mh0000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -fvisibility=hidden -Wno-sign-conversion -iquote /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-generated-files.hmap -I/usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-own-target-headers.hmap -I/usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-all-target-headers.hmap -iquote /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/ios-deploy-project-headers.hmap -I/usr/local/lib/node_modules/ios-deploy/build/Release/include -I/usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/DerivedSources/x86_64 -I/usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/DerivedSources -F/usr/local/lib/node_modules/ios-deploy/build/Release -x objective-c -fno-objc-arc -MMD -MT dependencies -MF /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.d --serialize-diagnostics /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.dia -c /usr/local/lib/node_modules/ios-deploy/src/ios-deploy.c -o /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.o
Ld build/Release/ios-deploy normal x86_64
cd /usr/local/lib/node_modules/ios-deploy
export MACOSX_DEPLOYMENT_TARGET=10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/usr/local/lib/node_modules/ios-deploy/build/Release -F/usr/local/lib/node_modules/ios-deploy/build/Release -filelist /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy.LinkFileList -mmacosx-version-min=10.8 -framework MobileDevice -F/System/Library/PrivateFrameworks -fobjc-arc -fobjc-link-runtime -framework Foundation -framework CoreFoundation -Xlinker -dependency_info -Xlinker /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/ios-deploy_dependency_info.dat -o /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
GenerateDSYMFile build/Release/ios-deploy.dSYM build/Release/ios-deploy
cd /usr/local/lib/node_modules/ios-deploy
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy -o /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy.dSYM
** BUILD SUCCEEDED **
/usr/local/bin/ios-deploy -> /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
cordova-ios@3.9.2 /usr/local/lib/node_modules/cordova-ios
ios-deploy@1.8.2 /usr/local/lib/node_modules/ios-deploy
然而,在我安装这两个软件包后,我遇到了同样的错误:
Marks-MacBook-Air:meteor markshust$ meteor run ios-device --settings settings/dev.json --verbose
Adding platform iOS to Cordova project
=> Errors executing Cordova commands:
While adding platform iOS to Cordova project:
Cordova error: CordovaError: Failed to fetch platform ios
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: cordova-ios@3.9.2
at /Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/platform.js:270:25
at _rejected (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:797:24)
at /Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:823:30
at Promise.when (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:741:41)
at /Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:557:44
at flush (/Users/markshust/.meteor/packages/meteor-tool/.1.1.10.12lm5ls++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:448:13)
(If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again with the --verbose option to help diagnose the issue.)
任何人都知道发生了什么事吗?它抱怨它找不到版本cordova-ios@3.9.2,但它显然是全球安装的。
我也试过卸载全局包:
npm uninstall -g cordova-ios ios-deploy
然后删除&将ios添加回流星平台:
meteor remove-platform ios
meteor add-platform ios
但我仍然收到同样的错误:
=> Errors executing Cordova commands:
While adding platform iOS to Cordova project:
Cordova error: Failed to fetch platform ios
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: cordova-ios@3.9.2
(If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again with the --verbose option to help diagnose the issue.)
答案 0 :(得分:12)
我遇到了同样的问题,只是删除.cordova目录修复它
var min = shipNode.boundingBox.min
var max = shipNode.boundingBox.max
let w = CGFloat(max.x - min.x)
let h = CGFloat(max.y - min.y)
let l = CGFloat(max.z - min.z)
let boxShape = SCNBox (width: w , height: h , length: l, chamferRadius: 0.0)
let shape = SCNPhysicsShape(geometry: boxShape, options: nil)
shipNode.physicsBody!.physicsShape = SCNPhysicsShape(geometry: boxShape, options: nil)
shipNode.physicsBody = SCNPhysicsBody.dynamic()
答案 1 :(得分:2)
我刚刚开始在几个小时前遇到同样的问题。
我能够通过吹掉我的${HOME}/.cordova
目录来解决这个问题,该目录似乎保留了以前下载的cordova-ios
版本的缓存。我有一个3.9.1版本(不是3.9.2)版本。删除该目录并重做cordova platform add iOS
命令后,一切正常。我无法解释为什么会有效......但希望它能让其他人重新开始工作。
答案 2 :(得分:0)
在真实设备上运行后也遇到了类似的问题,只需从笔记本电脑上拔下手机就可以了。有打开的issue here