Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS build with precompiled Firestore] ld: Undefined symbols: enum case for FirebaseSharedSwift #858

Closed
lucaele opened this issue Jan 8, 2024 · 1 comment

Comments

@lucaele
Copy link

lucaele commented Jan 8, 2024

HI all,
I'm trying to build with precompiled for Firestore but this error comes out.
does anyone know how to solve it?
Thanks

cordova-ios: 6.3.0
cordova: 12.0.0 (cordova-lib@12.0.1)
xCode: 15.1

Cordova plugins:
cordova-plugin-advanced-http 3.3.1 "Advanced HTTP plugin"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-file 8.0.0 "File"
cordova-plugin-firebasex 16.3.0-cli "Google Firebase Plugin"
cordova-plugin-geolocation 4.1.0 "Geolocation"
cordova-plugin-inappbrowser 5.0.0 "InAppBrowser"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
es6-promise-plugin 4.2.2 "Promise"

Podfile
source 'https://cdn.cocoapods.org/'
platform :ios, '14.0'
use_frameworks!
target 'MiMao' do
project 'MiMao.xcodeproj'
pod 'Firebase/Core', '10.10.0'
pod 'Firebase/Auth', '10.10.0'
pod 'Firebase/Messaging', '10.10.0'
pod 'Firebase/Performance', '10.10.0'
pod 'Firebase/RemoteConfig', '10.10.0'
pod 'FirebaseFirestore/WithLeveldb', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.10.0'
pod 'Firebase/Crashlytics', '10.10.0'
pod 'Firebase/Functions', '10.10.0'
pod 'Firebase/Installations', '10.10.0'
pod 'GoogleSignIn', '6.2.4'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end

Error

ld: Undefined symbols:
enum case for FirebaseSharedSwift.FirebaseDataDecoder.DataDecodingStrategy.blob(FirebaseSharedSwift.FirebaseDataDecoder.DataDecodingStrategy.Type) -> FirebaseSharedSwift.FirebaseDataDecoder.DataDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
closure #1 () throws -> A1 in closure #4 (__C.FIRQueryDocumentSnapshot) -> A1? in closure #1 (__C.FIRQuerySnapshot?, Swift.Error?) -> () in FirebaseFirestore.FirestoreQueryObservable.init<A where A == [A1], A1: Swift.Decodable>(configuration: FirebaseFirestore.FirestoreQuery<[A1]>.Configuration) -> FirebaseFirestore.FirestoreQueryObservable<[A1]> in FirebaseFirestore[arm64]19
enum case for FirebaseSharedSwift.FirebaseDataDecoder.KeyDecodingStrategy.useDefaultKeys(FirebaseSharedSwift.FirebaseDataDecoder.KeyDecodingStrategy.Type) -> FirebaseSharedSwift.FirebaseDataDecoder.KeyDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
closure #1 () throws -> A1 in closure #4 (__C.FIRQueryDocumentSnapshot) -> A1? in closure #1 (__C.FIRQuerySnapshot?, Swift.Error?) -> () in FirebaseFirestore.FirestoreQueryObservable.init<A where A == [A1], A1: Swift.Decodable>(configuration: FirebaseFirestore.FirestoreQuery<[A1]>.Configuration) -> FirebaseFirestore.FirestoreQueryObservable<[A1]> in FirebaseFirestore[arm64]19
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.keyDecodingStrategy.setter : FirebaseSharedSwift.FirebaseDataDecoder.KeyDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
enum case for FirebaseSharedSwift.FirebaseDataDecoder.DateDecodingStrategy.custom(FirebaseSharedSwift.FirebaseDataDecoder.DateDecodingStrategy.Type) -> ((Swift.Decoder) throws -> Foundation.Date) -> FirebaseSharedSwift.FirebaseDataDecoder.DateDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
closure #1 () throws -> A1 in closure #4 (__C.FIRQueryDocumentSnapshot) -> A1? in closure #1 (__C.FIRQuerySnapshot?, Swift.Error?) -> () in FirebaseFirestore.FirestoreQueryObservable.init<A where A == [A1], A1: Swift.Decodable>(configuration: FirebaseFirestore.FirestoreQuery<[A1]>.Configuration) -> FirebaseFirestore.FirestoreQueryObservable<[A1]> in FirebaseFirestore[arm64]19
static (extension in FirebaseFirestore):FirebaseSharedSwift.FirebaseDataDecoder.DateDecodingStrategy.timestamp.getter : FirebaseSharedSwift.FirebaseDataDecoder.DateDecodingStrategy in FirebaseFirestore[arm64]25
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.dataDecodingStrategy.setter : FirebaseSharedSwift.FirebaseDataDecoder.DataDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(
: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.dateDecodingStrategy.setter : FirebaseSharedSwift.FirebaseDataDecoder.DateDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.passthroughTypeResolver.setter : FirebaseSharedSwift.StructureCodingPassthroughTypeResolver.Type, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(
: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
enum case for FirebaseSharedSwift.FirebaseDataDecoder.NonConformingFloatDecodingStrategy.throw(FirebaseSharedSwift.FirebaseDataDecoder.NonConformingFloatDecodingStrategy.Type) -> FirebaseSharedSwift.FirebaseDataDecoder.NonConformingFloatDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Decoder in FirebaseFirestore[arm64]14
closure #1 () throws -> A1 in closure #4 (__C.FIRQueryDocumentSnapshot) -> A1? in closure #1 (__C.FIRQuerySnapshot?, Swift.Error?) -> () in FirebaseFirestore.FirestoreQueryObservable.init<A where A == [A1], A1: Swift.Decodable>(configuration: FirebaseFirestore.FirestoreQuery<[A1]>.Configuration) -> FirebaseFirestore.FirestoreQueryObservable<[A1]> in FirebaseFirestore[arm64]19
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.nonConformingFloatDecodingStrategy.setter : FirebaseSharedSwift.FirebaseDataDecoder.NonConformingFloatDecodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.decode(
: A.Type, from: Any) throws -> A, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataDecoder.userInfo.setter : [Swift.CodingUserInfoKey : Any], referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Decoder.decode(
: A.Type, from: Any) throws -> A in FirebaseFirestore[arm64]14
enum case for FirebaseSharedSwift.FirebaseDataEncoder.DataEncodingStrategy.blob(FirebaseSharedSwift.FirebaseDataEncoder.DataEncodingStrategy.Type) -> FirebaseSharedSwift.FirebaseDataEncoder.DataEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
enum case for FirebaseSharedSwift.FirebaseDataEncoder.KeyEncodingStrategy.useDefaultKeys(FirebaseSharedSwift.FirebaseDataEncoder.KeyEncodingStrategy.Type) -> FirebaseSharedSwift.FirebaseDataEncoder.KeyEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.keyEncodingStrategy.setter : FirebaseSharedSwift.FirebaseDataEncoder.KeyEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
enum case for FirebaseSharedSwift.FirebaseDataEncoder.DateEncodingStrategy.custom(FirebaseSharedSwift.FirebaseDataEncoder.DateEncodingStrategy.Type) -> ((Foundation.Date, Swift.Encoder) throws -> ()) -> FirebaseSharedSwift.FirebaseDataEncoder.DateEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
static (extension in FirebaseFirestore):FirebaseSharedSwift.FirebaseDataEncoder.DateEncodingStrategy.timestamp.getter : FirebaseSharedSwift.FirebaseDataEncoder.DateEncodingStrategy in FirebaseFirestore[arm64]26
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.dataEncodingStrategy.setter : FirebaseSharedSwift.FirebaseDataEncoder.DataEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.dateEncodingStrategy.setter : FirebaseSharedSwift.FirebaseDataEncoder.DateEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.passthroughTypeResolver.setter : FirebaseSharedSwift.StructureCodingPassthroughTypeResolver.Type, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
enum case for FirebaseSharedSwift.FirebaseDataEncoder.NonConformingFloatEncodingStrategy.throw(FirebaseSharedSwift.FirebaseDataEncoder.NonConformingFloatEncodingStrategy.Type) -> FirebaseSharedSwift.FirebaseDataEncoder.NonConformingFloatEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.__allocating_init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.init() -> (extension in FirebaseFirestore):__C.FIRFirestore.Encoder in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.nonConformingFloatEncodingStrategy.setter : FirebaseSharedSwift.FirebaseDataEncoder.NonConformingFloatEncodingStrategy, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.encode(A) throws -> Any, referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
dispatch thunk of FirebaseSharedSwift.FirebaseDataEncoder.userInfo.setter : [Swift.CodingUserInfoKey : Any], referenced from:
(extension in FirebaseFirestore):__C.FIRFirestore.Encoder.encode(A) throws -> [Swift.String : Any] in FirebaseFirestore[arm64]14
method descriptor for static FirebaseSharedSwift.StructureCodingPassthroughTypeResolver.isPassthroughType(A1) -> Swift.Bool, referenced from:
l_got.$s19FirebaseSharedSwift38StructureCodingPassthroughTypeResolverP02isfG0ySbqd__lFZTq in FirebaseFirestore[arm64]6
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@dpa99c
Copy link
Owner

dpa99c commented Nov 7, 2024

The prebuilt iOS Firestore Pod can be used successfully to reduce build times but there are additional steps required to make it work. I've documented these here along with suggested solutions for build/run-time issues arising from its usage.

@dpa99c dpa99c closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants