@@ -22,12 +22,12 @@ about whether a particular feature is specific to iOS or Android.
2222Most of the system-related features are available through the ` System ` facade.
2323
2424``` php
25- use Native\Laravel \Facades\System;
25+ use Native\Ios \Facades\System;
2626```
2727
2828## Camera
2929
30- You may request the native camera interface to take a photograph by calling:
30+ You may request the native camera interface to take a photograph by calling the ` camera ` method :
3131
3232``` php
3333$imageData = System::camera()
@@ -50,6 +50,40 @@ decline, triggering the camera API will silently fail.**
5050
5151** COMING SOON**
5252
53+ ## Vibration
54+
55+ You may vibrate the user's device by calling the ` vibrate ` method:
56+
57+ ``` php
58+ System::vibrate()
59+ ```
60+
61+ ## Push Notifications
62+
63+ NativePHP makes it dead simple to enrol your user's device in push notifications from your app.
64+
65+ Simply use the ` enrolForPushNotifications ` method to trigger enrolment. If this is the first time that your app tries
66+ to enrol this device for push notifications, the user will be presented with a native alert, allowing them to opt-in.
67+
68+ Then use the ` getPushNotificationsToken ` method to retrieve the token. If enrolment was unsuccessful for some reason,
69+ this method will return ` null ` .
70+
71+ ``` php
72+ System::enrolForPushNotifications();
73+
74+ // Later...
75+
76+ if ($token = System::getPushNotificationsToken()) {
77+ // Do something with the token...
78+ }
79+ ```
80+
81+ Once you have the token, you may use it from your server-based applications to trigger Push Notifications directly to
82+ your user's device.
83+
84+ Find out more about what's required to use Push Notifications in
85+ [ Apple's Developer docs] ( https://developer.apple.com/notifications/ ) .
86+
5387## Accelerometer
5488
5589** COMING SOON**
@@ -115,23 +149,24 @@ For devices that support some form of biometric identification, you can use this
115149of your application.
116150
117151``` php
118- if (System::canPromptBiometricID() && System::promptBiometricID('access your Contacts' )) {
152+ if (System::promptForBiometricID( )) {
119153 // Do your super secret activity here
120154}
121155```
122156
123157Using this, you can gate certain parts of your app, allowing you to offer an extra layer of protection for your user's
124158data.
125159
126- ** Note: Biometric identification only gives you greater * confidence* that the person using your app is someone who has
127- the capacity to unlock the device your app is installed on. It does not allow you to * identify* that user or prove that
128- they are willingly taking this action.**
160+ ** Note: Despite the name, Biometric identification only gives you * greater confidence* that the person using your app
161+ is * someone * who has the capacity to unlock the device your app is installed on. It does not allow you to * identify*
162+ that user or prove that they are willingly taking this action.**
129163
130164## Time Zones
131165
132166** COMING SOON**
133167
134- PHP and your Laravel application will be configured to work with the time zone that the device is configured to use.
168+ PHP and your Laravel application are configured to work with the time zone that the device reports it is currently
169+ operating in.
135170
136171This means that, for the most part, any dates and times your show will already be in the appropriate time zone for the
137172user without having to ask your users to manually select their current time zone.
0 commit comments