如何解决这个问题?参数ERROR(无效参数:iOS设置在定位iOS平台时必须设置。)

发布于 2025-02-09 09:52:48 字数 168 浏览 3 评论 0 原文

如何解决这个问题?

参数Error(无效的参数:定位iOS平台时必须设置iOS设置。)

我添加了通知,但是当我运行iOS模拟器时,我会得到此错误如何解决此问题问题?参数(无效参数:目标时必须设置iOS设置

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁月蹉跎了容颜 2025-02-16 09:52:48

推送通知不适用于iPhone模拟器。它们需要iTunes Connect的配置配置文件,因此需要安装在设备上。因此,如果它在真实设备上正常工作,则不必担心。

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.

夜还是长夜 2025-02-16 09:52:48

在您当前的本地通知初始化器中,您必须添加iOS设置,因此看起来像这样:

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

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
), );
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文