Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Update] Firebase for iOS v8.2.0 #489

Closed
wants to merge 100 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
3fe6e58
[Firebase][Google] update components & readme
dmariogatto Apr 20, 2021
8678ad9
[Firebase][Core] Updated to version 7.10.0
dmariogatto Apr 20, 2021
3077b58
[Firebase][Installations] Updated to version 7.10.0
dmariogatto Apr 20, 2021
791ead6
[Firebase][InstanceID] Updated to version 7.10.0
dmariogatto Apr 20, 2021
06ebc4e
[Firebase][Analytics] Updated to version 7.10.0
dmariogatto Apr 20, 2021
4f2b3f0
[Firebase][ABTesting] Updated to version 7.10.0
dmariogatto Apr 20, 2021
a472b38
[Firebase][AdMob] Updated to version 8.3.0
dmariogatto Apr 20, 2021
a907f1a
[Firebase][Auth] Updated to version 7.10.0
dmariogatto Apr 20, 2021
fbb929e
[Firebase][Crashlytics] Updated to version 7.10.0
dmariogatto Apr 20, 2021
ebd38e5
[Firebase][Database] Updated to version 7.10.0
dmariogatto Apr 20, 2021
38530b1
[Firebase][DynamicLinks] Updated to version 7.10.0
dmariogatto Apr 20, 2021
194777d
[Firebase][CloudFirestore] Updated to version 7.10.0
dmariogatto Apr 20, 2021
abd312e
[Firebase][CloudFunctions] Updated to version 7.10.0
dmariogatto Apr 20, 2021
4f99809
[Firebase][InAppMessaging] Updated to version 7.10.0
dmariogatto Apr 20, 2021
8d35520
[Firebase][CloudMessaging] Updated to version 7.10.0
dmariogatto Apr 20, 2021
f77d8a0
[Firebase][PerformanceMonitoring] Updated to version 7.10.0
dmariogatto Apr 20, 2021
6b48a8a
[Firebase][RemoteConfig] Updated to version 7.10.0
dmariogatto Apr 20, 2021
725df60
[Firebase][Storage] Updated to version 7.10.0
dmariogatto Apr 20, 2021
c5c13d2
[Firebase][AppDistribution] Added version 7.10.0
dmariogatto Apr 20, 2021
27d7ee6
[Google][Maps][Places] Updated to version 4.2.0
dmariogatto Apr 20, 2021
8754b7d
[Google][Cast] Updated to version 4.5.3
dmariogatto Apr 20, 2021
d527edc
[Google][Analytics] Version bump
dmariogatto Apr 20, 2021
19fc518
[Google][SignIn] Version bump
dmariogatto Apr 20, 2021
97a26df
[Google][TagManager] Updated to 7.2.0
dmariogatto Apr 20, 2021
dedcc2f
[Firebase][Google] Sample updates
dmariogatto Apr 20, 2021
ad879e1
[Google][Cast] Fixed up bindings
dmariogatto Apr 21, 2021
c05d459
[Firebase] Update to 7.11.0
dmariogatto May 5, 2021
3c828b7
[Firebase] Removed projects are not listed in nested projects in sln
May 11, 2021
f7d4af4
[Firebase][Google] update components & readme
dmariogatto May 27, 2021
bd233e8
[Firebase][Core] Updated to version 8.0.0
dmariogatto May 27, 2021
0e99401
[Firebase][Installations] Updated to version 8.0.0
dmariogatto May 27, 2021
6a0430d
[Firebase][Analytics] Updated to version 8.0.0
dmariogatto May 27, 2021
4eb4ecc
[Firebase][ABTesting] Updated to version 8.0.0
dmariogatto May 27, 2021
5dc75d9
[Firebase][AdMob] Updated to version 8.5.0
dmariogatto May 27, 2021
5c0e934
[Firebase][Auth] Updated to version 8.0.0
dmariogatto May 27, 2021
a8c572b
[Firebase][Crashlytics] Updated to version 8.0.0
dmariogatto May 27, 2021
0a1f636
[Firebase][Database] Updated to version 8.0.0
dmariogatto May 27, 2021
dd57205
[Firebase][DynamicLinks] Updated to version 8.0.0
dmariogatto May 27, 2021
ad411eb
[Firebase][CloudFirestore] Updated to version 8.0.0
dmariogatto May 27, 2021
5a8cc16
[Firebase][CloudFunctions] Updated to version 8.0.0
dmariogatto May 27, 2021
cd69a25
[Firebase][InAppMessaging] Updated to version 8.0.0
dmariogatto May 27, 2021
d2955e7
[Firebase][CloudMessaging] Updated to version 8.0.0
dmariogatto May 27, 2021
0796be8
[Firebase][PerformanceMonitoring] Updated to version 8.0.0
dmariogatto May 27, 2021
8f47e61
[Firebase][RemoteConfig] Updated to version 8.0.0
dmariogatto May 27, 2021
3fe5f7d
[Firebase][Storage] Updated to version 8.0.0
dmariogatto May 27, 2021
d7a5151
[Firebase][AppDistribution] Updated to version 8.0.0
dmariogatto May 27, 2021
7f05996
[Firebase][AppCheck] Added version 8.0.0
dmariogatto May 27, 2021
9f372b1
[Google][Maps][Places] Updated to version 5.0.0
dmariogatto May 27, 2021
1a6086d
[Google][Cast] Updated to version 4.6.1
dmariogatto May 27, 2021
384b16c
[Google][TagManager] Updated to 7.3.1
dmariogatto May 27, 2021
cd37bd1
[Google][AdMob][UMP] Updated to 8.5.0, added UMP 1.1.0
dmariogatto May 27, 2021
4bfc937
[Firebase][Google] sample updates
dmariogatto May 27, 2021
cfebcd8
Merge pull request #1 from bohdant/firebase-711
dmariogatto May 28, 2021
986c1b9
Merge remote-tracking branch 'origin/firebase-711' into firebase-800
dmariogatto May 28, 2021
753d753
Fixes for RewardedAd Api definitions
Jun 20, 2021
be1b63d
Fixes for adaptive ad banner bindings
Jun 20, 2021
f9227a9
[Firebase][Google] update components & readme
dmariogatto Jun 20, 2021
a4ab7c8
[Firebase][Core] Updated to version 8.1.0
dmariogatto Jun 20, 2021
183cef4
[Firebase][Installations] Updated to version 8.1.0
dmariogatto Jun 20, 2021
cbe22d1
[Firebase][Analytics] Updated to version 8.1.1
dmariogatto Jun 20, 2021
99f7264
[Firebase][ABTesting] Updated to version 8.1.0
dmariogatto Jun 20, 2021
add626c
[Firebase][AdMob] Updated to version 8.6.0
dmariogatto Jun 20, 2021
28762d8
[Firebase][Auth] Updated to version 8.1.0
dmariogatto Jun 20, 2021
49bfa99
[Firebase][Crashlytics] Updated to version 8.1.0
dmariogatto Jun 20, 2021
5923b40
[Firebase][Database] Updated to version 8.1.0
dmariogatto Jun 20, 2021
335779d
[Firebase][DynamicLinks] Updated to version 8.1.0
dmariogatto Jun 20, 2021
082e977
[Firebase][CloudFirestore] Updated to version 8.1.0
dmariogatto Jun 20, 2021
5ab3d89
[Firebase][CloudFunctions] Updated to version 8.1.0
dmariogatto Jun 20, 2021
0d70384
[Firebase][InAppMessaging] Updated to version 8.1.0
dmariogatto Jun 20, 2021
b450f50
[Firebase][CloudMessaging] Updated to version 8.1.0
dmariogatto Jun 20, 2021
1a0ab22
[Firebase][PerformanceMonitoring] Updated to version 8.1.0
dmariogatto Jun 20, 2021
427d795
[Firebase][RemoteConfig] Updated to version 8.1.0
dmariogatto Jun 20, 2021
fe84ca3
[Firebase][Storage] Updated to version 8.1.0
dmariogatto Jun 20, 2021
b225988
[Firebase][AppDistribution] Updated to version 8.1.0
dmariogatto Jun 20, 2021
4f61c52
[Firebase][AppCheck] Updated to version 8.1.0
dmariogatto Jun 20, 2021
d72dd32
[Google][AdMob] Updated to 8.6.0
dmariogatto Jun 20, 2021
88d932e
Merge pull request #2 from dtaylorus/firebase-800
dmariogatto Jun 25, 2021
603398b
Merge branch 'firebase-800' into firebase-811
dmariogatto Jun 25, 2021
bb8a6ca
[Firebase][Google] update components & readme
dmariogatto Jun 25, 2021
1ecc435
[Firebase][Core] Updated to version 8.2.0
dmariogatto Jun 25, 2021
e448901
[Firebase][Installations] Updated to version 8.2.0
dmariogatto Jun 25, 2021
294702d
[Firebase][Analytics] Updated to version 8.2.0
dmariogatto Jun 25, 2021
d7c0a70
[Firebase][ABTesting] Updated to version 8.2.0
dmariogatto Jun 26, 2021
8de06b2
[Firebase][Auth] Updated to version 8.2.0
dmariogatto Jun 26, 2021
74c2a15
[Firebase][Crashlytics] Updated to version 8.2.0
dmariogatto Jun 26, 2021
02c0eb0
[Firebase][Database] Updated to version 8.2.0
dmariogatto Jun 26, 2021
266f8d0
[Firebase][DynamicLinks] Updated to version 8.2.0
dmariogatto Jun 26, 2021
6b6f582
[Firebase][CloudFirestore] Updated to version 8.2.0
dmariogatto Jun 26, 2021
5003daf
[Firebase][CloudFunctions] Updated to version 8.0.0
dmariogatto Jun 26, 2021
c65b50e
[Firebase][InAppMessaging] Updated to version 8.2.0
dmariogatto Jun 26, 2021
d26fb8e
[Firebase][CloudMessaging] Updated to version 8.2.0
dmariogatto Jun 26, 2021
5f03fed
[Firebase][PerformanceMonitoring] Updated to version 8.2.0
dmariogatto Jun 26, 2021
ec83be9
[Firebase][RemoteConfig] Updated to version 8.2.0
dmariogatto Jun 26, 2021
77550ea
[Firebase][Storage] Updated to version 8.2.0
dmariogatto Jun 26, 2021
3374686
[Firebase][AppDistribution] Updated to version 8.2.0
dmariogatto Jun 26, 2021
d9d5c04
[Firebase][AppCheck] Updated version 8.2.0
dmariogatto Jun 26, 2021
afcf5ba
Fix `_FirebaseAnalyticsSDKBaseFolder` path
abnegate Jun 30, 2021
0b93e08
Merge pull request #3 from abnegate/bugfix/firebase-820
dmariogatto Jun 30, 2021
a42432c
Fix Google Tag Manager loader
abnegate Jul 1, 2021
a42971e
Merge pull request #4 from abnegate/bugfix/firebase-820
dmariogatto Jul 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 93 additions & 89 deletions Readme.md

Large diffs are not rendered by default.

466 changes: 54 additions & 412 deletions Xamarin.Google.sln

Large diffs are not rendered by default.

223 changes: 44 additions & 179 deletions cgmanifest.json

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions common.cake
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ void BuildSdkOnPodfile (Artifact artifact)
if (artifact.PodSpecs?.Length == 0)
return;

var baseArch = Platform.iOSArmV7;
var platforms = new [] { baseArch, Platform.iOSArm64, Platform.iOSSimulator64, Platform.iOSSimulator };
var baseArch = Platform.iOSArmV7;
// from iOS 11 only 64-bit builds are supported
var platforms = Version.TryParse(GetMinimunSupportedVersion(artifact), out var iosVer) && iosVer.Major > 10
? new [] { Platform.iOSArm64, Platform.iOSSimulator64 }
: new [] { baseArch, Platform.iOSArm64, Platform.iOSSimulator64, Platform.iOSSimulator };
var podsProject = "./Pods/Pods.xcodeproj";
var workingDirectory = (DirectoryPath)$"./externals/{artifact.Id}";

Expand Down
229 changes: 92 additions & 137 deletions components.cake

Large diffs are not rendered by default.

46 changes: 26 additions & 20 deletions samples/Firebase/AdMob/AdMobSample/AdsViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
using CoreGraphics;

using Google.MobileAds;
using Foundation;

namespace AdMobSample
{
public class AdsViewController : DialogViewController
{
public class AdsViewController : DialogViewController {
BannerView adViewTableView;
BannerView adViewWindow;
Interstitial adInterstitial;
InterstitialAd adInterstitial;

bool adOnTable;
bool adOnWindow;
Expand Down Expand Up @@ -46,9 +46,10 @@ void AddToTableView ()
if (adViewTableView == null) {
// Setup your BannerView, review AdSizeCons class for more Ad sizes.
adViewTableView = new BannerView (size: AdSizeCons.SmartBannerPortrait) {
AdUnitId = AdMobConstants.BannerId,

RootViewController = NavigationController
};
adViewTableView.AdUnitId = AdMobConstants.BannerId;

// Wire AdReceived event to know when the Ad is ready to be displayed
adViewTableView.AdReceived += (object sender, EventArgs e) => {
Expand Down Expand Up @@ -85,10 +86,10 @@ void AddToWindow ()
// Setup your GADBannerView, review AdSizeCons class for more Ad sizes.
adViewWindow = new BannerView (size: AdSizeCons.SmartBannerPortrait,
origin: new CGPoint (0, UIScreen.MainScreen.Bounds.Size.Height - AdSizeCons.Banner.Size.Height)) {
AdUnitId = AdMobConstants.BannerId,

RootViewController = NavigationController
};

adViewWindow.AdUnitId = AdMobConstants.BannerId;
// Wire AdReceived event to know when the Ad is ready to be displayed
adViewWindow.AdReceived += (object sender, EventArgs e) => {
if (!adOnWindow) {
Expand Down Expand Up @@ -119,30 +120,35 @@ void RemoveAdFromWindow ()

void AddToView ()
{
if (!adInterstitial.IsReady)
return;
if (adInterstitial?.CanPresent (NavigationController, out _) == true) {
adInterstitial.DismissedContent += (sender, args) => {
// Interstitial is a one time use object. That means once an interstitial is shown, HasBeenUsed
// returns true and the interstitial can't be used to load another ad.
// To request another interstitial, you'll need to create a new Interstitial object.
adInterstitial.Dispose ();
adInterstitial = null;
CreateAndRequestInterstitial ();
};

adInterstitial.Present (NavigationController);
adInterstitial.Present (NavigationController);
}
}

void CreateAndRequestInterstitial ()
{
adInterstitial = new Interstitial (AdMobConstants.IntersitialId);
adInterstitial.ScreenDismissed += (sender, e) => {
// Interstitial is a one time use object. That means once an interstitial is shown, HasBeenUsed
// returns true and the interstitial can't be used to load another ad.
// To request another interstitial, you'll need to create a new Interstitial object.
adInterstitial.Dispose ();
adInterstitial = null;
CreateAndRequestInterstitial ();
};
adInterstitial.LoadRequest (GetRequest ());
if (adInterstitial == null) {
InterstitialAd.Load (AdMobConstants.IntersitialId, GetRequest (), (ad, err) => {
if (ad != null) {
adInterstitial = ad;
}
});
}
}

Request GetRequest ()
{
var request = Request.GetDefaultRequest ();
return request;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using UIKit;
using UserNotifications;

using Firebase.InstanceID;
using Firebase.Core;
using Firebase.CloudMessaging;
using System;
Expand Down Expand Up @@ -53,21 +52,9 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary

Messaging.SharedInstance.Delegate = this;

InstanceId.SharedInstance.GetInstanceId (InstanceIdResultHandler);

return true;
}

void InstanceIdResultHandler (InstanceIdResult result, NSError error)
{
if (error != null) {
LogInformation (nameof (InstanceIdResultHandler), $"Error: {error.LocalizedDescription}");
return;
}

LogInformation (nameof (InstanceIdResultHandler), $"Remote Instance Id token: {result.Token}");
}

[Export ("messaging:didReceiveRegistrationToken:")]
public void DidReceiveRegistrationToken (Messaging messaging, string fcmToken)
{
Expand Down Expand Up @@ -105,15 +92,6 @@ public override void DidReceiveRemoteNotification (UIApplication application, NS
completionHandler (UIBackgroundFetchResult.NewData);
}

[Export ("messaging:didReceiveMessage:")]
public void DidReceiveMessage (Messaging messaging, RemoteMessage remoteMessage)
{
// Handle Data messages for iOS 10 and above.
HandleMessage (remoteMessage.AppData);

LogInformation (nameof (DidReceiveMessage), remoteMessage.AppData);
}

void HandleMessage (NSDictionary message)
{
if (MessageReceived == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
<Project>{9335A59B-3B54-4ED5-8201-B68CFD05CAFB}</Project>
<Name>Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\InstanceID\InstanceID.csproj">
<Project>{754D8F56-C3DB-4E33-91D5-45445AB286EF}</Project>
<Name>InstanceID</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\Installations\Installations.csproj">
<Project>{65ACD945-5A8A-419D-B9FB-8DFD03C532F4}</Project>
<Name>Installations</Name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary
// Override point for customization after application launch.
// If not required for your application you can safely delete this method

// Use Firebase library to configure APIs
App.Configure ();

var navigationController = Window.RootViewController as UINavigationController;

if (UIDevice.CurrentDevice.CheckSystemVersion (11, 0))
Expand Down Expand Up @@ -58,9 +61,6 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary
// The following line enables/disables custom traces
Performance.SharedInstance.DataCollectionEnabled = isPerformanceMonitoringDataCollectionEnabled;

// Use Firebase library to configure APIs
App.Configure ();

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void HandleRemoteConfigFetchCompletionHandler (RemoteConfigFetchStatus status, N

void OkAction ()
{
remoteConfig.ActivateFetched ();
remoteConfig.Activate ();

var indexPaths = TableView.IndexPathsForVisibleRows;
foreach (var indexPath in indexPaths) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@
<Project>{9335A59B-3B54-4ED5-8201-B68CFD05CAFB}</Project>
<Name>Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\InstanceID\InstanceID.csproj">
<Project>{754D8F56-C3DB-4E33-91D5-45445AB286EF}</Project>
<Name>InstanceID</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\PerformanceMonitoring\PerformanceMonitoring.csproj">
<Project>{3ECC9FBF-72BB-48E4-B454-56194A422B3A}</Project>
<Name>PerformanceMonitoring</Name>
Expand All @@ -174,7 +170,6 @@
<BundleResource Include="RemoteConfigDefaults.plist" />
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\..\..\source\Firebase\Core\Core.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\..\..\source\Firebase\PerformanceMonitoring\PerformanceMonitoring.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\..\..\packages\Xamarin.Build.Download.0.10.0\build\Xamarin.Build.Download.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Build.Download.0.10.0\build\Xamarin.Build.Download.targets')" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@
<Project>{9335A59B-3B54-4ED5-8201-B68CFD05CAFB}</Project>
<Name>Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\InstanceID\InstanceID.csproj">
<Project>{754D8F56-C3DB-4E33-91D5-45445AB286EF}</Project>
<Name>InstanceID</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\RemoteConfig\RemoteConfig.csproj">
<Project>{2FC178FA-114D-4A51-A3DF-5EA10E2C71C4}</Project>
<Name>RemoteConfig</Name>
Expand Down
2 changes: 1 addition & 1 deletion samples/Google/Maps/GoogleMapsAdvSample/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial class AppDelegate : UIApplicationDelegate
//
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
MapServices.ProvideAPIKey (MapsApiKey);
MapServices.ProvideApiKey (MapsApiKey);

window = new UIWindow (UIScreen.MainScreen.Bounds);

Expand Down
2 changes: 1 addition & 1 deletion samples/Google/Maps/GoogleMapsSample/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial class AppDelegate : UIApplicationDelegate

public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
MapServices.ProvideAPIKey ("<Get your Api Key at https://code.google.com/apis/console/>");
MapServices.ProvideApiKey ("<Get your Api Key at https://code.google.com/apis/console/>");

window = new UIWindow (UIScreen.MainScreen.Bounds) {
RootViewController = new MapViewController ()
Expand Down
48 changes: 20 additions & 28 deletions samples/Google/MobileAds/MobileAdsExample/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public partial class AppDelegate : UIApplicationDelegate

BannerView adViewTableView;
BannerView adViewWindow;
Interstitial adInterstitial;
InterstitialAd adInterstitial;

bool adOnTable = false;
bool adOnWindow = false;
Expand Down Expand Up @@ -75,9 +75,9 @@ void AddToTableView ()

// Setup your BannerView, review AdSizeCons class for more Ad sizes.
adViewTableView = new BannerView (size: AdSizeCons.Banner, origin: new CGPoint (-10, 0)) {
AdUnitID = bannerId,
RootViewController = navController
};
adViewTableView.AdUnitId = bannerId;

// Wire AdReceived event to know when the Ad is ready to be displayed
adViewTableView.AdReceived += (object sender, EventArgs e) => {
Expand Down Expand Up @@ -114,9 +114,9 @@ void AddToWindow ()
// Setup your GADBannerView, review AdSizeCons class for more Ad sizes.
adViewWindow = new BannerView (size: AdSizeCons.Banner,
origin: new CGPoint (0, window.Bounds.Size.Height - AdSizeCons.Banner.Size.Height)) {
AdUnitID = bannerId,
RootViewController = navController
};
adViewWindow.AdUnitId = bannerId;

// Wire AdReceived event to know when the Ad is ready to be displayed
adViewWindow.AdReceived += (object sender, EventArgs e) => {
Expand Down Expand Up @@ -152,35 +152,27 @@ void AddToView ()
return;

if (adInterstitial == null) {
adInterstitial = new Interstitial (intersitialId);

adInterstitial.ScreenDismissed += (sender, e) => {
interstitialRequested = false;

// You need to explicitly Dispose Interstitial when you dont need it anymore
// to avoid crashes if pending request are in progress
adInterstitial.Dispose ();
adInterstitial = null;
};
}
InterstitialAd.Load (intersitialId, Request.GetDefaultRequest (), (ad, err) => {
if (ad != null) {
adInterstitial = ad;

interstitialRequested = true;
adInterstitial.LoadRequest (Request.GetDefaultRequest ());
adInterstitial.DismissedContent += (sender, e) => {
interstitialRequested = false;

ShowInterstitial ();
}

async void ShowInterstitial ()
{
// We need to wait until the Intersitial is ready to show
do {
await Task.Delay (100);
} while (!adInterstitial.IsReady);
// You need to explicitly Dispose Interstitial when you dont need it anymore
// to avoid crashes if pending request are in progress
adInterstitial.Dispose ();
adInterstitial = null;
};

// Once is ready, show it
InvokeOnMainThread (() => adInterstitial.PresentFromRootViewController (navController));
adInterstitial.Present (navController);
}
else {
interstitialRequested = false;
}
});
}
}

}
}

27 changes: 14 additions & 13 deletions samples/Google/Places/GooglePlacesSample/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary
// Override point for customization after application launch.
// If not required for your application you can safely delete this method

if (string.IsNullOrWhiteSpace (GoogleApiKey.Key)) {
var message = $"Configure the Key property inside GoogleApiKey class for your bundle {NSBundle.MainBundle.BundleIdentifier}";
ShowMessage ("Google API Key is missing...", message, Window.RootViewController);
}

// Provide the Places API with your API key.
PlacesClient.ProvideApiKey (GoogleApiKey.Key);

// Provide the Maps API with your API key. You may not need
// this in your app, however we do need this for the demo
// app as it uses Maps.
MapServices.ProvideAPIKey (GoogleApiKey.Key);

var splitViewController = UIStoryboard.FromName ("Main", null).InstantiateViewController (nameof (UISplitViewController)) as UISplitViewController;
splitViewController.Delegate = this;
splitViewController.PreferredDisplayMode = UISplitViewControllerDisplayMode.PrimaryOverlay;
Expand All @@ -45,6 +32,20 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary
};
Window.MakeKeyAndVisible ();

if (string.IsNullOrWhiteSpace (GoogleApiKey.Key)) {
var message = $"Configure the Key property inside GoogleApiKey class for your bundle {NSBundle.MainBundle.BundleIdentifier}";
ShowMessage ("Google API Key is missing...", message, Window.RootViewController);
}
else {
// Provide the Places API with your API key.
PlacesClient.ProvideApiKey (GoogleApiKey.Key);

// Provide the Maps API with your API key. You may not need
// this in your app, however we do need this for the demo
// app as it uses Maps.
MapServices.ProvideApiKey (GoogleApiKey.Key);
}

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@
<Project>{9335A59B-3B54-4ED5-8201-B68CFD05CAFB}</Project>
<Name>Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Firebase\InstanceID\InstanceID.csproj">
<Project>{754D8F56-C3DB-4E33-91D5-45445AB286EF}</Project>
<Name>InstanceID</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\Google\TagManager\TagManager.csproj">
<Project>{3FCDD0B5-F60C-49F7-AAD7-497D02285A38}</Project>
<Name>TagManager</Name>
Expand Down
4 changes: 2 additions & 2 deletions source/Firebase/ABTesting/ABTesting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Firebase.ABTesting</RootNamespace>
<AssemblyName>Firebase.ABTesting</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>4.2.0</FileVersion>
<FileVersion>8.2.0</FileVersion>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand All @@ -23,7 +23,7 @@
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=2004275</PackageProjectUrl>
<PackageLicenseFile>License.md</PackageLicenseFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageVersion>4.2.0</PackageVersion>
<PackageVersion>8.2.0</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading