SCSDKSnapAPI
Objective-C
@interface SCSDKSnapAPI : NSObject
Swift
class SCSDKSnapAPI : NSObject
The SCSDKSnapAPI class provides an interface for sharing content into Snapchat camera or preview.
-
Starts sending content to Snapchat if Snapchat is installed. .
Declaration
Objective-C
- (void)startSendingContent:(nonnull id<SCSDKSnapContent>)content completionHandler: (SCSDKSnapAPICompletionHandler _Nullable)completionHandler;
Swift
func startSending(_ content: SCSDKSnapContent) async throws
Parameters
content
Content that is send to Snapchat.
completionHandler
Block that will run after Snapping is complete. Failure if error is set success otherwise.
-
Deprecated
Initializes an SCSDKSnapAPI instance.
Declaration
Objective-C
- (nonnull instancetype)initWithContent:(nonnull id<SCSDKSnapContent>)content;
Swift
convenience init(content: SCSDKSnapContent)
Parameters
content
SCSDKSnapContent to be Snapped.
Return Value
An SCSDKSnapAPI instance initialized with content and fromViewController.
-
Deprecated
Starts Snapping.
Declaration
Objective-C
- (void)startSnappingWithCompletionHandler: (SCSDKSnapAPICompletionHandler _Nullable)completionHandler;
Swift
func startSnapping() async throws
Parameters
completionHandler
Block that will run after Snapping is complete. Failure if error is set success otherwise.
-
Deprecated
Cancels Snapping.
Declaration
Objective-C
- (void)cancelSnapping;
Swift
func cancelSnapping()