问题描述
我正在尝试将应用程序写入我的手机。 我使用 react-native-RSS-parser 示例中的代码。
import * as RSSParser from 'react-native-RSS-parser';
return fetch('http://www.kbgau.ru/RSS.PHP')
.then((response) => response.text())
.then((responseData) => RSSParser.parse(responseData))
.then((RSS) => {
console.log(RSS.title);
console.log(RSS.items.length);
});
如何正确地将 RSS 中的文本显示为 View 中的文本 需要显示 item.title,item.link,item,enclosure url image 请帮忙!
解决方法
响应的价值是什么?试着安慰一下
我认为这是因为您从 http 获取数据
尝试从使用 https 的站点获取数据
或者你可以尝试在DEBUG模式下设置
https://github.com/facebook/react-native/issues/24408#issuecomment-537081276
但是,不建议在 RELEASE 模式下使用此设置,因为它存在安全风险