You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 7, 2019. It is now read-only.
-[[MO] Debug Javascript on an iOS Device](/react-native/debugging/debug-javascript-ios-device.mo.md)
65
65
-[[MO] Debug a React Native WebView](/react-native/debugging/debug-webviews.mo.md)
66
+
-[[Standard] What differences between iOS and android should I be aware of as a react-native developer?]((/react-native/debugging/differences-between-ios-and-android.s.md)
Copy file name to clipboardexpand all lines: react-native/debugging/differences-between-ios-and-android.s.md
+9-8
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
-
##What differences between iOS and android should I be aware of as a react-native developer?
1
+
#[Standard] What differences between iOS and android should I be aware of as a react-native developer?
2
2
## ... and when should I double check my feature on both platforms?
3
3
4
4
*react-native is awesome because it lets you build both iOS and android apps with the same javascript codebase...*
5
5
6
-
While coding I usually use the iOS simulator only. Most of the time, if the feature works on iOS then it works on android automatically. Of course there are a few exceptions: in this article you will find a non comprehensive list of caveats.
6
+
While coding I usually use the iOS simulator only. Most of the time, if the feature works on iOS then it works on android automatically. Of course there are a few exceptions: in this article you will find a non comprehensive list of these exceptions.
7
7
8
+
## Owner: [Pierre-Louis Le Portz](https://github.com/pleportz)
8
9
9
-
###I modified the native code
10
+
## I modified the native code
10
11
11
12
- I added/updated a **font**
12
13
@@ -24,11 +25,11 @@ While coding I usually use the iOS simulator only. Most of the time, if the feat
24
25
25
26
- References: See [How to add a native module](https://github.com/bamlab/dev-standards/blob/master/react-native/setup/add-native-module.mo.md)
26
27
27
-
###I added a fixed height property to a component
28
+
## I added a fixed height property to a component
28
29
29
30
- Why: Unlike iOS, android sets the default behaviour to the react-native `<View />` component to `overflow: hidden`. Using a fixed height often ends up with cut texts or cut images on android.
30
31
31
-
###I added shadows to a component
32
+
## I added shadows to a component
32
33
33
34
- Works on iOS / does not on android:
34
35
@@ -63,14 +64,14 @@ const styles = {
63
64
}
64
65
```
65
66
66
-
###I used react-native's `<TextInput />` component
67
+
## I used react-native's `<TextInput />` component
67
68
68
69
- Why: <TextInput /> does not render identically on android and iOS:
69
70
70
71
- With android you might need to specify the `underlineColorAndroid` prop (can be set to `"transparent"` for example)
71
72
- The vertical alignment of the input text is not the same. This can be solved by using a marginTop that depends on the platform: `marginTop: Platform.OS === 'ios ? ...'`
72
73
73
-
###I mistakenly added text direcly as a `<View />`'s child
74
+
## I mistakenly added text direcly as a `<View />`'s child
74
75
75
76
- Why: `<View>Hello</View>` does not crash iOS but crashes on android with the following error `Cannot add a child that doesn't have a YogaNode to a parent without a measure function! (Trying to add a 'ReactVirtualTextShadowNode' to a 'NativeViewWrapper')`
###I used a javascript function that is not implemented the same way in react-native's javascript interpreters for android and iOS
91
+
## I used a javascript function that is not implemented the same way in react-native's javascript interpreters for android and iOS
91
92
92
93
- Why: As of July 2018, react-native's javascript interpreter for android is a little bit late compared to iOS's. There are a few methods that just won't work with android:
0 commit comments