【发布时间】:2015-08-12 12:23:05
【问题描述】:
我想在 Swift 中使用 facebook 登录。他们给我错误 AppId not set in Plist 但我在 plist 上设置 AppId。它给出了这个错误:
my2015-08-12 17:49:27.211 swiftcontact[16083:2102678] *** 终止 应用程序由于未捕获的异常“InvalidOperationException”,原因: '未找到应用 ID。使用您的应用 ID 添加一个字符串值作为键 FacebookAppID 到 Info.plist 或调用 [FBSDKSettings setAppID:]。'
这些是我的 plist 文件的内容:
<dict>
<key>FacebookAppID</key>
<string>9023XXXXXXXXXXX</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.varun.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>FacebookDisplayName</key>
<string>BOOMaGIFT</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb9023XXXXXXXXXXX</string>
</array>
<key>CFBundleURLName</key>
<string></string>
</dict>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
</dict>
</plist>
【问题讨论】:
-
你试过我下面的解决方案了吗?