Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[@nativescript/firebase-firestore]

未关闭
#169 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
ios, typescript

调研方向

根据 package.json 中的依赖项以及 App_Resources/ios 中 Podfile 和 build.xcconfig 的设置,复现 iOS 构建。先处理 CocoaPods 的 deployment-target 错误,然后检查 linker 输出中的 Firestore、nanopb 和 Swift 符号。一个普通的 NativeScript Angular 项目能够使用 @nativescript/firebase-firestore 成功构建,即表示完成。

由索引模型根据 Issue 内容生成。

描述

I am trying to use the offical native sript firebase and firesore plugins.

I created a plain nativescript angular project and installed

npm install @nativescript/firebase-core 
npm install @nativescript/firebase-firestore

I got this error message :

Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `9.6.0`
[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":
  In Podfile:
    FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `9.6.0`)

Specs satisfying the `FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `9.6.0`)` dependency were found, but they required a higher minimum deployment target.

As recommened i added podfile and build.xcconig in App_Resources/ios

IPHONEOS_DEPLOYMENT_TARGET = 11.0;

platform :ios, '11.0'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
    end
  end
end

this leads to other errors :

Saving metadata generation's stderr stream to: /Users/sjunk/Projects/fb4/platforms/ios/build/Debug-iphonesimulator/metadata-generation-stderr-x86_64.txt
~/Projects/fb4/platforms/ios
ld: warning: dylib (/Users/sjunk/Projects/fb4/platforms/ios/build/Debug-iphonesimulator/TNSWidgets.framework/TNSWidgets) was built for newer iOS Simulator version (12.0) than being linked (11.0)
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility51'
ld: warning: Could not find or use auto-linked library 'swiftMetal'
ld: warning: Could not find or use auto-linked library 'swiftDarwin'
ld: warning: Could not find or use auto-linked library 'swiftUIKit'
ld: warning: Could not find or use auto-linked library 'swiftCoreData'
ld: warning: Could not find or use auto-linked library 'swiftCore'
ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
ld: warning: Could not find or use auto-linked library 'swiftos'
ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find or use auto-linked library 'swift_Concurrency'
ld: warning: Could not find or use auto-linked library 'swiftDispatch'
ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftFileProvider'
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency'
ld: warning: Could not find or use auto-linked library 'swiftDataDetection'
ld: warning: Could not find or use auto-linked library 'swiftUniformTypeIdentifiers'
Undefined symbols for architecture x86_64:
  "_pb_decode", referenced from:
      firebase::firestore::remote::ByteBufferReader::Read(pb_field_s const*, void*) in FirebaseFirestore(grpc_nanopb.o)
      firebase::firestore::nanopb::StringReader::Read(pb_field_s const*, void*) in FirebaseFirestore(reader.o)
  "_pb_encode", referenced from:
      firebase::firestore::nanopb::Writer::Write(pb_field_s const*, void const*) in FirebaseFirestore(writer.o)
  "_FIRLogBasic", referenced from:
      firebase::firestore::util::(anonymous namespace)::LogMessageV(firebase::firestore::util::LogLevel, NSString*, ...) in FirebaseFirestore(log_apple.o)
  "_FIRIsLoggableLevel", referenced from:
      firebase::firestore::util::LogIsLoggable(firebase::firestore::util::LogLevel) in FirebaseFirestore(log_apple.o)
  "_FIRSetLoggerLevel", referenced from:
      firebase::firestore::util::LogSetLevel(firebase::firestore::util::LogLevel) in FirebaseFirestore(log_apple.o)
  "_FIRAuthStateDidChangeInternalNotificationUIDKey", referenced from:
      ____ZN8firebase9firestore11credentials31FirebaseAuthCredentialsProviderC2EP6FIRAppPU25objcproto14FIRAuthInterop11objc_object_block_invoke in FirebaseFirestore(firebase_auth_credentials_provider_apple.o)
  "_FIRAuthStateDidChangeInternalNotification", referenced from:
      firebase::firestore::credentials::FirebaseAuthCredentialsProvider::FirebaseAuthCredentialsProvider(FIRApp*, id<FIRAuthInterop>) in FirebaseFirestore(firebase_auth_credentials_provider_apple.o)
  "Swift.KeyedEncodingContainer.encode(_: Swift.Int64, forKey: A) throws -> ()", referenced from:
      (extension in FirebaseFirestoreSwift):FirebaseFirestoreSwift.(CodableTimestamp in _1BE1C8AC6174899808A2C5532EFF4699).encode(to: Swift.Encoder) throws -> () in FirebaseFirestoreSwift(Timestamp+Codable.o)
  "Swift.KeyedEncodingContainer.encode(_: Swift.Int32, forKey: A) throws -> ()", referenced from:
      (extension in FirebaseFirestoreSwift):FirebaseFirestoreSwift.(CodableTimestamp in _1BE1C8AC6174899808A2C5532EFF4699).encode(to: Swift.Encoder) throws -> () in FirebaseFirestoreSwift(Timestamp+Codable.o)
  "Swift.KeyedDecodingContainer.decode(_: Swift.Int64.Type, forKey: A) throws -> Swift.Int64", referenced from:
      (extension in FirebaseFirestoreSwift):FirebaseFirestoreSwift.(CodableTimestamp in _1BE1C8AC6174899808A2C5532EFF4699).init(from: Swift.Decoder) throws -> A in FirebaseFirestoreSwift(Timestamp+Codable.o)
  "Foundation.Date._bridgeToObjectiveC() -> __C.NSDate", referenced from:
      static (extension in FirebaseFirestoreSwift):Foundation.Date.unwrap(Foundation.Date) throws -> __C.FIRTimestamp in FirebaseFirestoreSwift(ServerTimestamp.o)
      protocol witness for

Maybe there are some issues with nanopb.

here is my package.json

{
  "name": "fb4",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~15.0.0",
    "@angular/common": "~15.0.0",
    "@angular/compiler": "~15.0.0",
    "@angular/core": "~15.0.0",
    "@angular/forms": "~15.0.0",
    "@angular/platform-browser": "~15.0.0",
    "@angular/platform-browser-dynamic": "~15.0.0",
    "@angular/router": "~15.0.0",
    "@nativescript/angular": "~15.0.0",
    "@nativescript/core": "~8.4.0",
    "@nativescript/firebase-core": "^2.5.2",
    "@nativescript/firebase-firestore": "^2.5.2",
    "@nativescript/theme": "~3.0.2",
    "rxjs": "~7.5.0",
    "zone.js": "~0.11.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~15.0.0",
    "@angular/compiler-cli": "~15.0.0",
    "@nativescript/ios": "8.3.3",
    "@nativescript/types": "~8.4.0",
    "@nativescript/webpack": "~5.0.12",
    "@ngtools/webpack": "~15.0.0",
    "typescript": "~4.8.4"
  }
}

主要语言
TypeScript
星标
62
派生
53
平均合并
8 天 4 小时
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NativeScript/firebase 的其他 Issue

查看 NativeScript/firebase 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。