美文网首页
watch报错解决汇总

watch报错解决汇总

作者: 程序H | 来源:发表于2023-05-16 14:44 被阅读0次

    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项目配置

    相关文章

      网友评论

          本文标题:watch报错解决汇总

          本文链接:https://www.haomeiwen.com/subject/lgovsdtx.html