Coder Social home page Coder Social logo

creative-kit-sample's People

Contributors

cybersamx avatar davidxiasc avatar julien-c avatar mwestergaardsc avatar ramanpreetsinghkhinda avatar srisc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

creative-kit-sample's Issues

Error when calling SCSDKSnapAPI.startSending()

I'm trying to integrate Creative Kit into my app but am getting the following error when trying to send the sticker to Snapchat: "error_description_encryption_metadata_read_failure"

I've tried to find a solution but can't seem to get it to work, any help would be greatly appreciated. Here is the code I am using:

class ViewController: UIViewController {
    
    var snapAPI: SCSDKSnapAPI?
    
    override func loadView() {
        view = contentView
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        snapAPI = SCSDKSnapAPI()
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        sendStickerToSnapchat()
    }
    
    func sendStickerToSnapchat() {
        let renderer = UIGraphicsImageRenderer(size: contentView.pollCard.bounds.size)
        let image = renderer.image { ctx in
            view.drawHierarchy(in: contentView.pollCard.bounds, afterScreenUpdates: true)
        }
        
        let sticker = SCSDKSnapSticker(stickerImage: image)
        let snap = SCSDKNoSnapContent()
        snap.sticker = sticker
        
        snapAPI?.startSending(snap, completionHandler: { (error) in
            guard error == nil else {
                print("Error is", error)
                return
            }
        })
    }
    
}

a

aas

problem with android 12

i have this problem:

java.lang.IllegalArgumentException: com.test.test: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
at com.snapchat.kit.sdk.creative.api.SnapCreativeKitApi.sendWithCompletionHandler(SourceFile:151)
at com.snapchat.kit.sdk.creative.api.SnapCreativeKitApi.send(SourceFile:100)

you can correct this?
i think in package com.snapchat.kit.sdk:creative:1.13.0

startSending doesn't do anything (Snapchat doesn't open, no error message, no callback)

Hi,

Sorry to bother you here, I'm aware that this is not an official support channel.
However, [email protected] is just an automated response to go to http://support.snapchat.com/i-need-help, which doesn't really help as there is no appropriate category.

I'm trying to implement the Creative Kit on iOS using Swift after having successfully done so for Android.

So far, everything seems to be working, there are no issues raised while creating the SCSDKSnapContent or SCSDKSnapSticker.
However, when I call startSending, nothing happens.

I am using the following code:

let content = try createSnapContent()
let api = SCSDKSnapAPI()

DispatchQueue.main.async {
    self.view.isUserInteractionEnabled = false
    
    api.startSending(content) { [weak self] (error: Error?) in
        self?.view.isUserInteractionEnabled = true
        print(error)
    }
}

This should be exactly the code described on the documentation. However, the Snapchat app doesn't open and the callback never gets called (which also means that the app is no longer usable because of the isUserInteractionEnabled).

Do you by chance have any idea of what could be going on here?
I'm creating the sticker with a UIImage built from a base64 string using NSData, and testing the app on an iPhone Xr. This also happens when just trying to send a bare SCSDKNoSnapContent.
I guess another important point is that I'm trying to do this for a Cordova app.

Regards,
Philippe

Sharing sticker with liveCameraContent shows loader instead of image

Specifications -

  1. CoreKit and CreativeKit - 1.6.8
  2. Android studio - 4.1.1

I have integrated snapKit in my android studio project where I am trying to post a sticker on live camera. I can see the caption and attachment url but in place of sticker image there is a loader running. Please let me know how I can resolve this. The file I am passing as sticker definitely has an image as I have tested it by uploading that image to my server.

Transparency issue with stickers

I've noticed that the stickers don't support transparency and have a white background behind any area that would be transparent. Is this the intended functionality, or am I missing something? This occurs even with the sample code.
How would I go about removing this white background?

IMG_1052

Getting error_description_invalid_argument when attempting to share from iOS

I keep getting the following error from #startSending:

Error Domain=SCSDKCreativeKitErrorDomain Code=1 "error_description_invalid_argument" UserInfo={NSLocalizedRecoverySuggestion=Please check documentation for potential mistakes. Please content [email protected] if problem persists., NSLocalizedDescription=error_description_invalid_argument, NSLocalizedFailureReason=}

I am downloading a video locally on the device and retrieving the URL of the PHAsset using PHImageManager.default().requestAVAsset. I'm then using that url to create a SCSDKSnapVideo that I'm then attempting to send to Snapchat. Essentially something like:

PHImageManager.default().requestAVAsset(forVideo: self, options: options, resultHandler: {(asset: AVAsset?, audioMix: AVAudioMix?, info: [AnyHashable : Any]?) -> Void in
    if let urlAsset = asset as? AVURLAsset {
        let localVideoUrl: URL = urlAsset.url as URL
        let video = SCSDKSnapVideo(videoUrl: localVideoUrl)
        content = SCSDKVideoSnapContent(snapVideo: video)
        self.snapApi.startSending(content) { [weak self] (error: Error?) in
        }
    } else {
        
    }
})

What am I missing here?

Objetive C: startSendingContent doesn't do anything

It seems like once startSendingContent:snap is triggered, App is neither returning a response not catching an exeption. Weidly this happens only on while testing on a device and not on simulator.

@try{
      SCSDKSnapAPI *_scSdkSnapApi;
      _scSdkSnapApi = [SCSDKSnapAPI new];
      NSURL *snapImageUrl = [NSURL URLWithString:path];
            
      SCSDKSnapSticker *sticker = [[SCSDKSnapSticker alloc] initWithStickerUrl:snapImageUrl isAnimated: NO];
      sticker.posX = 0.5;
      sticker.posY = 0.667;
      
      SCSDKNoSnapContent *snap = [[SCSDKNoSnapContent alloc] init];

      snap.sticker = sticker;
      
      [_scSdkSnapApi startSendingContent:snap completionHandler:^(NSError *error) {
        /* Handle response */
        if(error == Nil) {
          resolve(Nil);
        } else {
          reject(@"get_error",error.localizedDescription, nil);
        }
      }];
    }
    @catch(NSException *exception){
      reject(@"get_error",exception.reason, nil);
    }

startSendingContent causes error on iOS device

Is this perhaps due to the app being signed with a dev cert, and it is not allowed to communicate with snapchat on the device?

[AXRuntimeCommon] Unknown client: CreativeKitSample
2020-03-23 17:49:54.487603-0700 CreativeKitSample[20966:5903027] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:20969

Snapchat app crash when sending sticker only on TestFlight / Live App

Hi,

Our iOS app fails to send a sticker, by crashing the Snapchat app. This happens only on TestFlight builds.
When building directly on the phone with any build configuration it works well. The sticker share was working fine with the same code more than two weeks ago.

We use snap-kit’s SCSDKCreativeKit with Carthage to send stickers. (From binary "https://raw.githubusercontent.com/Snapchat/snap-kit-carthage/repo/SCSDKCreativeKit.json" )"

Thank you in advance for any leads on how to solve this issue,
Marc

Code:

private lazy var snapAPI = SCSDKSnapAPI()
  
    func shareSnap(stickerImage: UIImage,
                         attachmentUrl: String? = "https://itunes.apple.com/us/app/pop-group-chat/idXXXXXXXXXX?mt=8",
                         context: String) {
      let photo = SCSDKSnapPhoto(image: stickerImage)
      let content = SCSDKPhotoSnapContent(snapPhoto: photo)
      content.attachmentUrl = attachmentUrl
      snapAPI.startSending(content) { error in
          if let error = error {
              log.error("Error sharing to snap: \(error.localizedDescription)")
              return
          }
       AnalyticsService.logShare(context: context, method: Strings.Snapchat)
    }
 }
  

com.snapchat.kit.sdk.creative.exceptions.SnapVideoLengthException: Video must be <15s long

I have implemented Snapchat into my application (Android), and I cannot send a video to Snipchat for more than 15 seconds, although the documentation contains 60 seconds. I did not find information about this error on the Internet, please tell me why this is happening? Is it possible to fix this? thanks
com.snapchat.kit.sdk.creative.exceptions.SnapVideoLengthException: Video must be <15s long

java.lang.NullPointerException

com.snapchat.kit.sdk.core.config.f.a (f.java:3011)
com.snapchat.kit.sdk.core.config.f$2.onResponse (f.java:118)
retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0 (DefaultCallAdapterFactory.java:89)
retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1 (DefaultCallAdapterFactory.java)
retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$hVGjmafRi6VitDIrPNdoFizVAdk.run (-.java:6)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
android.os.Looper.loop (Looper.java:237)
android.app.ActivityThread.main (ActivityThread.java:8107)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:496)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1100)

I'm using version 1.8.0 and I got many logs about this crash.
Seem like it happens when calling fetchConfig on SDK and I don't known how to fix it.

Error Domain=SCSDKCreativeKitErrorDomain Code=6 "error_description_deep_illegal_state" UserInfo={NSLocalizedRecoverySuggestion=Please check documentation for potential mistakes. Please content [email protected] if problem persists., NSLocalizedDescription=error_description_deep_illegal_state, NSLocalizedFailureReason=}

I use only creative kit to share video with message on snap chat. On some account share work perfect, but some account get this error and when snapchat is open pop up with message: Something went wrong. Please try again later!

Creative kit - Sticker Navigation Failing when Snapchat app is closed.

The Android SDK for sharing stickers is broken, this can be seen on the sample app given by snapchat.

There are two cases when clicking Send Sticker with the creative kit sample app:

  1. Snapchat is backgrounded - will work as expected
  2. Snapchat is closed - it'll open the snapchat app with a black screen and record button unresponsive or the sticker not loaded.

The sending sticker will always fail if the snapchat app is closed, but works when the app is backgrounded. Seems to be an issue of how snapchat is handling intents when the app is starting up for the first time.

SNAPCHATSDKBROKEN.mp4

Considering this issue is present in the sample-app this seems to be an sdk issue that needs the devs to resolve it.

It only appears on a 15.1 IPAd

Error Domain=SCSDKCreativeKitErrorDomain Code=4 "error_description_encryption_metadata_read_failure" UserInfo={NSLocalizedRecoverySuggestion=recovery_suggestion_contact_snap_kit_support, NSLocalizedDescription=error_description_encryption_metadata_read_failure, NSLocalizedFailureReason=

Can't select videos

I can't select a video. When I click on "Select Video", I can select only photos and nothing else. Are there only certain extensions allowed? (it was a .mp4)

Share Button go to playstore

After upgrade all app, the share Button dont send a Snapchat... Share Button go to playstore... You have a solution?

Unable to open lenses with the react-native sample app iOS

I am not sure what I did wrong. It was working yesterday and now it won't even open a non-dynamic lens from the straight boilerplate sample code provided in this repo...

this is the only message i see in xcode

Snapshotting a view (0x10480b400, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES.

what are the meta tags needed for Snapchat?

not sure if this is the right place to ask this question but thought i'd give it a go.

My website has dynamic page titles on certain pages and relies on sharing. So if user1 sends my webpages link to their friend, user2, on snapchat, I need the link preview to say 'user1 has invited you'. But right now it just says 'nameOfMyWebsite'.

I used open graph tags and the above functionality works perfectly on Instagram/whatsapp. I've added twitter tags too:

<meta name="twitter:title" content="user1 has invited you ">
<meta property="og:title" content="user1 has invited you">

but what meta tags should I put for this to work on snapchat?

Multiple pop ups opened when sharing to Android

I am trying to share Image with attached URL generated from Branch IO.

When I clicked on the attached link, it gives me two pop-ups.

  1. First pop-up redirects me to Playstore
  2. The second pop-up redirects me to the installed app.

Ideally, if an app is installed then it should only give a single pop-up which redirects to the App.

I am using the following version:
implementation([ 'com.snapchat.kit.sdk:creative:1.6.3', 'com.snapchat.kit.sdk:core:1.6.3' ])

Implementation:

snapCreativeKitApi = SnapCreative.getApi(getActivity());
snapMediaFactory = SnapCreative.getMediaFactory(getActivity());

SnapPhotoFile photoFile;
try {
      photoFile = snapMediaFactory.getSnapPhotoFromFile(fileName);
} catch (SnapMediaSizeException e) {
      e.printStackTrace();
      return;
}

      SnapPhotoContent snapPhotoContent = new SnapPhotoContent(photoFile);
      snapPhotoContent.setAttachmentUrl(urlToShare);
      finish();
      snapCreativeKitApi.send(snapPhotoContent);

Manifest

<meta-data android:name="com.snapchat.kit.sdk.clientId" android:value="ClientID" />

We are using same keys for iOS and Android. For iOS, it's working as expected.
Please let me know if I am doing anything wrong here.

Here is the video link for the issue I am facing:
https://www.dropbox.com/s/ivpshfs9o15kivr/20-08-20-10-32-07.mp4?dl=0

Error calling startSnapping

Getting the following error from startSnapping:

Optional(Error Domain=SCSDKCreativeKitErrorDomain Code=1 "error_description_invalid_argument" UserInfo={NSLocalizedRecoverySuggestion=Please check documentation for potential mistakes. Please content [email protected] if problem persists., NSLocalizedDescription=error_description_invalid_argument, NSLocalizedFailureReason=})

I can't find any results for what "SCSDKCreativeKitErrorDomain Code=1" could mean and thought I should ask here.

What I'm passing in, roughly:
A SCSDKVideoSnapContent("...") // pass in a file:// URL pointing to a video saved to my app's cache directory

  • sticker: nil
  • attachmentUrl: nil

Demo failed to pull snapchat app

I have replaced the scsdkclientid in info with my test environment ID, but failed to pull up the app to share. At present, my account has opened loginkit and passed the audit. Later, I turned on the switch of creativekit, but it was not approved. I want to test the function of creativekit first, but I can't pull up snapchat app. Do you have to submit an application to test the function of creativekit?

Issue with React native 0.64 - iOS 14.6

I'm trying to run Creative Kit sharing functionality in iOS but there is this error: EXC_BAD_ACCESS (code=2

This is the code I tried so far:
CreativeKit.sharePhoto({ content: { // add photo data uri: \file://${uri}, }, caption: 'test', }) .then(res => console.log('res ', res)) .catch(err => console.log(' error here', err));
I tried with Sticker as well but same error.

crashing startSending the SCSDKLensSnapContent

Hello.
This is my codes.

import UIKit
import SCSDKCoreKit
import SCSDKCreativeKit
class MainViewController: UIViewController {

    fileprivate lazy var snapAPI = {
        return SCSDKSnapAPI()
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
}
extension MainViewController {
    func launchFilter(lensUUID: String) {
        let snap = SCSDKLensSnapContent(lensUUID: lensUUID)
        
        let launchDataBuilder = SCSDKLensLaunchDataBuilder()

        snap.launchData = SCSDKLensLaunchData(builder: launchDataBuilder)
        view.isUserInteractionEnabled = false
        snapAPI.startSending(snap) { [weak self] (error: Error?) in
            self?.view.isUserInteractionEnabled = true
            // Handle response
        }
    }
}

App crashing when call launchFilter(lensUUID: "xxx") method.
For example launchFilter(lensUUID: "91128d0429e14b54998a024d82847358")
Please help me.

Thank you.

Android sample does not work on Google Pixel 2 devices

After the redirect to the Snapchat app there is an "Something went wrong. Please try again" error, either selecting a picture/video or not.

Device info:
Pixel 2
Android 10

Image from iOS

Are there any known issues?

The same sample code works just fine on many other devices, but on 3 different Google Pixel 2 devices it's not working.

Error Something went wrong please try again later.

I receive the error message when sharing content to Snapchat. The app installs fine, snapkit is set up correctly, but when sharing it just doesn't work. I've tried production/staging auth code, confidential client auth, different usernames but nothing works.

Unable to open deep links

Hi @eberglundsc @tphillipssc @davidxiasc @bkirbysc!
I have verified sharing videos to Snapchat with links works fine on iOS but seen a phenomena which I failed to open my app through SnapChat although the button which said “open app” appeared and I tapped.

Isn’t it because we don’t have a method to listen to deep links in appdelegate.m?🤔

Hope to hear how to get it done well!

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.