[英]React Native Expo iOS app - trying to modify info.plist
I have a React Native app set up in Expo. 我在Expo中设置了React Native应用程序。
I need to modify the info.plist , but am having problems doing so. 我需要修改info.plist ,但是这样做有问题。
First, I can't find info.plist anywhere. 首先,我无法在任何地方找到info.plist。 Based on the Expo docs and this other SO question , the workaround is to add an "infoPlist" key into my app.json file.
根据Expo文档和其他SO问题 ,解决方法是在我的app.json文件中添加“infoPlist”键。 I have done so, and it looks like this:
我已经这样做了,它看起来像这样:
"infoPlist": {
"NSAppTransportSecurity": {
"blah.s3.amazonaws.com": {
"NSExceptionAllowsInsecureHTTPLoads": true,
"NSRequiresCertificateTransparency": false,
"NSIncludesSubdomains": true
}
}
}
However when I attempt to compile the app (either by running "expo start" or "expo publish") I get the following error: 但是,当我尝试编译应用程序时(通过运行“expo start”或“expo publish”),我收到以下错误:
Error: Problem validating fields in app.json. 错误:验证app.json中的字段时出错。 See https://docs.expo.io/versions/v30.0.0/guides/configuration.html Should NOT have additional property 'infoPlist'.
请参阅https://docs.expo.io/versions/v30.0.0/guides/configuration.html不应该有其他属性'infoPlist'。
Any ideas on how I can get around this? 关于如何解决这个问题的任何想法?
需要在ios
部分中添加infoPlist
属性(因为它对Android没有影响)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.