Snapchat Snapkit Lessons In Documentation
Part 2 in a continuing saga of working with Snapchat Snapkit for iOS/Swift
After getting a somewhat satisfactory answer to the daunting instruction foo://bar — without bar my next step was the bullet right below it in the documentation for Login Kit
SCSDKScopes(string-array): The scopes of access your application will request from the user; see Understanding Scopes section above
Fine, fine let’s go to the Understanding Scopes section
Scopes let your application declare which Login Kit features it wants access to. If a scope is toggleable, the user can deny access to one scope while agreeing to grant access to others.
Login Kit offers the following scopes:
https://auth.snapchat.com/oauth2/api/user.external_id: Grants access to a stable user ID specific to your app
https://auth.snapchat.com/oauth2/api/user.display_name: Grants access to the user's Snapchat display name
https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar: Grants access to the user's Bitmoji avatar; toggleable by user
Well, okay so that section talks about the scopes, but says nothing about what this
SCSDKScopes (string-array) is supposed to look like. Time to file another bug.
In this case, I didn’t do all the possible homework I could have done. Github user Jarod pointed this out to me. If I had dug into the example repository, I would have seen an example.
<key>SCSDKScopes</key> <array> <string>https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar</string> </array>
Next up, I’ll try the next few bullet points and see how it goes .. Here’s a preview
LSApplicationQueriesSchemes(string-array): Must contain
CFBundleURLSchemes(string-array): Must contain your redirect URL’s scheme — so if your redirect URL is
my-app://abc/xy/z, this field would contain
In the Snap Kit developer portal, add the same URL you put in
Info.plist to your app's Redirect URLs. Without this, you'll get an error when your app tries to open Snapchat for OAuth.
- Part 1 — Snapchat Snapkit Developer Support Sadly Sad
- Part 2 — Snapchat Snapkit Lessons In Documentation
- Part 3 — Introducing Snapchat Snapkit DIY Docs
- Part 4 — Snapchat SnapKit Undocumented Requirements
- Part 5 — Snapchat Snap Kit — Don’t Follow Directions
- Part 6 — Snapchat Snap Kit Support Continues to Disappoint
- Part 7 — Snapchat Snap Kit — For the Love of Good Design
- Part 8 — How to use Snapchat Creative Kit
- Part 9 — Snapchat Continues To Dissupport Snap Kit SDK