watch报错解决汇总

2023-05-16  本文已影响0人  程序H

This app contains a WatchKit app with an invalid bundle identifier. The bundle identifier of a WatchKit app must have a prefix consisting of the companion app's bundle identifier, followed by a '.'.

info.plist 添加键值对
key:WKCompanionAppBundleIdentifier
value: com.lnyd.iLiaoning

watchAPP info.plist

[SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "Default Configuration")

在watchinfo.plist里添加如下代码

<key>UIApplicationSceneManifest</key>
<dict>
    <key>UISceneConfigurations</key>
    <dict>
        <key>Default Configuration</key>
        <dict>
            <key>UISceneClassName</key>
            <string>MySceneDelegate</string>
            <key>UISceneConfigurationName</key>
            <string>Default Configuration</string>
        </dict>
    </dict>
</dict>

xcode运行watchapp同时安装iOSapp,实现同时安装

在watch的Scheme中添加母体应用


watchScheme配置iOSApp iOSApp绑定WatchApp

Swift项目配置多Target宏

ILIAONING_IN=1 Target配置即可


Swift项目配置
上一篇下一篇

猜你喜欢

热点阅读