Has anyone tried binding SnapSDK for iOS? Encountering errors with CreativeKit

ukie_ukie_ Member ✭✭

Specifically, with the following code:

var snapImage = GetCurrentScreenImage();
SCSDKSnapPhoto photo = new SCSDKSnapPhoto(snapImage);
SCSDKPhotoSnapContent snapPhoto = new SCSDKPhotoSnapContent(photo)

SCSDKSnapAPI api = new SCSDKSnapAPI(snapPhoto);

I get compilation error:
CS1503 Argument 1: cannot convert from 'SCSDKCreativeKit_Bindings.SCSDKPhotoSnapContent' to 'SCSDKCreativeKit_Bindings.SCSDKSnapContent'

Best Answer

  • ukie_ukie_ ✭✭
    Accepted Answer

    The error was tied to me forgetting to add iOS Bundle indentifier to SnapChat developer portal. Issue fixed.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    I haven't used this library before. Maybe you can add a constructor in the SCSDKSnapAPI class:

    [Export("initWithContent:")]
    IntPtr Constructor(SCSDKPhotoSnapContent content);
    
  • ukie_ukie_ Member ✭✭

    Tried that. It caused a selector error on build. However, this was a step in the right direction.
    These lines worked:
    [Export("initWithContent:SCSDKSnapContent")]
    IntPtr Constructor(SCSDKSnapContent content);

    [Export("initWithContent:")]
    IntPtr Constructor(SCSDKPhotoSnapContent content);

    Now I get an error on callback from SnapChat with this code:

    SnapEncryptionMetadataUnexpectedStatusCode

  • ukie_ukie_ Member ✭✭
    Accepted Answer

    The error was tied to me forgetting to add iOS Bundle indentifier to SnapChat developer portal. Issue fixed.

Sign In or Register to comment.