属性 值未更新 post-编辑 xcode 中的 .plist 文件

Property value not updating post-edit of .plist file in xcode

我仍然收到此错误:

“应用程序传输安全已阻止明文 HTTP (http://) 资源加载,因为它不安全。可以通过应用程序的 Info.plist 文件配置临时例外。”

即使我在 .plist 文件中设置了以下内容:

我在这里和其他地方以前的帖子中看到,将 NSAppTransportSecurity -> NSAllowArbitraryLoads 设置为 YES 是解决方案,但运气不好。

我在这里打电话:

/* Get user info */
                [[[Twitter sharedInstance] APIClient] loadUserWithID:[session userID]
                                                          completion:^(TWTRUser *user,
                                                                       NSError *error)
                 {
                     // handle the response or error
                     if (![error isEqual:nil]) {

//Data posted to 'http' here....                         
                         
                     } else {
                         NSLog(@"Twitter error getting profile : %@", [error localizedDescription]);
                     }
                 }];

如果有人能阐明任何观点,我们将不胜感激。例如,有没有办法让我在 运行 时间检查 p.list 中的值?

编辑 1

plist 中的上述值出现同样的错误,而且这个建议值似乎无效?

您的第一个版本是正确的 - 它是 NSAllowsArbitraryLoads 尽管令人困惑 Xcode 7.1 现在可以识别这些键并显示与 "Bundle version" 一样的漂亮描述,并且此描述使用 [= =20=] 而不是 "allows"。

  • 您是否尝试过全新构建您的应用程序?
  • 您确定这是正在使用的info.plist吗?