Hi, Just wondering if there are any plans to integrate the firebase realtime database, please? I have an IOS app I need to do, which will hopefully user the reatime database Regards Neil
www.b4x.com
Is there an OBJC inline code to do that?
I tried the following code (taken from FIrebase docs) in a b4i Firebase project (which worked for Firebase notifications and authentications )but without benefit since it generates a compile error:
B4X:
#If OBJC
@import Firebase;
// Use Firebase library to configure APIs
-(void) write : (bool) on {
[FIRApp configure];
@property (strong, nonatomic) FIRDatabaseReference *ref;
self.ref = [[FIRDatabase database] reference];
[[[self.ref child:@"users"] child:authResult.user.uid]
setValue:@{@"username": username}];
NSLog(@"written");
}
#End If
Sorry I am only a newbie, I did not find any on Stackoverflow! I will be grateful for one
Edit : The difficulty, even if I found one , is really to adapt the code to the inline Objective-C inside the b4i IDE.
If you need to call some functions only (like in fragment, which you posted), you can avoid OBJC at all (using NativeObject).
Developers mostly use Swift. So to find OBJECTIVE-C sample is not so easy. Anyway Swift samples also good and you can search Swift blogs. Main task is to understand a sequence of actions.