Fix rejected apple delete account & start for notification
### No issue
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// utils/notifications.ts
|
||||
import * as Device from 'expo-device';
|
||||
import * as Notifications from 'expo-notifications';
|
||||
import Constants from 'expo-constants';
|
||||
import * as Device from 'expo-device';
|
||||
|
||||
|
||||
Notifications.setNotificationHandler({
|
||||
handleNotification: async () => ({
|
||||
@@ -13,7 +14,7 @@ Notifications.setNotificationHandler({
|
||||
}),
|
||||
});
|
||||
|
||||
export async function registerForPushNotificationsAsync() {
|
||||
export default async function registerForPushNotificationsAsync() {
|
||||
if (!Device.isDevice) {
|
||||
console.warn("Push notifications don't work on simulator");
|
||||
return null;
|
||||
|
||||
9
utils/openBrower.ts
Normal file
9
utils/openBrower.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import * as WebBrowser from "expo-web-browser";
|
||||
|
||||
export const openBrowser = async (url: string) => {
|
||||
try {
|
||||
await WebBrowser.openBrowserAsync(url);
|
||||
} catch (error) {
|
||||
console.error("Gagal membuka browser:", error);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user