代码之家  ›  专栏  ›  技术社区  ›  Mr. Developer

Cordova上的Firebase不会在iOS设备上触发通知

  •  1
  • Mr. Developer  · 技术社区  · 7 年前

    我正在用Cordova为iOS和Android制作一个应用程序。 我已经安装了这个插件: phonegap-plugin-push 在安卓上工作。 关于iOS,我已经将Firebase项目中的che证书安装到控制台中。 事实上,当我尝试运行测试通知时,我看到:

    enter image description here

    关联的17个应用程序用户是我对令牌通信所做的测试。

    enter image description here

    该项目还包括以下POD:

    Analyzing dependencies
    Downloading dependencies
    Using FirebaseAnalytics (4.2.0)
    Using FirebaseCore (4.0.20)
    Using FirebaseInstanceID (2.0.10)
    Using FirebaseMessaging (2.0.8)
    Using GoogleToolboxForMac (2.1.4)
    Using Protobuf (3.6.1)
    Using nanopb (0.3.901)
    Generating Pods project
    Integrating client project
    Sending stats
    Pod installation complete! There is 1 dependency from the Podfile and 7 total pods installed.
    

    以及Xcode功能:

    enter image description here enter image description here

    我使用visualstudio代码,项目在apachecordova上。

    1 回复  |  直到 7 年前
        1
  •  1
  •   Kevin Dias    7 年前

    椰子荚

    Required cordova-cli minimum version: 6.4.0
    
    Required cordova-ios minimum version: 4.3.0
    
    Required CocoaPods minimum version: 1.0.1
    

    要安装CoCoapod,请按照安装说明进行操作 here

    pod setup
    

    如果您使用npm安装此插件,并且使用cordova cli的6.1.0或更高版本,它将自动为您的平台和cli下载此插件的正确版本。

    如果您使用的cordova cli版本低于6.1.0,则必须升级cordova cli版本,或显式安装插件:

    cordova plugin add phonegap-plugin-push@1.8.1
    

    如果在Xcode中打开应用程序,会出现如下错误:

    ld:找不到-lPods Appname的库 叮当声:错误:链接器命令失败,退出代码为1

    Then you are opening the .xcodeproj file when you should be opening the .xcworkspace file.
    

    ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
    

    此应答器的源--> here

    推荐文章