user18124547
user18124547

Reputation:

How can solve this issues? ArgumentError (Invalid argument(s): iOS settings must be set when targeting iOS platform.)

How can solve this issues?

ArgumentError (Invalid argument(s): iOS settings must be set when targeting iOS platform.)

I had added the Notification, but when I running the iOS simulator I get this error How can solve this issues? ArgumentError (Invalid argument(s): iOS settings must be set when targeting iOS platform.)

But it's can working real devices, just cannot working iOS simulator

Upvotes: 3

Views: 6694

Answers (2)

Franco Romano
Franco Romano

Reputation: 135

in your current local notifications initializer you have to add the ios setting, so it would look like this:

await flutterLocalNotificationsPlugin.initialize(
const InitializationSettings(
  android: AndroidInitializationSettings('mipmap/ic_launcher'),
  iOS: DarwinInitializationSettings() //YOU JUST HAVE TO ADD THIS
), );

Upvotes: 2

Maqsood
Maqsood

Reputation: 937

Push notifications do not work on iPhone simulators.They require a provisioning profile from iTunes Connect, and thus are required to be installed on a device.so if it is working fine on real devices, then no need to worry.

Upvotes: 6

Related Questions