【问题标题】:Meteor mobile-config.js accessRule not workingMeteor mobile-config.js accessRule 不起作用
【发布时间】:2015-06-24 21:31:57
【问题描述】:

在 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: 'contact@example.com',
  website: 'http://example.com'
});

// Set up resources such as icons and launch screens.
App.icons({
  'iphone': 'icons/icon-60.png',
  'iphone_2x': 'icons/icon-60@2x.png',
  // ... 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 移到了我的流星项目的根目录。现在正在使用“*”访问规则更新 config.xml。但是我仍然在模拟器中收到白名单拒绝错误。请帮忙!

【问题讨论】:

    标签: ios meteor ios-simulator


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 2017-06-30
      • 1970-01-01
      • 2017-05-27
      • 2019-01-31
      • 1970-01-01
      • 2016-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多