【问题标题】:Xcode-beta error when try emulate with Ionic尝试使用 Ionic 进行模拟时出现 Xcode-beta 错误
【发布时间】:2015-06-19 13:22:32
【问题描述】:

我正在尝试开始使用 Ionic,但是当我使用“ionic emulate ios”进行模拟时,控制台会显示这个 问题:

No target specified for emulator. Deploying to iPhone-6 simulator
2015-06-19 10:07:59.674 ios-sim[771:9114] stderrPath:   /Users/damivazbien/myApp/platforms/ios/cordova/console.log
2015-06-19 10:07:59.674 ios-sim[771:9114] stdoutPath:  /Users/damivazbien/myApp/platforms/ios/cordova/console.log
2015-06-19 10:08:00.753 ios-sim[771:9114] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-8114.19/DVTFoundation/PlugInArchitecture/PlugInManager/DVTPlugInManager.m:257
Details:  Requested but did not find extension point with identifier Xcode.DVTFoundation.DevicePlatformMapping
Object:   <DVTPlugInManager: 0x7fe8faca4b50>
Method:   -extensionPointWithIdentifier:
Thread:   <NSThread: 0x7fe8fac105e0>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning  message and any useful information you can provide.
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain  Code=2 "Timed out waiting for device to boot" UserInfo=0x7fe8fad0c7a0  {NSLocalizedDescription=Timed out waiting for device to boot}
Error code 1 for command: ios-sim with args: launch,/Users/damivazbien/myApp/platforms/ios/build/emulator/myApp.app,-- devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,-- stderr,/Users/damivazbien/myApp/platforms/ios/cordova/console.log,-- stdout,/Users/damivazbien/myApp/platforms/ios/cordova/console.log,--exit
Error: /Users/damivazbien/myApp/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

现在我已经安装了最后一个 Xcode 测试版

【问题讨论】:

    标签: ionic


    【解决方案1】:

    您是否检查了标准错误日志中的详细信息?

    %project_name%/platforms/ios/cordova/console.log
    

    如果你使用ios9模拟器看到白屏,可能是你遇到了ios9强制使用https的问题。

    肮脏的方式只是更新到 xcode 项目配置 plist 以禁用 ATS

    platforms/ios/%project_name%/%project_name%-Info.plist 
    

    您可以通过将其添加到配置文件来禁用 Apple Transport Security

    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
    </dict>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string></string>
    

    【讨论】:

    • 他的模拟器无法启动。这不是构建或应用程序运行时错误。我不认为 Apple Transport Security 与它有任何关系。
    【解决方案2】:

    使用 Xcode 7 SDK 构建时,我在 Xamarin Studio 中收到类似的错误消息。您是否尝试过在 Xcode 6.3.2 上运行,或者您是否有其他充分理由使用 Xcode 7 beta 运行 Ionic?

    根据我的经验,在尝试新工具时最好让您的环境尽可能熟悉,这样会发生不熟悉的事情,因此更容易排除故障。

    【讨论】:

    • 有可能 OP 安装了 OSX 10.11 beta,这意味着 OP 只能运行 Xcode 7 beta,Xcode 6 与 El Capitan 不兼容。我做了同样的事情,并且在 RubyMotion 中收到同样的错误。
    • 发现我可以暂时将以下内容添加到我的 RubyMotion Rakefile 中:app.info_plist['NSAppTransportSecurity'] = { 'NSAllowsArbitraryLoads' =&gt; true }。必须记住做正确的事情并为 info.plist 添加适当的例外以进行生产构建。
    猜你喜欢
    • 2023-03-09
    • 1970-01-01
    • 1970-01-01
    • 2015-10-07
    • 2022-12-29
    • 2021-09-05
    • 2020-05-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多