diff --git a/lib/core/blocs/session/session_cubit.dart b/lib/core/blocs/session/session_cubit.dart index e2b40b2..46d6927 100644 --- a/lib/core/blocs/session/session_cubit.dart +++ b/lib/core/blocs/session/session_cubit.dart @@ -176,8 +176,15 @@ class SessionCubit extends Cubit { ); if (settings.authorizationStatus == AuthorizationStatus.authorized) { - // 2. Cattura del token dal device - final String? fcmToken = await messaging.getToken(); + String? fcmToken; + if (kIsWeb) { + fcmToken = await messaging.getToken( + vapidKey: + 'BLMUr7crlRghEW6iWtRZ7Y0a74OPAMG9Oh37ewhVP3_5YD9e5RHUeO79sDys6P-7KjOz6I6HiaPqNndmatQlu3g', + ); + } else { + fcmToken = await messaging.getToken(); + } if (fcmToken != null) { final supabase = GetIt.I.get(); diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index b2ed8a5..9f93d17 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -2,23 +2,25 @@ - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - com.apple.security.network.client - - com.apple.security.device.camera - - com.apple.security.device.audio-input - - com.apple.security.print - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - + com.apple.developer.aps-environment + development + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + com.apple.security.files.downloads.read-write + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + com.apple.security.network.server + + com.apple.security.print + - \ No newline at end of file + diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index 118fc00..7b18ed8 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -2,19 +2,21 @@ - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.client - - com.apple.security.device.camera - - com.apple.security.device.audio-input - - com.apple.security.files.user-selected.read-write - - com.apple.security.print - + com.apple.developer.aps-environment + development + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + com.apple.security.files.user-selected.read-write + + com.apple.security.network.client + + com.apple.security.print + - \ No newline at end of file +