gpt4 book ai didi

swift - Apple Watch 应用程序在模拟器上运行,但不在物理设备上运行

转载 作者:搜寻专家 更新时间:2023-10-31 22:34:42 26 4
gpt4 key购买 nike

我正在开发一个相对简单的 Apple Watch 应用程序,它有两个界面 Controller 。

enter image description here

当我部署到 watch 模拟器时,一切都按预期进行。但是,自从更新到 Xcode 7、iOS 9 和 WatchOS2 GM seed 后,该应用程序不再在实体 Apple Watch 上运行。它将启动,显示加载屏幕约 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 由于某种原因未能启动。
  • 仔细检查每个接口(interface) Controller 上的类和模块是否正确设置This is correct
  • 确保 iOS 应用、Watch 应用和 Watch 应用扩展 plist 文件具有正确的 WKAppBundleIdentifier、WKCompanionAppBundleIdentifier 等值。
  • 仔细检查我的 WatchKit 扩展中的所有文件是否具有正确的目标成员资格

enter image description here

在这一点上我真的没有想法了。我的猜测是我一定做错了一些明显的简单事情,但我就是看不到它。

最佳答案

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

关于swift - Apple Watch 应用程序在模拟器上运行,但不在物理设备上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32611671/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com