NativeScript / NativeScript/firebase

[@nativescript/firebase-firestore]

Ouverte
#169 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
TypeScript
Étoiles
62
Forks
53
Merge moyen
8 j 4 h
PR mergées (30 j)
2

Description

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"
  }
}

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduisez le build iOS à partir des dépendances de package.json et des paramètres du Podfile et de build.xcconfig dans App_Resources/ios. Commencez par l’erreur de deployment target de CocoaPods, puis examinez la sortie du linker à la recherche des symboles Firestore, nanopb et Swift. C’est terminé lorsqu’un projet NativeScript Angular simple se build correctement avec @nativescript/firebase-firestore.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
ios, typescript
Domaine
databases, mobile-dev
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.