Setup SDK Dzo. Facebook, Google
Step 1: Adding provided libraries to the project
a. Add the DzoSDK framework library to the project.
Drag and drop the provided DzoSDK framework into the SDK folder of the project.
After dragging the DzoSDK into the project, it will appear under Frameworks, Libraries, and Embedded Content. Under the Embed option, select "Do Not Embed".
b. Add Facebook and Google libraries
Unzip the SDK folder that contains the Facebook and Google libraries and drag and drop them into the SDK folder of the project.
c. Add images and icons in DzoSDK framework
Add folders DzoResource and DzoGameAsset.xcassets to your project to be able to load images and icons in the DzoSDK framework.
Step 2: Config Facebook Login
Configure the Info.plist file with an XML snippet that contains data about your app.
-
Right-click Info.plist, and choose Open As ▸ Source Code.
-
Copy and paste the following XML snippet into the body of your file (<dict>...</dict>).
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fbAPP-ID</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>APP-ID</string>
<key>FacebookClientToken</key>
<string>CLIENT-TOKEN</string>
<key>FacebookDisplayName</key>
<string>APP-NAME</string>
-
In <array><string> in the key [CFBundleURLSchemes], replace APP-ID with your App ID.
-
In <string> in the key FacebookAppID, replace APP-ID with your App ID.
-
In <string> in the key FacebookClientToken, replace CLIENT-TOKEN with the value found under Settings > Advanced > Client Token in your App Dashboard.
-
In <string> in the key FacebookDisplayName, replace APP-NAME with the name of your app.
-
To use any of the Facebook dialogs (e.g., Login, Share, App Invites, etc.) that can perform an app switch to Facebook apps, your application's Info.plist also needs to include: <dict>...</dict>).
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbauth</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
Example
Facebook SDK Demo
Step 3: Config Facebook Advs Log Event.
<key>FacebookAutoLogAppEventsEnabled</key>
<true/>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
Step 4: Enable Remote Notification
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
Step 5: Config Google for Login
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.xxxxxxx-xxxxxxxxxxxxxxxxxx</string>
</array>
</dict>
Step 6: Config Schema DzoGame Event
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>vn.dzogame.xxxxxx</string>
</array>
</dict>