1
votes

I want login with facebook in Swift. They give me error AppId not set in Plist but I am setting AppId on plist. It gives this error:

my2015-08-12 17:49:27.211 swiftcontact[16083:2102678] *** Terminating app due to uncaught exception 'InvalidOperationException', reason: 'App ID not found. Add a string value with your app ID for the key FacebookAppID to the Info.plist or call [FBSDKSettings setAppID:].'

These are the contents of my plist file:

<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>
2
Did you try my solution below?thedansaps

2 Answers

0
votes

I also encountered this and what I did was declare my app id in the viewDidLoad just like this FBSDKSettings.setAppID("your_app_id").

0
votes

In my case, I forgot to add Facebook's ApplicationDelegate method inside my AppDelegate

ApplicationDelegate.shared.application(_:, didFinishLaunchingWithOptions:)