2017-10-09 45 views
1

我收到以下錯誤無法解析「的myapp/Info.plist中」

(null): couldn't parse contents of 'myapp/Info.plist': The data couldn’t be read because it isn’t in the correct format. 

下面是完整的plist文件。該程序編譯和runs.I唐」的內容t知道爲什麼XCODE顯示此錯誤。請諮詢。

<?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>en</string> 
    <key>CFBundleExecutable</key> 
    <string>$(EXECUTABLE_NAME)</string> 
    <key>CFBundleIconFile</key> 
    <string></string> 
    <key>CFBundleIdentifier</key> 
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</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>1.0</string> 
    <key>CFBundleVersion</key> 
    <string>1</string> 
    <key>LSMinimumSystemVersion</key> 
    <string>$(MACOSX_DEPLOYMENT_TARGET)</string> 
    <key>NSHumanReadableCopyright</key> 
    <string>Copyright © 2017 me. All rights reserved.</string> 
    <key>NSMainStoryboardFile</key> 
    <string>Main</string> 
    <key>NSPrincipalClass</key> 
    <string>NSApplication</string> 
    <key>NSAppTransportSecurity</key> 
    <dict> 
     <key>NSAllowsArbitraryLoads</key> 
     <true/> 
     <key>NSExceptionDomains</key> 
     <dict> 
      <key>tranzporthub.com</key> 
      <dict> 
       <key>NSIncludesSubdomains</key> 
       <true/> 
       <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> 
       <true/> 
       <key>NSTemporaryExceptionMinimumTLSVersion</key> 
       <string>TLSv1.1</string> 
      </dict> 
     </dict> 
    </dict> 
</dict> 
</plist> 

回答

0

CFBundleIconFile鍵後的字符串值爲空。這可能是你的問題。嘗試添加一個應用程序圖標文件到您的項目,並確保此文件名包括在這裏

+0

我已添加圖標拖放圖像的Assets.xcassets中的所有決議。 – techno

+0

這還不夠嗎? – techno

+0

我會認爲這將是。但請嘗試在和<\string>標籤之間添加文件名。這是空的似乎不正確 – TMin