OGeek|极客世界-中国程序员成长平台

标题: ios - Meteor mobile-config.js accessRule 不起作用 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 06:24
标题: ios - Meteor mobile-config.js accessRule 不起作用

在 iOS 模拟器上运行我的应用程序时出现白名单错误。这是我的 mobile-config.js 文件,它位于 client/js/mobile-config.js

App.info({
  id: 'com.example.matt.uber',
  name: 'über',
  description: 'Get über power in one button click',
  author: 'Matt Development Group',
  email: '[email protected]',
  website: 'http://example.com'
});

// Set up resources such as icons and launch screens.
App.icons({
  'iphone': 'icons/icon-60.png',
  'iphone_2x': 'icons/[email protected]',
  // ... more screen sizes and platforms ...
});

App.launchScreens({
  'iphone': 'splash/Default~iphone.png',
  'iphone_2x': 'splash/Default@2x~iphone.png',
  // ... more screen sizes and platforms ...
});

App.accessRule('*');

但访问规则不会使用新的 accessRule 更新 cordova 自动生成的 config.xml 文件。

更新:

我将 config-mobile.js 移动到了我的 meteor 项目的根目录。现在正在使用“*”访问规则更新 config.xml。但我仍然在模拟器中收到白名单拒绝错误。请帮忙!



Best Answer-推荐答案


仅根据需要尝试添加访问规则:

App.accessRule('https://*.cloudfront.net/*');
App.accessRule('https://pbs.twimg.com/*');

也更喜欢使用 https 而不是 http。

关于ios - Meteor mobile-config.js accessRule 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29709237/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4