模块iCloudstorage需要主要队列设置,因为它覆盖了`constantstoexport'

发布于 2025-02-03 20:04:30 字数 724 浏览 2 评论 0原文

在启动使用React-Native构建的iOS应用程序时,我会收到以下警告:

模块iCloudstorage需要主要队列设置,因为它覆盖了 ConstantStoExport,但不实现需要Enignsmainqueuesetup。在 将来版本的React本地将默认来初始化所有本机 除非明确选择。

,否则背景线程上的模块

我一直在寻找解决方案,但我唯一发现的是:

添加需要essmainqueuesetup,以防止警告和未来的副作用 在rccmanagermodule

它说我应该将以下片段添加到ios/rccmanagermodule.m

(BOOL)requiresMainQueueSetup
{
    return YES;
}

在我的反应生态项目中, no rccmanagermodule.m 文件。

还有其他解决方案吗?

如果可能的话,有人可以向我解释这个错误实际上说/含义是什么:在这种情况下,主要队列设置是什么?

When launching my iOS App built with react-native, I get the following warning:

Module iCloudStorage requires main queue setup since it overrides
constantsToExport but doesn't implement requiresMainQueueSetup. In
a future release React Native will default to initializing all native
modules on a background thread unless explicitly opted-out of.

I've been searching around to find a solution but the only thing I found was this:

add requiresMainQueueSetup to prevent warning and future side-effects
in RCCManagerModule

It says I should add the following snippet to ios/RCCManagerModule.m

(BOOL)requiresMainQueueSetup
{
    return YES;
}

There is no RCCManagerModule.m file in my react-native project.

Is there any other solution to this?

And if possible, could someone explain me what does this error actually says/means: what is main queue setup in this context?

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

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

发布评论

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

评论(2

对岸观火 2025-02-10 20:04:31

目前,React-Native-Audio的维护者表示,他不再维护该项目了,因此除非某人自愿接管维护,否则不可能解决。显然,它不应影响行为。参见此讨论

但是如视频您可以转到node_modules/node_modules/ react-native-audio/ios/audiorecordermanager.m,在行- (void)stopprogresstimer {之前,插入此代码:

+ (BOOL) requiresMainQueueSetup {
  return YES;
}

消除警告。

Currently the maintainer of react-native-audio has said he's not maintaining the project anymore, so it is unlikely to be fixed unless someone volunteers to take over maintenance. Apparently it should not affect behavior. See this discussion.

But as shown on the video mentioned in the above discussion, you can go to node_modules/react-native-audio/ios/AudioRecorderManager.m, and before the line - (void)stopProgressTimer {, insert this code:

+ (BOOL) requiresMainQueueSetup {
  return YES;
}

That eliminates the warning.

撞了怀 2025-02-10 20:04:31
@objc static func requiresMainQueueSetup() -> Bool {
return true
}
@objc static func requiresMainQueueSetup() -> Bool {
return true
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文