Snapchat Snapkit Developer Support Sadly Sad
Tags: ios, swift, snapchat, snapkit
Published: 2018-07-31 19:08:52

---
title: Snapchat Snapkit Developer Support Sadly Sad
published: true
description: Part 1 of ongoing dev journal working on Snapchat Snapkit
tags: iOS, Swift, Snapchat, Snapkit
---
[Original post on Medium](https://medium.com/adventures-in-ios-mobile-app-development/snapchat-snapkit-developer-support-sadly-sad-89d63011c6ad)
##Part 1 of a periodically updated diary of my attempts to work with Snapchat’s Snapkit
As an iOS Developer I thought it would be interesting to try to add Snapchat’s Snapkit features to an app I have under development.

Snapchat is playing catch-up in a race to keep its platform relevant and wants software developers to embrace its tools. Facebook and Twitter have long had development kits available for apps such that logging in to an app with Facebook and Twitter is commonplace. And posting to both is built in to probably thousands of apps.
![Snapkit options](https://cdn-images-1.medium.com/max/880/1*NNZQBVFov8g_H1pOWzQ7mw.png)
After just scratching the surface of the offerings, I am not impressed with Snapchat’s documentation nor support.

###Oh for the love of good documentation
These are the very first lines of the [iOS API Reference](https://docs.snapchat.com/docs/api/ios/)
>This documentation assumes you already made contact with us. The Snap Kit developer portal is the place for adding your application, exchanging keys, and getting set up with the proper API credentials.
It is not at all clear to me how or why one would “make contact” with Snapchat. I suspect this document is out of date and that it was written when Snapchat was working with partners. As far as I can tell, the API is now completely open to anyone interested. So I’m either wrong and need to contact Snapchat (How?) or this very first paragraph is utterly misleading and out of date.

Next up I thought I would integrate Snapchat login. My app already has authentication via Google, Twitter and Facebook (do you see that Snapchat… you need to blow me away just to enter the game)

Here’s some instruction from the Login Kit documentation
![info.plist instructions](https://cdn-images-1.medium.com/max/880/1*zPAVeRhM0t-JEAwS9qhhLA.png)
This line about SCSDKRedirectUrl is mind boggling

* SCSDKRedirectUrl (string): The URL that will handle and complete login requests; must be a valid URL in the form **foo://bar—without bar**, redirects will fail

I’m sorry, what? What URL will complete and handle the login? And what does “foo://bar” without the bar mean? And if it means what I think it does — why would you write something like that? (I think it means .. ‘someurl://’)

I guess as a developer I’m supposed to know what the URL syntax should look like. But wait, Snapchat has a few [GitHub repositories](https://github.com/Snap-Kit) with examples.

But wait, only one of the examples is written in Swift (remember I’m developing for iOS).

Since I like to try to solve my own problems, I thought perhaps the sample app would shed some light on the mysteries of SCSDKRedirectURL. This URL is supposed to go into the info.plist. Let’s see what the example app from Snapchat has in the info.plist
```xml
<dict>		
      <key>CFBundleTypeRole</key>
      <string>Editor</string>
      <key>CFBundleURLSchemes</key>
      <array>
      <string><!-- Insert your redirect url scheme here -->    
      </string>
      </array>
</dict>
```
Fantastic, that clears things right up.

As I was already in GitHub and already looking at the sample app supplied by Snapchat, I thought I’d file this lack of clarity as a bug against the sample repo. It’s issue #3 [Redirect URL—Clarity in documentation please](https://github.com/Snap-Kit/bitmoji-sample/issues/3)

Someone named David cleared things up in response to the bug.  He says

>So if you registered my-app://auth/snap then you would have this entry in your Info.plist:
```xml
<key>SCSDKRedirectUrl</key>
<string>my-app://auth/snap</string>
as well as:
<key>CFBundleURLTypes</key>
 <array>
 <dict>
 <key>CFBundleTypeRole</key>
 <string>Editor</string>
 <key>CFBundleURLSchemes</key>
 <array>
 <string>my-app</string>
 </array>
 </dict>
 </array>
```
As a side note, Snapchat support has no idea how to handle Snapkit requests. I can’t stop giggling when I read the response when I ask if they are the right folks to get help from.. “We’ll need to look further into this”


**Yes, yes you will!**
![twitter response from snapchat](https://cdn-images-1.medium.com/max/880/1*gCTL9i4szIqePqvcSfRr2g.png)