Closed robertmaxted closed 5 months ago
@AdamEssenmacher @TobiasBuchholz - ready for review.
I don't think this compiles?
CloudFunctions.GetInstance()
isn't a method on the iOS side.
@AdamEssenmacher Sorry about that oversight. It should compile as expected now. I am unable to test on my environment, having lots of issue with MS build and workloads. I do not see why it wouldn't compile now.
We can then init like this:
private static MauiAppBuilder RegisterFirebaseServices(this MauiAppBuilder builder) { builder.ConfigureLifecycleEvents(events => {
events.AddiOS(iOS => iOS.WillFinishLaunching((_,__) =>
{
CrossFirebase.Initialize(); // General Firebase initialization
CrossFirebaseFunctions.Initialize("europe-west2"); // Set specific region for Functions
return false;
}));
events.AddAndroid(android => android.OnCreate((activity, _) =>
{
CrossFirebase.Initialize(activity); // General Firebase initialization
CrossFirebaseFunctions.Initialize("europe-west2"); // Set specific region for Functions
}));
});
builder.Services.AddSingleton(_ => CrossFirebaseAuth.Current);
return builder;
}
I think..?
P.S - thanks for your time.
Addresses #292
Added overload for region specification (functions). Default will remain as "us-central1".