snapchat / creative-kit-sample Goto Github PK
View Code? Open in Web Editor NEWSample Apps For Creative Kit
License: Other
Sample Apps For Creative Kit
License: Other
reported crash :
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
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=
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);
}
Originally posted by @DNPZ91TSN72L in DNPZ91TSN72L/Slideshow#3
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)
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.
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
}
})
}
}
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
After upgrade all app, the share Button dont send a Snapchat... Share Button go to playstore... You have a solution?
Hi guys,
So I have an issue sharing some PNG images, after some investigation, I found that there is an issue with PNG encoding. 8bit png works fine, but png16 does not.
Here is a video demo of a problem: https://www.dropbox.com/s/ai1t529h8upucsa/device-2020-05-22-114620.mp4?dl=0
And this one does not. No errors in logs, nothing.
Any ideas what can be the reason and if it's possible to fix it?
Thanks a lot!
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
On Galaxy s20+ "Select Video" Not showing any videos in gallery or google photos... only seeing pictures.
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.
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)
}
}
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
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?
Specifications -
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.
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.
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!
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
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!
Objects return as null
How do I solve this error ?
Not able to generate my release apk
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.
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?
I am having trouble open the modal popup after pressing the attachment url on the snap that created from my application. I need to get display name and bitmoji url from my redirected url from attachment url.
https://docs.snap.com/snap-kit/creative-kit/Tutorials/ios/#identity-web-view
Is there anything that I should do to see this? My application is in development now.
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:
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.
Considering this issue is present in the sample-app this seems to be an sdk issue that needs the devs to resolve it.
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
please contract me [email protected]
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.
Apk is unsigned and It do not work on phone with andorid clicking the apk file shows an error that phone cannot open this file
aas
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?
my app is approved
I need share image to snapchat
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.
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
I'm going to build share to snapchat app with snapchat creative kit. But I can't run app. I've tested with creating new latest project, but same result.
When I run example project in snapchat integration, it works well.
When I run app, I can't open.
https://github.com/nano5319/react-native-snapchat-share
I've followed all steps in document
https://atrosnap.com/ is one selling it please fix this!
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.