2
0
mirror of synced 2025-01-11 14:44:12 +00:00

[ios] fix DynamicLink pod import issue and post installation initialization issue

This commit is contained in:
Omer Levy 2017-10-14 18:33:30 -04:00
parent fbdc733d53
commit e9b139f5dd
3 changed files with 12 additions and 8 deletions

View File

@ -431,6 +431,7 @@
"${SRCROOT}/../../../ios/Pods/FirebaseCore/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseCrash/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseDatabase/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseDynamicLinks/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseFirestore/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseInstanceID/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseMessaging/Frameworks",
@ -469,6 +470,7 @@
"${SRCROOT}/../../../ios/Pods/FirebaseCore/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseCrash/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseDatabase/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseDynamicLinks/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseFirestore/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseInstanceID/Frameworks",
"${SRCROOT}/../../../ios/Pods/FirebaseMessaging/Frameworks",

View File

@ -2,13 +2,13 @@
#define RNFirebaseLinks_h
#import <Foundation/Foundation.h>
#if __has_include(<FirebaseDynamicLinks/FIRDynamicLinks.h>)
#import <Firebase.h>
#if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
#import <FirebaseDynamicLinks/FirebaseDynamicLinks.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
@interface RNFirebaseLinks : RCTEventEmitter<RCTBridgeModule> {
}
+ (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url

View File

@ -1,6 +1,7 @@
#import "RNFirebaseLinks.h"
#if __has_include(<FirebaseDynamicLinks/FIRDynamicLink.h>)
#if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
#import <Firebase.h>
#import "RNFirebaseEvents.h"
@ -49,11 +50,12 @@ RCT_EXPORT_MODULE();
return [self handleLinkFromCustomSchemeURL:url];
}
+(BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url {
+ (BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url {
FIRDynamicLink *dynamicLink =
[[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
if (dynamicLink) {
sendDynamicLink(dynamicLink.url, self);
if (dynamicLink && dynamicLink.url) {
NSURL* dynamicLinkUrl = dynamicLink.url;
sendDynamicLink(dynamicLinkUrl, self);
return YES;
}
return NO;
@ -194,7 +196,7 @@ RCT_EXPORT_METHOD(createShortDynamicLink: (NSDictionary *) metadata resolver:(RC
if (androidParametersDict) {
FIRDynamicLinkAndroidParameters *androidParams = [FIRDynamicLinkAndroidParameters
parametersWithPackageName: androidParametersDict[@"androidPackageName"]];
if (androidParametersDict[@"androidFallbackLink"]) {
androidParams.fallbackURL = [NSURL URLWithString:androidParametersDict[@"androidFallbackLink"]];
}