2015-09-25 42 views
0

我正在嘗試解決提到的問題here無法在XCODE 7中編輯Info.plist(讀/寫許可)7

我發現了一個解決方案:編輯我的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編輯,作爲源代碼打開等)。我甚至試圖用原始值手動執行它,但每次我嘗試保存它時,它都會凍結。

爲什麼會發生這種情況,我該如何解決?

我的信息的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> 
+1

什麼凍結? Xcode的?你的編輯?運行的應用程序? – rmaddy

+0

是的,無論如何,我嘗試凍結,如果Xcode然後Xcode。 – user2813740

+0

plz讓我知道爲什麼會發生這種情況..即使我不能添加第一個鍵與正確的代碼... xcode freeze – user2813740

回答

1

在最後你可以添加這樣的..這樣可以解決你。

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