Skip to content

Commit

Permalink
RMET-3341 ::: Prepare main for Release 5.0.0-OS11 (#24)
Browse files Browse the repository at this point in the history
* chore: Raise Pod Version (#19)

Raises Pod version to 8.15.0

References: https://outsystemsrd.atlassian.net/browse/RMET-3144

* RMET-3165 ::: Android ::: Update Gradle Dependencies (#20)

* fix: Update Gradle Dependencies

Update com.android.tools.build:gradle to 3.6.4 and com.google.gms:google-services to 4.3.14

References: https://outsystemsrd.atlassian.net/browse/RMET-3164

* chore: Add CHANGELOG entry

References: https://outsystemsrd.atlassian.net/browse/RMET-3165

* RMET-3274 ::: iOS ::: Update 3rd Party that Adds Privacy Manifest (#22)

* chore: Update iOS SDK version

Update iOS' 3rd party SDK version to `10.23.0`.
Enable the `use_frameworks` flag for CocoaPods.
Fix import errors.

References: https://outsystemsrd.atlassian.net/browse/RMET-3274

* chore: Update deprecated call

Replace the `FIRDynamicLinks`'s `dynamicLinkFromUniversalLinkURL:` method with a new implementation using `dynamicLinkFromUniversalLinkURL:completion:`. This to fix a deprecation warning.

References: https://outsystemsrd.atlassian.net/browse/RMET-3274

* chore: Add CHANGELOG entry

References: https://outsystemsrd.atlassian.net/browse/RMET-3274

* chore: Set Release Version (#23)

Prepare release of `5.0.0-OS11`.
Clean `CHANGELOG`.

References: https://outsystemsrd.atlassian.net/browse/RMET-3341
  • Loading branch information
OS-ricardomoreirasilva authored Apr 15, 2024
1 parent 4a54f1b commit 09c2a98
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 21 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## [Unreleased]
## 5.0.0-OS11

### Features
- Update `FirebaseDynamicLinks` iOS pod to version `10.23.0`. This includes the Privacy Manifest (https://outsystemsrd.atlassian.net/browse/RMET-3274).

### Fixes
- Update the `com.android.tools.build:gradle` and `com.google.gms:google-services` gradle dependencies (https://outsystemsrd.atlassian.net/browse/RMET-3165).

## [5.0.0-OS10]

Expand Down
4 changes: 2 additions & 2 deletions hooks/android/build_gradle_add_dependency.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = function(ctx) {

var googleServicesStr = "if (project.extensions.findByName('googleServices') == null) { apply plugin: 'com.google.gms.google-services' }"
var googleServicesStrExists = false
var classpathsStrToVerify = "com.google.gms:google-services:4.3.10"
var classpathsStr = '\t\tclasspath "com.google.gms:google-services:4.3.10"'
var classpathsStrToVerify = "com.google.gms:google-services:4.3.14"
var classpathsStr = '\t\tclasspath "com.google.gms:google-services:4.3.14"'
var rootBuildGradlePath = "platforms/android/build.gradle"
var appBuildGradlePath = "platforms/android/app/build.gradle"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-firebase-dynamiclinks",
"version": "5.0.0-OS10",
"version": "5.0.0-OS11",
"description": "Cordova plugin for Firebase Dynamic Links",
"cordova": {
"id": "cordova-plugin-firebase-dynamiclinks",
Expand Down
8 changes: 4 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-firebase-dynamiclinks"
version="5.0.0-OS10">
version="5.0.0-OS11">

<name>FirebaseDynamicLinksPlugin</name>
<description>Cordova plugin for Firebase Dynamic Links</description>
Expand Down Expand Up @@ -58,7 +58,7 @@ xmlns:android="http://schemas.android.com/apk/res/android"
</platform>

<platform name="ios">
<preference name="IOS_FIREBASE_DYNAMICLINKS_VERSION" default="~> 8.6.0"/>
<preference name="IOS_FIREBASE_DYNAMICLINKS_VERSION" default="10.23.0"/>

<hook type="after_prepare" src="hooks/ios/iOSCopyPreferences.js" />

Expand Down Expand Up @@ -112,8 +112,8 @@ xmlns:android="http://schemas.android.com/apk/res/android"
<config>
<source url="https://cdn.cocoapods.org/" />
</config>
<pods>
<pod name="Firebase/DynamicLinks" spec="$IOS_FIREBASE_DYNAMICLINKS_VERSION" />
<pods use-frameworks="true">
<pod name="FirebaseDynamicLinks" spec="$IOS_FIREBASE_DYNAMICLINKS_VERSION" />
</pods>
</podspec>

Expand Down
4 changes: 2 additions & 2 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.google.gms:google-services:4.3.14'
}
}

Expand Down
38 changes: 28 additions & 10 deletions src/ios/AppDelegate+FirebaseDynamicLinksPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#import "FirebaseDynamicLinksPlugin.h"
#import <objc/runtime.h>


@implementation AppDelegate (FirebaseDynamicLinksPlugin)

+ (void)load {
Expand Down Expand Up @@ -56,18 +55,37 @@ - (BOOL)swizzled_application:(UIApplication *)app continueUserActivity:(NSUserAc
FirebaseDynamicLinksPlugin* dl = [self.viewController getCommandInstance:@"FirebaseDynamicLinks"];
// handle firebase dynamic link
return [[FIRDynamicLinks dynamicLinks]
handleUniversalLink:userActivity.webpageURL
completion:^(FIRDynamicLink * _Nullable dynamicLink, NSError * _Nullable error) {
handleUniversalLink:userActivity.webpageURL
completion:^(FIRDynamicLink * _Nullable dynamicLink, NSError * _Nullable error) {
// assign obtained variable to the one to post.
__block FIRDynamicLink *dynamicLinkToPost;

// creates a group to vobtained the block's value.
dispatch_group_t group = dispatch_group_create();
dispatch_group_enter(group);

// If `dynamicLink` is filled, just set `dynamicLinkToPost` with it.
// Otherwise, we need to obtain it from the Universal Link URL.
if (dynamicLink) {
dynamicLinkToPost = dynamicLink;
dispatch_group_leave(group);
} else {
// Try this method as some dynamic links are not recognize by handleUniversalLink
// ISSUE: https://github.com/firebase/firebase-ios-sdk/issues/743
dynamicLink = dynamicLink ? dynamicLink
: [[FIRDynamicLinks dynamicLinks]
dynamicLinkFromUniversalLinkURL:userActivity.webpageURL];

if (dynamicLink) {
[dl postDynamicLink:dynamicLink];
[[FIRDynamicLinks dynamicLinks]
dynamicLinkFromUniversalLinkURL:userActivity.webpageURL
completion:^(FIRDynamicLink * _Nullable alternateDynamicLink, NSError * _Nullable error) {
dynamicLinkToPost = alternateDynamicLink;
dispatch_group_leave(group);
}];
}

dispatch_group_notify(group, dispatch_get_main_queue(), ^{
if (dynamicLinkToPost) {
[dl postDynamicLink:dynamicLinkToPost];
}
}] || handled;
});
}] || handled;
}

@end
2 changes: 1 addition & 1 deletion src/ios/FirebaseDynamicLinksPlugin.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <Cordova/CDV.h>
#import "AppDelegate.h"

@import Firebase;
@import FirebaseDynamicLinks;

@interface FirebaseDynamicLinksPlugin : CDVPlugin

Expand Down
2 changes: 2 additions & 0 deletions src/ios/FirebaseDynamicLinksPlugin.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import "FirebaseDynamicLinksPlugin.h"

@import FirebaseCore;

@implementation FirebaseDynamicLinksPlugin

- (void)pluginInitialize {
Expand Down

0 comments on commit 09c2a98

Please sign in to comment.