Apple Watch App在模拟器上运行,但不在物理设备上运行

时间:2015-09-16 14:36:47

标签: swift ios9 xcode7 apple-watch

我正在开发一个相对简单的苹果手表应用程序,它有两个界面控制器。

enter image description here

当我部署到手表模拟器时,一切都按预期工作。但是,自从更新到Xcode 7,iOS 9和WatchOS2 GM种子后,该应用程序不再运行在物理苹果手表上。它将启动,显示加载屏幕约10秒,然后在设备日志中显示以下消息:

Sep 16 09:21:23 Andrews-AppleWatch iap2d[168] <Warning>: process com.AndrewMoore.PhotoGauge.watchkitapp is now running the foreground
Sep 16 09:21:24 Andrews-AppleWatch pkd[127] <Warning>: assigning plug-in com.AndrewMoore.PhotoGauge.watchkitapp.watchkitextension(1.0) to plugin sandbox
Sep 16 09:21:24 Andrews-AppleWatch pkd[127] <Warning>: enabling pid=92 for plug-in com.AndrewMoore.PhotoGauge.watchkitapp.watchkitextension(1.0) 3E32E3AC-0701-49E8-9BEE-56528EFDF3C7 /private/var/mobile/Containers/Bundle/Application/B54024B2-FED3-48A7-8F70-78C85C1C1DFB/PhotoGauge WatchKit App.app/PlugIns/PhotoGauge WatchKit Extension.appex
Sep 16 09:21:24 Andrews-AppleWatch kernel[0] <Notice>: xpcproxy[239] Container: /private/var/mobile/Containers/Data/PluginKitPlugin/9BDCD39E-15AE-4019-A8D8-784A321EAF17 (sandbox)
Sep 16 09:21:24 Andrews-AppleWatch PhotoGauge WatchKit App[238] <Warning>: Requested a built-in font <UICTFont: 0x27b070> font-family: "Symbol"; font-weight: normal; font-style: normal; font-size: 26.00ptg. Substituting system font
Sep 16 09:21:24 Andrews-AppleWatch PhotoGauge WatchKit App[238] <Warning>: Requested a built-in font <UICTFont: 0x27b070> font-family: "Symbol"; font-weight: normal; font-style: normal; font-size: 26.00ptg. Substituting system font
Sep 16 09:21:24 Andrews-AppleWatch PhotoGauge WatchKit App[238] <Warning>: Requested a built-in font <UICTFont: 0x27b070> font-family: "Symbol"; font-weight: normal; font-style: normal; font-size: 26.00ptg. Substituting system font
Sep 16 09:21:24 Andrews-AppleWatch iap2d[168] <Warning>: process com.AndrewMoore.PhotoGauge.watchkitapp.watchkitextension is now running the foreground
Sep 16 09:21:30 Andrews-AppleWatch diagnosticd[66] <Error>: error evaluating process info - pid: 239, punique: 239
Sep 16 09:21:30 Andrews-AppleWatch ReportCrash[240] <Notice>: Formulating report for process[239] PhotoGauge WatchKit Extension
Sep 16 09:21:30 Andrews-AppleWatch UserEventAgent[22] <Notice>: jetsam: kernel termination snapshot being created
Sep 16 09:21:30 Andrews-AppleWatch gizmoappd[92] <Warning>: plugin com.AndrewMoore.PhotoGauge.watchkitapp.watchkitextension interrupted
Sep 16 09:21:30 Andrews-AppleWatch gizmoappd[92] <Warning>: plugin com.AndrewMoore.PhotoGauge.watchkitapp.watchkitextension invalidated
Sep 16 09:21:30 Andrews-AppleWatch gizmoappd[92] <Notice>: (Note ) WatchKit: -[SPGizmoAppServer notifyClientsExtensionTerminated:] Companion app extension died - killing gizmo app com.AndrewMoore.PhotoGauge.watchkitapp
Sep 16 09:21:30 Andrews-AppleWatch PhotoGauge WatchKit App[238] <Warning>: -[SPApplicationDelegate extensionDidTerminate:] WatchKit App killed by WatchKit daemon
Sep 16 09:21:30 Andrews-AppleWatch iap2d[168] <Warning>: process com.AndrewMoore.PhotoGauge.watchkitapp.watchkitextension is now terminated
Sep 16 09:21:30 Andrews-AppleWatch com.apple.xpc.launchd[1] (UIKitApplication:com.AndrewMoore.PhotoGauge.watchkitapp[0xaeb3][238]) <Warning>: Service exited with abnormal code: 1
Sep 16 09:21:30 Andrews-AppleWatch Carousel[30] <Warning>: Application 'UIKitApplication:com.AndrewMoore.PhotoGauge.watchkitapp[0xaeb3]' exited voluntarily.
Sep 16 09:21:30 Andrews-AppleWatch Carousel[30] <Warning>: Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
Sep 16 09:21:31 Andrews-AppleWatch iap2d[168] <Warning>: process com.AndrewMoore.PhotoGauge.watchkitapp is now switching to other state
Sep 16 09:21:31 Andrews-AppleWatch iap2d[168] <Warning>: process com.AndrewMoore.PhotoGauge.watchkitapp is now terminated
Sep 16 09:21:31 Andrews-AppleWatch UserEventAgent[22] <Warning>: 68344732102: id=com.AndrewMoore.PhotoGauge.watchkitapp pid=238, state=0
Sep 16 09:21:31 Andrews-AppleWatch ReportCrash[240] <Warning>: report not saved because it is non-actionable

我尝试过的事情:

  • 多次删除并重新安装应用
  • 尝试从Xcode部署后多次重新启动应用程序,以确保Xcode不仅因为某些原因而无法启动。
  • 仔细检查每个接口控制器This is correct
  • 上是否正确设置了类和模块
  • 确保iOS应用,Watch App和Watch App Extensions plist文件具有WKAppBundleIdentifier,WKCompanionAppBundleIdentifier等的正确值。
  • 仔细检查我的WatchKit扩展程序中的所有文件是否具有正确的目标成员资格

enter image description here

此时我真的没想到了。我的猜测是,有一些明显的简单事情我一定做错了,但我看不出来。

1 个答案:

答案 0 :(得分:3)

我已经解决了这个问题。应用程序无法启动的真正原因是因为它没有足够快地启动,因此守护程序终止了该进程。我的三个采摘者中的每一个都试图按顺序加载~20张图像。这对于模拟器来说很容易处理,但对于物理设备来说太过分了。

相关问题