forked from nprudnikov/PrFirebase
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Firebase iOS 8.4.0 https://github.com/firebase/firebase-ios…
…-sdk/releases/tag/8.4.0 + added utility to re-generate lib archives
- Loading branch information
Showing
37 changed files
with
262 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/Intermediate/ | ||
/Binaries/ | ||
.DS_Store | ||
|
||
/Tools/venv/ | ||
/Tools/Libraries/ | ||
/Tools/*.zip | ||
/Tools/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
Source/PrFirebase/Private/iOS/PrFirebaseAppDistributionModule_iOS.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2020-2021 Vladimir Alyamkin. All Rights Reserved. | ||
|
||
#include "iOS/PrFirebaseAppDistributionModule_iOS.h" | ||
|
||
#include "PrFirebaseDefines.h" | ||
|
||
#if WITH_FIREBASE_APPDISTRIBUTION && PLATFORM_IOS | ||
#include "IOSAppDelegate.h" | ||
|
||
#import <Firebase.h> | ||
|
||
void UPrFirebaseAppDistributionModule_iOS::CheckForUpdate() | ||
{ | ||
// Sign in a tester without automatically checking for update | ||
if(![[FIRAppDistribution appDistribution] isTesterSignedIn]) { | ||
[[FIRAppDistribution appDistribution] | ||
signInTesterWithCompletion:^(NSError *_Nullable error) { | ||
if (error) { | ||
NSLog(@"Firebase: SignIn failed"); | ||
return; | ||
} | ||
}]; | ||
} | ||
|
||
// Only check for update if tester is already signed in - do not prompt | ||
if([[FIRAppDistribution appDistribution] isTesterSignedIn]) { | ||
[[FIRAppDistribution appDistribution] | ||
checkForUpdateWithCompletion:^(FIRAppDistributionRelease *_Nullable release, | ||
NSError *_Nullable error) { | ||
if (error) { | ||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Check For Update" | ||
message:[NSString stringWithFormat:@"Error during tester sign in! %@", error.localizedDescription] | ||
preferredStyle:UIAlertControllerStyleAlert]; | ||
|
||
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault | ||
handler:^(UIAlertAction *action) {}]; | ||
|
||
[alert addAction:okAction]; | ||
[[IOSAppDelegate GetDelegate].IOSController presentViewController:alert animated:YES completion:nil]; | ||
|
||
return; | ||
} | ||
|
||
if (release) { | ||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"New Version Available" | ||
message:[NSString stringWithFormat:@"Version %@ (%@) is available.", release.displayVersion, | ||
release.buildVersion] preferredStyle:UIAlertControllerStyleAlert]; | ||
|
||
UIAlertAction *updateAction = [UIAlertAction actionWithTitle:@"Update" | ||
style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { | ||
[[UIApplication sharedApplication] openURL:release.downloadURL options:@{} completionHandler:nil]; | ||
}]; | ||
|
||
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" | ||
style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {}]; | ||
|
||
[alert addAction:updateAction]; | ||
[alert addAction:cancelAction]; | ||
|
||
[[IOSAppDelegate GetDelegate].IOSController presentViewController:alert animated:YES completion:nil]; | ||
} | ||
}]; | ||
} | ||
} | ||
|
||
#endif // WITH_FIREBASE_CRASHLYTICS && PLATFORM_IOS |
20 changes: 20 additions & 0 deletions
20
Source/PrFirebase/Private/iOS/PrFirebaseAppDistributionModule_iOS.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright 2020-2021 Vladimir Alyamkin. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "PrFirebaseAppDistributionModule.h" | ||
|
||
#include "PrFirebaseAppDistributionModule_iOS.generated.h" | ||
|
||
UCLASS() | ||
class UPrFirebaseAppDistributionModule_iOS : public UPrFirebaseAppDistributionModule | ||
{ | ||
GENERATED_BODY() | ||
|
||
#if WITH_FIREBASE_APPDISTRIBUTION && PLATFORM_IOS | ||
|
||
public: | ||
virtual void CheckForUpdate() override; | ||
|
||
#endif | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Source/PrFirebase/Public/PrFirebaseAppDistributionModule.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2020-2021 Vladimir Alyamkin. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "PrFirebaseModule.h" | ||
|
||
#include "PrFirebaseDefines.h" | ||
|
||
#include "PrFirebaseAppDistributionModule.generated.h" | ||
|
||
UCLASS() | ||
class PRFIREBASE_API UPrFirebaseAppDistributionModule : public UPrFirebaseModule | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
UFUNCTION(BlueprintCallable, Category = "Firebase|Distribution") | ||
virtual void CheckForUpdate() { Firebase_NotImplemented(); } | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.