Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react-navigation): new way to handle deep link
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
- Loading branch information
Showing
8 changed files
with
173 additions
and
48 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
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
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,9 +1,22 @@ | ||
// | ||
// RCTLog.swift | ||
// Berty | ||
// | ||
// Created by sacha on 27/02/2019. | ||
// Copyright © 2019 Berty Technologies. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
|
||
func RCTLogError(_ message: String, _ file: String=#file, _ line: UInt=#line) { | ||
RCTSwiftLog.error(message, file: file, line: line) | ||
} | ||
|
||
func RCTLogWarn(_ message: String, _ file: String=#file, _ line: UInt=#line) { | ||
RCTSwiftLog.warn(message, file: file, line: line) | ||
} | ||
|
||
func RCTLogInfo(_ message: String, _ file: String=#file, _ line: UInt=#line) { | ||
RCTSwiftLog.info(message, file: file, line: line) | ||
} | ||
|
||
func RCTLog(_ message: String, _ file: String=#file, _ line: UInt=#line) { | ||
RCTSwiftLog.log(message, file: file, line: line) | ||
} | ||
|
||
func RCTLogTrace(_ message: String, _ file: String=#file, _ line: UInt=#line) { | ||
RCTSwiftLog.trace(message, file: file, line: line) | ||
} |
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,17 +1,19 @@ | ||
// | ||
// RCTSwiftLog.h | ||
// Berty | ||
// | ||
// Created by sacha on 27/02/2019. | ||
// Copyright © 2019 Berty Technologies. All rights reserved. | ||
// | ||
// Created by Jimmy Dee on 4/5/17. | ||
// | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface RCTSwiftLog : NSObject | ||
|
||
@end | ||
+ (void)error:(NSString * _Nonnull)message file:(NSString * _Nonnull)file line:(NSUInteger)line; | ||
+ (void)warn:(NSString * _Nonnull)message file:(NSString * _Nonnull)file line:(NSUInteger)line; | ||
+ (void)info:(NSString * _Nonnull)message file:(NSString * _Nonnull)file line:(NSUInteger)line; | ||
+ (void)log:(NSString * _Nonnull)message file:(NSString * _Nonnull)file line:(NSUInteger)line; | ||
+ (void)trace:(NSString * _Nonnull)message file:(NSString * _Nonnull)file line:(NSUInteger)line; | ||
|
||
NS_ASSUME_NONNULL_END | ||
@end |
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,13 +1,40 @@ | ||
// | ||
// RCTSwiftLog.m | ||
// Berty | ||
// | ||
// Created by sacha on 27/02/2019. | ||
// Copyright © 2019 Berty Technologies. All rights reserved. | ||
// | ||
// Created by Jimmy Dee on 4/5/17. | ||
// | ||
// | ||
|
||
#import <React/RCTLog.h> | ||
|
||
#import "RCTSwiftLog.h" | ||
|
||
@implementation RCTSwiftLog | ||
|
||
+ (void)info:(NSString *)message file:(NSString *)file line:(NSUInteger)line | ||
{ | ||
_RCTLogNativeInternal(RCTLogLevelInfo, file.UTF8String, (int)line, @"%@", message); | ||
} | ||
|
||
+ (void)warn:(NSString *)message file:(NSString *)file line:(NSUInteger)line | ||
{ | ||
_RCTLogNativeInternal(RCTLogLevelWarning, file.UTF8String, (int)line, @"%@", message); | ||
} | ||
|
||
+ (void)error:(NSString *)message file:(NSString *)file line:(NSUInteger)line | ||
{ | ||
_RCTLogNativeInternal(RCTLogLevelError, file.UTF8String, (int)line, @"%@", message); | ||
} | ||
|
||
+ (void)log:(NSString *)message file:(NSString *)file line:(NSUInteger)line | ||
{ | ||
_RCTLogNativeInternal(RCTLogLevelInfo, file.UTF8String, (int)line, @"%@", message); | ||
} | ||
|
||
+ (void)trace:(NSString *)message file:(NSString *)file line:(NSUInteger)line | ||
{ | ||
_RCTLogNativeInternal(RCTLogLevelTrace, file.UTF8String, (int)line, @"%@", message); | ||
} | ||
|
||
@end |