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
@@ -172,7 +191,38 @@ export default function App() {
172
191
console.log('Unregistered from in-app forms');
173
192
};
174
193
175
-
// Push notifications handler
194
+
// Geofencing handlers
195
+
consthandleRegisterGeofencing=()=>{
196
+
Klaviyo.registerGeofencing();
197
+
setGeofencingRegistered(true);
198
+
console.log('Registered for geofencing');
199
+
};
200
+
201
+
consthandleUnregisterGeofencing=()=>{
202
+
Klaviyo.unregisterGeofencing();
203
+
setGeofencingRegistered(false);
204
+
console.log('Unregistered from geofencing');
205
+
};
206
+
207
+
consthandleRequestLocationPermission=async()=>{
208
+
awaitrequestLocationPermission();
209
+
// Refresh permission state after requesting
210
+
awaitrefreshLocationPermission();
211
+
};
212
+
213
+
// Push notifications handlers
214
+
consthandleRequestPushPermission=()=>{
215
+
// Note: This is a placeholder. In a real app, you would use a push notification
216
+
// library like @react-native-firebase/messaging or react-native-push-notification
217
+
// to request push permissions. The Klaviyo SDK will handle the token registration
218
+
// when you call setPushToken.
219
+
Alert.alert(
220
+
'Push Notifications',
221
+
'Push notification permission requests should be handled by your push notification library (e.g., Firebase). The SDK will automatically register the token when available.',
0 commit comments