gpt4 book ai didi

swift - 在 watchOS 5.2 崩溃时找不到适合组合的图像

转载 作者:行者123 更新时间:2023-12-01 04:27:06 25 4
gpt4 key购买 nike

信息

我的应用程序在运行 watchOS 4 和 5 的 Apple Watch 上崩溃。一些新功能(即 Combine)依赖于 watchOS 6,并且这些方法的使用明确标有

@available(watchOSApplicationExtension 6.0.0, *)

该应用程序是使用 Xcode 9/10 创建的(我忘记了具体是哪个),并且针对 watchOS 4。现在当它使用 Xcode 11 构建并且具有依赖于 Combine 的文件时,它会在 watchOS 5 Apple Watch 上崩溃。

错误是
dyld: Library not loaded: /System/Library/Frameworks/Combine.framework/Combine
Referenced from: /private/var/containers/Bundle/Application/7A361FAB-EBE7-483D-BFD7-E915F15B5B14/Chirp WatchKit App.app/PlugIns/Chirp WatchKit Extension.appex/Chirp WatchKit Extension
Reason: image not found

显然, Combine ,玩的不爽。

此外,它不会在 watchOS 5 模拟器中启动,并且错误更能说明问题:
dyld: Library not loaded: /System/Library/Frameworks/Combine.framework/Combine
Referenced from: /Users/willbishop/Library/Developer/CoreSimulator/Devices/C6F36860-E70A-45E6-AC3B-E54DBCEA7C7A/data/Containers/Bundle/Application/1B2EC7C4-731F-4EC1-B23F-09A0B49CD055/Chirp WatchKit App.app/PlugIns/Chirp WatchKit Extension.appex/Chirp WatchKit Extension
Reason: no suitable image found. Did find:
/System/Library/Frameworks/Combine.framework/Combine: mach-o, but wrong architecture

我试过的:
  • 我认为这可能是因为我有 watchOS 6 相关代码,与 watchOS 5 文件混合在一起。但是,将代码移动到单独的文件后,问题仍然存在。
  • 清洁工程
  • 删除 Derived Data/

  • 尽管如此,没有运气。我认为这是某个地方的build设置,但我对哪一个没有最微弱的线索。

    最佳答案

    我相信您需要做的是制作Combine.framework可选链接。出于某种原因,Combine 不能为此使用正常的 UI(还没有?),但似乎在 another thread 中有一个解决方案。 .

    关于swift - 在 watchOS 5.2 崩溃时找不到适合组合的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57638220/

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