[ios] fix DynamicLink pod import issue and post installation initialization issue
This commit is contained in:
parent
fbdc733d53
commit
e9b139f5dd
@ -431,6 +431,7 @@
|
|||||||
"${SRCROOT}/../../../ios/Pods/FirebaseCore/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseCore/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseCrash/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseCrash/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseDatabase/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseDatabase/Frameworks",
|
||||||
|
"${SRCROOT}/../../../ios/Pods/FirebaseDynamicLinks/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseFirestore/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseFirestore/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseInstanceID/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseInstanceID/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseMessaging/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseMessaging/Frameworks",
|
||||||
@ -469,6 +470,7 @@
|
|||||||
"${SRCROOT}/../../../ios/Pods/FirebaseCore/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseCore/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseCrash/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseCrash/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseDatabase/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseDatabase/Frameworks",
|
||||||
|
"${SRCROOT}/../../../ios/Pods/FirebaseDynamicLinks/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseFirestore/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseFirestore/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseInstanceID/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseInstanceID/Frameworks",
|
||||||
"${SRCROOT}/../../../ios/Pods/FirebaseMessaging/Frameworks",
|
"${SRCROOT}/../../../ios/Pods/FirebaseMessaging/Frameworks",
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
#define RNFirebaseLinks_h
|
#define RNFirebaseLinks_h
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
#if __has_include(<FirebaseDynamicLinks/FIRDynamicLinks.h>)
|
#if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
|
||||||
#import <Firebase.h>
|
#import <FirebaseDynamicLinks/FirebaseDynamicLinks.h>
|
||||||
#import <React/RCTBridgeModule.h>
|
#import <React/RCTBridgeModule.h>
|
||||||
#import <React/RCTEventEmitter.h>
|
#import <React/RCTEventEmitter.h>
|
||||||
|
|
||||||
@interface RNFirebaseLinks : RCTEventEmitter<RCTBridgeModule> {
|
@interface RNFirebaseLinks : RCTEventEmitter<RCTBridgeModule> {
|
||||||
|
|
||||||
}
|
}
|
||||||
+ (BOOL)application:(UIApplication *)app
|
+ (BOOL)application:(UIApplication *)app
|
||||||
openURL:(NSURL *)url
|
openURL:(NSURL *)url
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#import "RNFirebaseLinks.h"
|
#import "RNFirebaseLinks.h"
|
||||||
|
|
||||||
#if __has_include(<FirebaseDynamicLinks/FIRDynamicLink.h>)
|
#if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
|
||||||
|
#import <Firebase.h>
|
||||||
#import "RNFirebaseEvents.h"
|
#import "RNFirebaseEvents.h"
|
||||||
|
|
||||||
|
|
||||||
@ -49,11 +50,12 @@ RCT_EXPORT_MODULE();
|
|||||||
return [self handleLinkFromCustomSchemeURL:url];
|
return [self handleLinkFromCustomSchemeURL:url];
|
||||||
}
|
}
|
||||||
|
|
||||||
+(BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url {
|
+ (BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url {
|
||||||
FIRDynamicLink *dynamicLink =
|
FIRDynamicLink *dynamicLink =
|
||||||
[[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
|
[[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
|
||||||
if (dynamicLink) {
|
if (dynamicLink && dynamicLink.url) {
|
||||||
sendDynamicLink(dynamicLink.url, self);
|
NSURL* dynamicLinkUrl = dynamicLink.url;
|
||||||
|
sendDynamicLink(dynamicLinkUrl, self);
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
@ -194,7 +196,7 @@ RCT_EXPORT_METHOD(createShortDynamicLink: (NSDictionary *) metadata resolver:(RC
|
|||||||
if (androidParametersDict) {
|
if (androidParametersDict) {
|
||||||
FIRDynamicLinkAndroidParameters *androidParams = [FIRDynamicLinkAndroidParameters
|
FIRDynamicLinkAndroidParameters *androidParams = [FIRDynamicLinkAndroidParameters
|
||||||
parametersWithPackageName: androidParametersDict[@"androidPackageName"]];
|
parametersWithPackageName: androidParametersDict[@"androidPackageName"]];
|
||||||
|
|
||||||
if (androidParametersDict[@"androidFallbackLink"]) {
|
if (androidParametersDict[@"androidFallbackLink"]) {
|
||||||
androidParams.fallbackURL = [NSURL URLWithString:androidParametersDict[@"androidFallbackLink"]];
|
androidParams.fallbackURL = [NSURL URLWithString:androidParametersDict[@"androidFallbackLink"]];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user