无法在XCODE 7中编辑Info.plist(读/写权限) [英] Can't edit Info.plist (read/write permission) in XCODE 7

查看:146
本文介绍了无法在XCODE 7中编辑Info.plist(读/写权限)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试解决上面提到的问题此处

I'm trying to solve the issue mentioned here.

我找到了一个解决方案:编辑我的info.plist。

I found a solution: edit my info.plist.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>mydomain.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

我试图编辑我能想到的每一种方式(Textedit,xml编辑,作为源代码打开,等等。)。我甚至试图用原始值手动完成它,但每次我尝试保存它时,它都会冻结。

I tried to edit every way I could think of (Textedit, xml edit, open as source code, etc.). I even tried to do it manually with raw values, but every time I try to save it, it freezes.

为什么会发生这种情况,我该如何解决?

Why is this happening, and how can I fix it?

我的信息Plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>MY APP</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string>Icon.png</string>
    <key>CFBundleIconFiles</key>
    <array>
        <string>Icon.png</string>
        <string>Icon_76x76.png</string>
        <string>Icon_152x152.png</string>
    </array>
    <key>CFBundleIdentifier</key>
    <string>com.myapp.app</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>2.6.3</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>2.6.3</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string></string>
    <key>NSMainNibFile</key>
    <string>MainWindow</string>
    <key>UIPrerenderedIcon</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
<-- Here I was trying to copy paste -->
</dict>
</plist>


推荐答案

最后你可以像这样添加..这个解析你。

At the end you can add like this.. this resolves you.

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>


这篇关于无法在XCODE 7中编辑Info.plist(读/写权限)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆