Closed jcampbell05 closed 8 years ago
+1 Makes the GFQuery observers unusable for the moment
This is the code to make it somewhat usable.
public extension GFQuery {
//Enum for compatibility with Geofire's Obj-C Interface
enum EventType: UInt32
{
case Entered = 0
case Exited
case Moved
}
}
You then have to use it like so:
let type = GFEventType(rawValue: eventType.rawValue)
ref.observeEventType(type)
{
//Block code
}
Would be 200% better if we didn't need this work around :)
@jdimond / @mcdonamp - Can either of you please provide some feedback here?
is also queryAtLocation affected by this? im trying the basic implementation but i get no response
@iPhoNewsRO the issue here is that the enums aren't exported correctly in Swift--it shouldn't affect the API responses if the enums exist. Is the issue that you can't get the method to work (as in it doesn't compile), or that it compiles but doesn't return what you expect?
We're taking a look into exporting the correct enums using NSEnum--as always, PRs are welcome :)
it compiles but doesn't return what i expect. probably i'll just need help implementing this
Ok, then it's not related to this. StackOverflow or our Google Group might be good places to start looking for similar problems, and if you can't find anything posting there asking for help would good.
Ok, should be solved in #29. Might be a few days before we merge it, and then get it out to Cocoapods. Since NS_ENUM is backwards compatible, I believe this will be 1.1.3.
Would be useful to get either this asap in an interim or know when 1.1.3 is coming out. Tks. Quite unusable in iOS without these enums.
Sorry about that! We will get 1.1.3 out on Monday.
Hey folks--hold up on the release with some CocoaPods issues, so it might still be a few days. That said, the code is merged and the v1.1.3 branch exists, so you can use:
pod 'Geofire', :git => 'https://github.com/firebase/geofire-objc.git', :tag => 'v1.1.3'
Thanks!
Version 1.1.3
has been released to CocoaPods. Thanks for your patience. Let us know if you run into any issues with the latest bits!
Due to the fact NSEnum isn't used the Event Type enums export to swift as: