Closed Huseyinnurbaki closed 2 years ago
Hi, after link script worked its deleted some part of my code, so what is exact fix? can you provide me appdelegate.mm file example just with navigation ? I'm using RN 0.69.6 version
@implementation AppDelegate
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions { RCTAppSetupPrepareApp(application);
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
openedFromSettings = [OpenedFromSettings allocWithZone:nil];
if ([FIRApp defaultApp] == nil) { [FIRApp configure]; } // DatePicker Fix for IOS 14 if (@available(iOS 14, )) { UIDatePicker picker = [UIDatePicker appearance]; picker.preferredDatePickerStyle = UIDatePickerStyleWheels; } [ReactNativeNavigation bootstrapWithDelegate:self launchOptions:launchOptions];
// commentid due to bug in ios 13
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self;
[RNSplashScreen show];
// [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]; // [VKSdk processOpenURL:url fromApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]];
return YES; }
OpenedFromSettings *openedFromSettings; // this function is firing when user opened application from device system notification settings: "AppName notification settings";
-(void)userNotificationCenter:(UNUserNotificationCenter )center willPresentNotification:(UNNotification )notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler { completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge); }
////iOS 9 workflow //- (BOOL)application:(UIApplication )app openURL:(NSURL )url options:(NSDictionary<NSString ,id> )options { // // [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]; // [VKSdk processOpenURL:url fromApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]]; // return YES; //}
// Required to register for notifications
/// This method controls whether the concurrentRoot
feature of React18 is turned on or off.
///
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
/// @return: true
if the concurrentRoot
feture is enabled. Otherwise, it returns false
.
(BOOL)concurrentRootEnabled { // Switch this bool to turn on and off the concurrent root return true; }
(NSDictionary )prepareInitialProps { NSMutableDictionary initProps = [NSMutableDictionary new]; return initProps; }
(NSArray<id
(NSURL )sourceURLForBridge:(RCTBridge )bridge {
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
}
@end
here is mine, please tell what is wrong here?
π Bug Report
npx rnn-link script must remove RCTAppSetupRootView. It's breaking RNN.
To Reproduce
Expected behavior
I expect script to remove lines correctly from app.delegate,mm file. Following lines are not removed and it's breaking the navigation.
Since they are executed after rnn's registered, app throws following errors and if I dismiss it, it partially works.
Script requires an update. Those 2 lines must be removed.
Your Environment
"react-native": "0.69.2", "react-native-navigation": "^7.28.1", IOS
Are you willing to resolve this issue by submitting a Pull Request?