Ionic 使用OneSignal和pod安装的iOS错误上的离子构建

s4n0splo  于 2022-12-09  发布在  Ionic
关注(0)|答案(1)|浏览(131)

我有一个带有OneSignal通知的应用程序。我使用的是@capacitor/cli@3.3.1。如果我在Podfile中启用use_frameworks!和use_modular_headers!,pod安装会显示错误:
!] The 'Pods-App' target has transitive dependencies that include statically linked binaries: (/Users/.../Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework)
删除use_frameworks!,我得到的错误是:
[!] Using Swift static libraries with custom module maps is currently not supported. Please buildCapacitoras a framework or remove the custom module map.

mkh04yzy

mkh04yzy1#

将OneSignal插件名称添加到capacitor.config.json中的staticPlugins数组:

{
    "appId": "com.example.myapp",
    "appName": "MyApp",
    "cordova": {
        "staticPlugins": [
            "onesignal-cordova-plugin"
        ]
    }
}

请参阅https://capacitorjs.com/docs/config

/**
 * List of Cordova plugins that need to be static but are not
 * already in the static plugin list.
 *
 * @since 3.3.0
 */
 staticPlugins?: string[];

相关问题