react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[V1][iOS] How to implement AppDelegate.m for React Native 0.59

Open IanOnFire opened this issue 7 years ago • 6 comments

Issue Description

Hi there! We're still using react-native-navigation on v1 and are wondering how to implement the AppDelegate.m with the new structure for RN 0.59.

Steps to Reproduce / Code Snippets / Screenshots

You could use a fresh project.

react-native-init
yarn add [email protected]

Environment

  • React Native Navigation version: 1.1.493
  • React Native version: 0.59.0
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): ALL

IanOnFire avatar Mar 14 '19 15:03 IanOnFire

@IanOnFire please see: https://github.com/wix/react-native-navigation/commit/57caacddfc5422c00f41b32e031a732ab503b7dc

It helped me to use V1 with RN059

ghost avatar Mar 18 '19 15:03 ghost

@nethergrim, @IanOnFire, so how AppDelegate.m looks like?

alpamys-qanybet avatar Mar 23 '19 23:03 alpamys-qanybet

@IanOnFire, hey guys, I do not understand, my project is even cannot build with v1 on rn59, so how you not only resolved issues but get it built?

alpamys-qanybet avatar Mar 24 '19 00:03 alpamys-qanybet

ok guys, I do not exactly know what was my problem, I tried to re-create project and problem gone, and I just left AppDelegate.m as it was in old RNNv1 documented to make it work. Don't know if it is correct or not.

alpamys-qanybet avatar Mar 25 '19 01:03 alpamys-qanybet

@alpamys-qanybet your AppDelegate.m should look like how it is described in the documentation of V1. The commit referenced above ensures that it can understand the existing implementation of AppDelegate.m, so you should only update your navigation to include mentioned commit.

I can recommend updating your package.json to reference rnn like following: "react-native-navigation": "wix/react-native-navigation#57caacddfc5422c00f41b32e031a732ab503b7dc"

IanOnFire avatar Mar 25 '19 10:03 IanOnFire

I got an error when update code to this commit #4775 Dimensions.get("window").width returns zero in iOS when launch,#5248

genglei01 avatar Jul 01 '19 14:07 genglei01