我正在Facebook登錄,我很好地遵循了所有步驟,但配置了我的info.plist。我的xml代碼如下:iOS)我應該在哪裏複製和粘貼facebook XML片段?
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb12345678</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>12345678</string>
<key>FacebookDisplayName</key>
<string>AppName</string>
我將此xml添加到'dict'的info.plist文件中,而不是我的projectTest。 所以最後,我完成了我的.plist XML文件
但我得到了一個錯誤
error: couldn't parse contents of '/Users/~/Desktop/app/app/myproject/Info.plist': The data couldn’t be read because it isn’t in the correct format.
我該如何解決這個問題?
UPDATE
整個的.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>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.myproject.$(PRODUCT_NAME:rfc1034identifier)</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>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
/*FACEBOOK XML IS JUST BELOW*/
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb12345678</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>12345678</string>
<key>FacebookDisplayName</key>
<string>AppName</string>
/**/
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
後,您可以顯示所有的Info.plist文件的? – anhtu
確保你沒有添加除以外的任何其他標籤,即不在任何打開的標籤之間 –
@ AbdAl-rhmanTaherBadary我更新了我認爲我添加了之內的內容,而不是在任何打開的標籤之間... –
LKM