使用谷歌分析的Ionic App iOS Build错误

时间:2018-03-22 20:59:38

标签: google-analytics ionic3

我在我的ionic3应用程序中集成了谷歌分析插件,但在iOS上我有构建问题......

/app/platforms/ios/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m:19:10: fatal error: 'google/protobuf/FieldMask.pbobjc.h' file not found
 #import "google/protobuf/FieldMask.pbobjc.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

这是我的离子信息报告:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : browser 5.0.3 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-sim : 6.1.2 
    Node    : v7.7.0
    npm     : 5.7.1 
    OS      : macOS Sierra
    Xcode   : Xcode 9.2 Build version 9C40b 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

我也安装了这些因为我找不到Firebase ID:

pod install
Analyzing dependencies
Downloading dependencies
Installing FirebaseAnalytics (4.1.0)
Installing FirebaseCore (4.0.17)
Installing FirebaseInstanceID (2.0.9)
Installing FirebaseMessaging (2.0.8)
Installing GoogleToolboxForMac (2.1.3)
Installing Protobuf (3.5.0)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 7 total pods installed.

你有意见吗?

1 个答案:

答案 0 :(得分:0)

我通过检查push插件的版本要求来解决

我的版本是2.2.3 安装要求

  

Cordova CLI 7.1以上

     

Cordova IOS 4.5以上

     

以上Cocopod 1.1.1

请查看链接并遵循版本要求:

https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#xcode

然后

ionic cordova platform rm ios
ionic cordova platfrom add ios
cd platforms/ios
pod install