firebase
firebase copied to clipboard
[@nativescript/firebase-firestore]
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"
}
}
I have the same exact issue. Dit you find a solution yet?
@Robernator try updating your cocoapods and LMK if it's still an issue