react-native-international-phone-number 0.6.4 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,7 +45,7 @@
45
45
 
46
46
  - [Old Versions](#old-versions)
47
47
  - [Installation](#installation)
48
- - [Additional Config to Web](#additional-config-to-web)
48
+ - [Additional Config](#additional-config)
49
49
  - [Features](#features)
50
50
  - [Basic Usage](#basic-usage)
51
51
  - [With Class Component](#class-component)
@@ -96,7 +96,9 @@ OR
96
96
  $ yarn add react-native-international-phone-number
97
97
  ```
98
98
 
99
- ## Additional config to `Web`
99
+ ## Additional config
100
+
101
+ ### iOS and Web
100
102
 
101
103
  - Using React Native CLI:
102
104
 
@@ -109,11 +111,17 @@ create a `react-native.config.js` file at the root of your react-native project
109
111
  android: {},
110
112
  },
111
113
  assets: [
112
- './node_modules/react-native-international-phone-number/assets/fonts',
114
+ './node_modules/react-native-international-phone-number/lib/assets/fonts',
113
115
  ],
114
116
  };
115
117
  ```
116
118
 
119
+ Then link the font to your native projects with:
120
+
121
+ ```bash
122
+ npx react-native-asset
123
+ ```
124
+
117
125
  - Using Expo:
118
126
 
119
127
  1. Install [expo-fonts](https://docs.expo.dev/versions/latest/sdk/font/): `npx expo install expo-font`;
@@ -125,7 +133,7 @@ create a `react-native.config.js` file at the root of your react-native project
125
133
  ...
126
134
 
127
135
  useFonts({
128
- 'TwemojiMozilla': require('./node_modules/react-native-international-phone-number/assets/fonts/TwemojiMozilla.ttf'),
136
+ 'TwemojiMozilla': require('./node_modules/react-native-international-phone-number/lib/assets/fonts/TwemojiMozilla.ttf'),
129
137
  });
130
138
 
131
139
  ...
@@ -133,6 +141,23 @@ create a `react-native.config.js` file at the root of your react-native project
133
141
 
134
142
  > Observation: _you need to recompile your project after adding new fonts._
135
143
 
144
+ ## only iOS
145
+
146
+ - Edit `Info.plist` inside `ios` folder with following code:
147
+
148
+ ```bash
149
+ ...
150
+ <key>UIAppFonts</key>
151
+ <array>
152
+ <string>TwemojiMozilla.ttf</string>
153
+ ...
154
+ </array>
155
+ ```
156
+
157
+ and add the font `Twemoji Mozilla` to the Copy Bundle Resources, in Build Phases inside your project XCode.
158
+
159
+ > Observation: _you need to recompile your project after adding new fonts._
160
+
136
161
  <br>
137
162
 
138
163
  ## Features
@@ -1263,7 +1263,7 @@ export const countries = [
1263
1263
  ua: "Кот-д'Івуар",
1264
1264
  zh: '科特迪瓦',
1265
1265
  },
1266
- phoneMasks: ['## ### ###'],
1266
+ phoneMasks: ['## ### ###', '## ## ## ####'],
1267
1267
  },
1268
1268
  {
1269
1269
  callingCode: '+682',
@@ -1347,7 +1347,7 @@ export const countries = [
1347
1347
  ua: 'Камерун',
1348
1348
  zh: '喀麥隆',
1349
1349
  },
1350
- phoneMasks: ['#### ####'],
1350
+ phoneMasks: ['#### ####', '### ### ###'],
1351
1351
  },
1352
1352
  {
1353
1353
  callingCode: '+86',
@@ -2082,7 +2082,7 @@ export const countries = [
2082
2082
  ua: 'Франція',
2083
2083
  zh: '法國',
2084
2084
  },
2085
- phoneMasks: ['### ### ###'],
2085
+ phoneMasks: ['# ## ## ## ##', '## ## ## ## ##'],
2086
2086
  },
2087
2087
  {
2088
2088
  callingCode: '+241',
@@ -3961,7 +3961,7 @@ export const countries = [
3961
3961
  ua: 'Мадагаскар',
3962
3962
  zh: '馬達加斯加',
3963
3963
  },
3964
- phoneMasks: ['## ## #####'],
3964
+ phoneMasks: ['## ## ### ##'],
3965
3965
  },
3966
3966
  {
3967
3967
  callingCode: '+692',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-international-phone-number",
3
3
  "author": "AstrOOnauta (https://github.com/AstrOOnauta)",
4
- "version": "0.6.4",
4
+ "version": "0.6.6",
5
5
  "description": "International mobile phone input component with mask for React Native",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",