我正在尝试构建我的ios离子cordova应用程序,但我在make pod install
之后出错(podfile安装firebasemessaging 2.0.0,依赖项包括protobuf 3.5.0)
fatal error: 'google/protobuf/Api.pbobjc.h' file not found
#import "google/protobuf/Api.pbobjc.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
**建筑失败**
以下构建命令失败: CompileC /var/root/Library/Developer/Xcode/DerivedData/Monitoreo_de_viajes-glbzeqldfofumbcfnebzzlyuslmv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Protobuf.build/Objects-normal/x86_64/Any.pbobjc.o Protobuf / objectivec / google / protobuf / Any.pbobjc.m正常x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /var/root/Library/Developer/Xcode/DerivedData/Monitoreo_de_viajes-glbzeqldfofumbcfnebzzlyuslmv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Protobuf.build/Objects-normal/x86_64/Api.pbobjc.o Protobuf / objectivec / google / protobuf / Api.pbobjc.m正常x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /var/root/Library/Developer/Xcode/DerivedData/Monitoreo_de_viajes-glbzeqldfofumbcfnebzzlyuslmv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Protobuf.build/Objects-normal/x86_64/Duration.pbobjc.o Protobuf / objectivec / google / protobuf / Duration.pbobjc.m正常x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /var/root/Library/Developer/Xcode/DerivedData/Monitoreo_de_viajes-glbzeqldfofumbcfnebzzlyuslmv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Protobuf.build/Objects-normal/x86_64/Empty.pbobjc.o Protobuf / objectivec / google / protobuf / Empty.pbobjc.m正常x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler(4次失败) (node:31386)UnhandledPromiseRejectionWarning:错误代码65 for 命令:带args的xcodebuild: -xcconfig,/用户/ danielvivas /下载/ julianacg-allexxiamobileapp-c3cd5868890e /对myApp /平台/ IOS /科尔多瓦/集结debug.xcconfig,-workspace,Monitoreo de viajes.xcworkspace,-scheme,Monitoreo de VIAJES,构型,调试,-sdk,iphonesimulator,-destination,平台= iOS版 模拟器,名称= iPhone X,构建,CONFIGURATION_BUILD_DIR = /用户/ danielvivas /下载/ julianacg-allexxiamobileapp-c3cd5868890e /对myApp /平台/ IOS /建造/仿真器,SHARED_PRECOMPS_DIR = /用户/ danielvivas /下载/ julianacg-allexxiamobileapp-c3cd5868890e /对myApp /平台/ IOS /建立/ sharedpch (node:31386)UnhandledPromiseRejectionWarning:未处理的承诺 拒绝。这个错误源于抛出异步内部 没有捕获块的函数,或拒绝承诺的函数 没有用.catch()处理。 (拒绝ID:1)(节点:31386)[DEP0018] 弃用警告:已弃用未处理的承诺拒绝。在 未来,未经处理的承诺拒绝将终止 Node.js使用非零退出代码进行处理。
这是config.xml的一部分
<allow-navigation href="http://192.168.0.33:8100" />
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-badge" spec="~0.8.5" />
<plugin name="cordova-base64-to-gallery" spec="~4.1.3" />
<plugin name="cordova-plugin-android-permissions" spec="~1.0.0" />
<plugin name="cordova-sqlite-storage" spec="^2.3.0" />
<plugin name="cordova-plugin-globalization" spec="^1.0.9" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.1" />
<plugin name="cordova-plugin-sim" spec="^1.3.3" />
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
<plugin name="cordova-plugin-nativeaudio" spec="^3.0.9" />
<plugin name="cordova-plugin-shake" spec="^0.6.0" />
<plugin name="cordova-plugin-file" spec="^4.3.3" />
<plugin name="phonegap-plugin-push" spec="^2.0.0-rc4">
<variable name="SENDER_ID" value="123456789" />
</plugin>
<engine name="android" spec="6.2.3" />
<engine name="ios" spec="4.5.4" />
PODS FILE
# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'MYPROJ' do
project 'MYPROJ.xcodeproj'
pod 'FirebaseMessaging', '~> 2.0.0'
end
podfile.lock
ODS:
- FirebaseAnalytics (4.2.0):
- FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseCore (4.0.20):
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseInstanceID (2.0.10):
- FirebaseCore (~> 4.0)
- FirebaseMessaging (2.0.8):
- FirebaseAnalytics (~> 4.0)
- FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/Logger (~> 2.1)
- Protobuf (~> 3.1)
- GoogleToolboxForMac/Defines (2.1.4)
- GoogleToolboxForMac/Logger (2.1.4):
- GoogleToolboxForMac/Defines (= 2.1.4)
- GoogleToolboxForMac/NSData+zlib (2.1.4):
- GoogleToolboxForMac/Defines (= 2.1.4)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- Protobuf (3.5.0)
DEPENDENCIES:
- FirebaseMessaging (~> 2.0.0)
SPEC CHECKSUMS:
FirebaseAnalytics: 7ef69e76a5142f643aeb47c780e1cdce4e23632e
FirebaseCore: 90cb1c53d69b556f112a1bf72b5fcfaad7650790
FirebaseInstanceID: 8d20d890d65c917f9f7d9950b6e10a760ad34321
FirebaseMessaging: dfdcd307c2382290a1e297a81d0f18370f5b1bcd
GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
PODFILE CHECKSUM: e1ffdda9786de21eb39516a537d0b8f676809ccd
COCOAPODS:1.1.1
答案 0 :(得分:1)
当我改变时它起作用
<engine name="ios" spec="4.5.4" />
到
<engine name="ios" spec="4.4.0" />
在config.xml中并重新构建所有(npm install,add platform ios,pod install)