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
Amplify need to be configured in each isolate which has a large memory footprint and will fail when configuring native resources multiple times (ex. DataStore).
Some plugins (ex. push notifications) can only run on the main isolate due to platform limitations.
WorkManager can stop the Flutter engine which deinitializes all of our native plugins thus breaking most packages.
Categories
Analytics
API (REST)
API (GraphQL)
Auth
Authenticator
DataStore
Notifications (Push)
Storage
Steps to Reproduce
//Spawning an isolate
final jsonData = await Isolate.run(_someFuction);
Description
Currently Amplify does not support running in isolates such as:
Amplify need to be configured in each isolate which has a large memory footprint and will fail when configuring native resources multiple times (ex. DataStore).
Some plugins (ex. push notifications) can only run on the main isolate due to platform limitations.
WorkManager can stop the Flutter engine which deinitializes all of our native plugins thus breaking most packages.
Categories
Steps to Reproduce
//Spawning an isolate
final jsonData = await Isolate.run(_someFuction);
//WorkManager Example
@pragma('vm:entry-point')
void callbackDispatcher() {
Workmanager().executeTask((task, inputData) async {
safePrint("executeTask");
return Future.value(true);
});
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final auth = AmplifyAuthCognito();
final pushPlugin = AmplifyPushNotificationsPinpoint();
await Amplify.addPlugins([auth, pushPlugin]);
await Amplify.configure(amplifyconfig);
Amplify.Notifications.Push.onTokenReceived.listen((event) {
safePrint("onTokenReceived: $event");
});
Workmanager().initialize(callbackDispatcher, isInDebugMode: true);
Workmanager().registerOneOffTask("test", "test");
runApp(const MyApp());
}
Screenshots
No response
Platforms
Flutter Version
2.34.2
Amplify Flutter Version
2.3.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: