首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在Xcode中存档时,Flutter Firestore插件抛出错误

在Xcode中存档时,Flutter Firestore插件抛出错误
EN

Stack Overflow用户
提问于 2018-05-15 23:28:34
回答 4查看 1.5K关注 0票数 0

在更新到最新版本的cloud_firestore插件(参见下面的pubspec.yaml )后,应用程序将不再归档为最新的Xcode,尽管它在仿真器上运行。

重现步骤

  1. 运行flutter build ios -->确定

使用Xcode项目中指定的开发团队为设备部署自动签名iOS : xxxxxx

正在运行pod安装...10,8s

运行Xcode clean...1,2s

正在启动Xcode构建...

├─生成Dart代码...23,5s├─组装颤振资源...2,1s└─编译、链接和签名...83,3s Xcode构建完成。

  • in Xcode,Archive最终失败:

日志

代码语言:javascript
复制
While building module 'ProtoRPC' imported from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/FirebaseFirestore/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h:21:
While building module 'GRPCClient' imported from /Users/sergebesnard/Library/Developer/Xcode/DerivedData/Runner-hizooagynttegaeqkhreoqwhrxzc/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/gRPC-ProtoRPC/ProtoRPC.framework/Headers/ProtoRPC.h:20:
While building module 'RxLibrary' imported from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/gRPC/src/objective-c/GRPCClient/GRPCCall.h:36:
In file included from <module-includes>:1:
/Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/Target Support Files/gRPC-RxLibrary/gRPC-RxLibrary-umbrella.h:23:9: error: include of non-modular header inside framework module 'RxLibrary': '/Users/sergebesnard/Library/Developer/Xcode/DerivedData/Runner-hizooagynttegaeqkhreoqwhrxzc/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/gRPC-RxLibrary/RxLibrary.framework/Headers/transformations/GRXMappingWriter.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import "transformations/GRXMappingWriter.h"
        ^
1 error generated.
While building module 'ProtoRPC' imported from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/FirebaseFirestore/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h:21:
While building module 'GRPCClient' imported from /Users/sergebesnard/Library/Developer/Xcode/DerivedData/Runner-hizooagynttegaeqkhreoqwhrxzc/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/gRPC-ProtoRPC/ProtoRPC.framework/Headers/ProtoRPC.h:20:
In file included from <module-includes>:1:
In file included from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/Target Support Files/gRPC/gRPC-umbrella.h:13:
In file included from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/gRPC/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h:18:
/Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/gRPC/src/objective-c/GRPCClient/GRPCCall.h:36:9: fatal error: could not build module 'RxLibrary'
#import <RxLibrary/GRXWriter.h>
 ~~~~~~~^
2 errors generated.
While building module 'ProtoRPC' imported from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/FirebaseFirestore/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h:21:
In file included from <module-includes>:1:
In file included from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/Target Support Files/gRPC-ProtoRPC/gRPC-ProtoRPC-umbrella.h:14:
/Users/sergebesnard/Library/Developer/Xcode/DerivedData/Runner-hizooagynttegaeqkhreoqwhrxzc/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/gRPC-ProtoRPC/ProtoRPC.framework/Headers/ProtoRPC.h:20:9: fatal error: could not build module 'GRPCClient'
#import <GRPCClient/GRPCCall.h>
 ~~~~~~~^
3 errors generated.
In file included from /Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/FirebaseFirestore/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m:17:
/Users/sergebesnard/Development/Noteworthy/RoByN/app/ios/Pods/FirebaseFirestore/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h:21:9: fatal error: could not build module 'ProtoRPC'
#import <ProtoRPC/ProtoService.h>
 ~~~~~~~^
4 errors generated.

颤动医生-v‘

代码语言:javascript
复制
[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.4 17E202, locale fr-BE)
    • Flutter version 0.3.2 at /Users/sergebesnard/Development/flutter
    • Framework revision 44b7e7d3f4 (4 weeks ago), 2018-04-20 01:02:44 -0700
    • Engine revision 09d05a3891
    • Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/sergebesnard/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3.1, Build version 9E501
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 24.2.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.23.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.12.1

[✓] Connected devices (1 available)
    • iPhone X • 780C4B10-21A6-41E0-9A05-A6175FC20FA0 • ios • iOS 11.3 (simulator)

! Doctor found issues in 1 category.

可能与this issue有关

Pubspec.yaml:

代码语言:javascript
复制
dependencies:


flutter:
    sdk: flutter
  google_sign_in: "^3.0.2"
  firebase_analytics: "^0.3.3"
  firebase_auth: "^0.5.10"
  firebase_database: "^0.4.6"
  firebase_storage: "^0.3.5"
  cloud_firestore: "^0.7.1"
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2018-09-03 00:45:09

gRPC现在修复了在xCode中存档会崩溃的问题。如果你今天仍然有这个问题,那就意味着你的Pod没有正确更新。

删除/ios/Podfile.lock和/ios/Pods

这就是我最终让gRPC加载到最新版本的方法。gRPC需要1.13或更高版本才能修复。

票数 3
EN

Stack Overflow用户

发布于 2018-05-22 18:33:32

这对我来说适用于基于Objective-C的颤动项目,具有引用的依赖项,而我可以使用基于Swift的项目重现。

如果我修补其中一个pod伞头文件,Swift错误就会消失:

Pods/gRPC-RxLibrary/Support files/gRPC-RxLibrary-umbrella.h

-听从https://www.bountysource.com/issues/40110207-swift-could-not-build-modules-during-archiving-and-include-of-non-modular-header-inside-framework-module-rxlibrary的建议。

票数 5
EN

Stack Overflow用户

发布于 2018-05-28 10:52:32

我遇到了同样的问题,并注意到flutter build在使用xcodebuild (例如xcodebuild BUILD_DIR=/Users/example/projects/flutter_app/build/ios ...)构建时设置了source root/build/iosBUILD_DIR标志。我把这个添加到我的归档命令中,它起作用了。

¯\_(ツ)_/`

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50353995

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档