gpt4 book ai didi

react-native - iOS 中没有开发模式的 React Native 0.29+?

转载 作者:行者123 更新时间:2023-12-02 09:43:12 25 4
gpt4 key购买 nike

升级到 RN 0.29.1 后,我的 AppDelegate.m 文件中没有可以显示 dev=false 的 URL...是否有一种明显的方法可以关闭我缺少的开发模式?

最佳答案

Facebook 似乎没有更新有关如何使用新 RCTBundleURLProvider 的文档。现在,我刚刚添加回以前版本中的旧 URLWithString,它工作得很好:

添加:

jsCodeLocation = [NSURL URLWithString:@"http://ipaddress:8081/index.ios.bundle?platform=ios&dev=true"];

评论:

[[RCTBundleURLProvider sharedSettings] setDefaults];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

关于react-native - iOS 中没有开发模式的 React Native 0.29+?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38405888/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com