1amageek / ballcap-ios Goto Github PK
View Code? Open in Web Editor NEWFirebase Cloud Firestore support library for iOS. 🧢
License: MIT License
Firebase Cloud Firestore support library for iOS. 🧢
License: MIT License
A clear and concise description of what the bug is.
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
// TODO(you): code here to reproduce the problem
Why this is not referenced to path?
static var documentReference: DocumentReference {
return Firestore.firestore().document("version/(self.modelVersion)")
}
Hello. I'll be very happy if you could help me with avoiding firebase crash in a module!
I'm trying to make a framework that wraps Firestore SDK, but it crashes.
According to some comments on GitHub, using Firebase from multiple modules have some difficulties.
Firebase is a linked statically and can only be linked once into an app. It cannot be linked into multiple dynamic frameworks.
from firebase/firebase-ios-sdk#4263 (comment)
My crash seems to be the same as this issue: firebase/firebase-ios-sdk#4271
I'm interested in how Ballcap-iOS avoid this problem since it wraps Firestore in a module.
Do you know how Ballcap-iOS avoids this problem?
I've uploaded my sample app which has the same crash. It crashes by executing tests.
https://github.com/yoching/FirestoreDependencyExperiment
Thank you!
Hello,
Continuing our discussion at Pring...
1amageek/Pring#59
Does the new one provide dynamic features?
いつもお世話になっております。
firebase SDKは現在v10.21.0が公開されていますが、こちら対応されるご予定はございますでしょうか?
というのもプロジェクトのfirebase SDKのバージョンを上げたいと考えていたところ、Ballcapが使用しているfirebaseのバージョンに引っ張られて更新できないためそのご確認となります。
BallcapApp.configure showing the message "inaccessible due to internal protection level message".
Put BallcapApp.configure
in a class and after try to compile.
BallcapApp.configure(Firestore.firestore().document("version/1"))
WithSwiftUI example crashing on run.
Example not compiling
Clone repo
Change directory to example/SwiftUI
pod install
Copy over GoogleService-Info.plist (works on other projects)
2020-01-15 02:51:53.892641-0800 WithSwiftUI[3613:4281424] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-01-15 02:51:53.958240-0800 WithSwiftUI[3613:4281430] 6.11.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60103000 started
2020-01-15 02:51:53.958820-0800 WithSwiftUI[3613:4281430] 6.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
keyNotFound(CodingKeys(stringValue: "name", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"name\", intValue: nil) (\"name\").", underlyingError: nil))
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /path/to/Ballcap-iOS/examples/WithSwiftUI/Pods/Ballcap/Ballcap/DataSource.swift, line 191
2020-01-15 02:51:54.117454-0800 WithSwiftUI[3613:4281428] Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /path/to/Ballcap-iOS/examples/WithSwiftUI/Pods/Ballcap/Ballcap/DataSource.swift, line 191
Can we please get that added to this project?
I just made a pod update and am now using Firebase 10.1.0 and Ballcap 1.3.5 but when trying to build my app I get build errors inside Ballcaps Query.swift
in lines 119 - 125.
public func listen(includeMetadataChanges: Bool = true, listener: @escaping FIRQuerySnapshotBlock) -> ListenerRegistration {
return query.addSnapshotListener(includeMetadataChanges: includeMetadataChanges, listener: listener)
}
public func get(completion: @escaping FIRQuerySnapshotBlock) {
query.getDocuments(completion: completion)
}
The error is for both functions
'FIRQuerySnapshotBlock' is unavailable in Swift: Use Swift's closure syntax instead.
Does anyone else have the problem?
I'm using:
Consider correspondence of BindableObject in order to correspond to SwiftUI seamlessly
https://developer.apple.com/documentation/swiftui/bindableobject
When deleting last document in collection, DataSource not picking up changes and do not notify about removed items.
If last document in collection deleted snapshot is not processed. Issue caused by this line.
Ballcap-iOS/Ballcap/DataSource.swift
Line 146 in cd943d1
lastSnapshot
is nil and self._execute(snapshot: snapshot)
not getting called.I'm using Ballcap in a SwiftUI environment and I have a class that contains an optional field of type DocumentReference
in its Model.
Initially the field does not exist but I can set it through the UI of my app. This works just as expected.
But I would like to be able to also remove the reference. I tried setting it to nil
but this doesn't work unfortunately.
Is there currently any way to achieve this with Ballcap?
Thanks for your help!
This is a great project and it's surely helpful for Firebase Developers. Consider adding it to firebaseopensource.com.
See configuring your repo for additional instructions.
Why data is optional?
Is your feature request related to a problem? Please describe.
Model's of Object
subclasses require empty init methods:
class User: Object, DataRepresentable {
var data: Model?
struct Model: Modelable, Codable {
let id: String
let firstName: String
let lastName: String
init() {
self.id = ""
self.firstName = ""
self.lastName = ""
}
init(id: String, firstName: String, lastName: String) {
self.id = id
self.firstName = firstName
self.lastName = lastName
}
}
}
And when used require doing a little dance with initializing separately and assigning:
let user = User()
let model = User.Model(id: userId,
firstName: firstName,
lastName: lastName)
user.data = model
user.save()
This is un-ideal as you need to write so much repetitive boilerplate for every Object
subclass, and you can forget to assign the model to object.data
.
Describe the solution you'd like
When initializing an instance of a subclass of Object
it would be great if we required the data model to be provided along with it:
let model = User.Model(id: userId,
firstName: firstName,
lastName: lastName)
let user = User(data: model)
user.save()
Which would enable us to simplify the model blueprint to:
class User: Object, DataRepresentable {
var data: Model?
struct Model: Modelable, Codable {
let id: String
let firstName: String
let lastName: String
}
}
Describe alternatives you've considered
I listed the alternative route I'm using above.
Additional context
I'd be happy to help develop this if you think it would be a worthwhile feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.