Open the Report navigator tab, select the last Build and search for xip.io. The IP address which gets embedded in the app should match your machines IP address plus the domain .xip.io (e.g. 10.0.1.123.xip.io)
3. Network/router configuration
-
React Native uses the wildcard DNS service xip.io to address your device. Some routers have security features to prevent DNS Servers to resolve anything in the local IP range.
+
React Native uses the wildcard DNS service xip.io to address your device, as Apple ATS prohibits URLs with IP addresses instead of domain names, and developers' networks are often not set up to resolve local hostnames. Some routers have security features to prevent DNS Servers from resolving to anything in the local IP range.
Now check if you are able to resolve the xip.io address, by running nslookup.
The Vibration API is exposed at Vibration.vibrate(). The vibration is asynchronous so this method will return immediately.
There will be no effect on devices that do not support Vibration, eg. the simulator.
Note for Android: add <uses-permission android:name="android.permission.VIBRATE"/> to AndroidManifest.xml
-
Since the vibration duration in iOS is not configurable, so there are some differences with Android. In Android, if pattern is a number, it specified the vibration duration in ms. If pattern is an array, those odd indices is the vibration duration, while the even one are the separation time.
+
Since the vibration duration in iOS is not configurable, so there are some differences with Android. In Android, if pattern is a number, it specifies the vibration duration in ms. If pattern is an array, those odd indices are the vibration duration, while the even ones are the separation time.
In iOS, invoking vibrate(duration) will just ignore the duration and vibrate for a fixed time. While the pattern array is used to define the duration between each vibration. See below example for more.
Repeatable vibration is also supported, the vibration will repeat with defined pattern until cancel() is called.
Example:
@@ -48,7 +48,7 @@ Vibration.cancel()
Name
Type
Required
Description
-
pattern
number or Array
Yes
Vibration pattern, accept a number or an array of number. Default to 400ms.
+
pattern
number or Array
Yes
Vibration pattern, accept a number or an array of numbers. Default to 400ms.
repeat
boolean
No
Repeat vibration pattern until cancel(), default to false.