Skip to content

Commit

Permalink
Snap Kit 2.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
driefler committed May 14, 2022
0 parents commit 0de2ffa
Show file tree
Hide file tree
Showing 250 changed files with 2,723 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store

This comment has been minimized.

Copy link
@ull-4

ull-4 Nov 19, 2022

Snap Star

7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Promises (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>Promises (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>Promises (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>SnapKit.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>SnapKit</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>SnapKitTarget</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>SnapKitWrapper</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright Snap Inc. 2022

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 31 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SnapKit",
platforms: [
.iOS(.v11)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "SnapKit",
targets: ["SCSDKCoreKit", "SCSDKLoginKit", "SCSDKCreativeKit"])
],
targets: [
.binaryTarget(
name: "SCSDKCoreKit",
path: "SCSDKCoreKit.xcframework"
),
.binaryTarget(
name: "SCSDKLoginKit",
path: "SCSDKLoginKit.xcframework"
),
.binaryTarget(
name: "SCSDKCreativeKit",
path: "SCSDKCreativeKit.xcframework"
),
]
)
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Swift Package Manager for Snap Kit

## Introduction

Starting with the 2.0.0 release, Snap Kit officially supports installation via [Swift
Package Manager](https://swift.org/package-manager/).


### Installing from Xcode

Add a package by selecting `File``Add Packages…` in Xcode’s menu bar.


Search for the Snap Kit SDK using the repo's URL:
```console
https://github.com/Snapchat/snap-kit-spm
```

Then, select **Add Package**.

40 changes: 40 additions & 0 deletions SCSDKCoreKit.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SCSDKCoreKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SCSDKCoreKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// SCSDKCoreKit.h
// SCSDKCoreKit
//
// Copyright © 2017 Snap, Inc. All rights reserved.
//

#import "SCSDKSnapKit.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// SCSDKSnapKit.h
// SCSDKCoreKit
//
// Created by Duncan Riefler on 10/14/20.
// Copyright © 2020 Snap, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/// API for manually initializing and deinitializing SnapKit
@interface SCSDKSnapKit : NSObject

/// Initialize SnapKit SDK
+ (void)initSDK;

/// Deinitialize SnapKit SDK
+ (void)deinitialize;

@end

NS_ASSUME_NONNULL_END
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

framework module SCSDKCoreKit {
umbrella header "SCSDKCoreKit.h"

export *
module * { export * }
}

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// SCSDKCoreKit.h
// SCSDKCoreKit
//
// Copyright © 2017 Snap, Inc. All rights reserved.
//

#import "SCSDKSnapKit.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// SCSDKSnapKit.h
// SCSDKCoreKit
//
// Created by Duncan Riefler on 10/14/20.
// Copyright © 2020 Snap, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/// API for manually initializing and deinitializing SnapKit
@interface SCSDKSnapKit : NSObject

/// Initialize SnapKit SDK
+ (void)initSDK;

/// Deinitialize SnapKit SDK
+ (void)deinitialize;

@end

NS_ASSUME_NONNULL_END
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

framework module SCSDKCoreKit {
umbrella header "SCSDKCoreKit.h"

export *
module * { export * }
}

Binary file not shown.
40 changes: 40 additions & 0 deletions SCSDKCreativeKit.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SCSDKCreativeKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SCSDKCreativeKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// SCSDKCameraControl.h
// SCSDKCreativeKit
//
// Copyright © 2018 Snap, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, SCSDKCameraPosition) {
SCSDKCameraPositionUnknown,
SCSDKCameraPositionFront,
SCSDKCameraPositionBack,
};

/// Describes the state the camera will be in after sharing is complete
@interface SCSDKCameraViewState : NSObject

- (instancetype)initWithCameraPosition:(SCSDKCameraPosition)cameraPosition;

/**
* @property cameraPosition
* @brief Camera facing position setup in Snapchat client
*/
@property (nonatomic, assign) SCSDKCameraPosition cameraPosition;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// SCSDKContentTopics.h
// SCSDKCreativeKit
//
// Created by Melissa O'Sullivan on 3/10/21.
// Copyright © 2021 Snap, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/// Spotlight Topics to be auto filled for eligible content in Send-To
@interface SCSDKContentTopics : NSObject

/**
* @property topics
* @brief Array of Spotlight Topics to be auto filled for eligible content in Send-To.
*/
@property (nonatomic, copy, readonly) NSArray<NSString *> *topics;

- (instancetype)initWithTopics:(NSArray<NSString *> *)topics;

- (instancetype)init NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// SCSDKCreativeKit.h
// SCSDKCreativeKit
//
// Copyright © 2017 Snap, Inc. All rights reserved.
//

#import "SCSDKCameraViewState.h"
#import "SCSDKContentTopics.h"
#import "SCSDKLensLaunchData.h"
#import "SCSDKLensLaunchDataBuilder.h"
#import "SCSDKLensSnapContent.h"
#import "SCSDKNoSnapContent.h"
#import "SCSDKPhotoSnapContent.h"
#import "SCSDKSnapAPI.h"
#import "SCSDKSnapContent.h"
#import "SCSDKSnapErrorCode.h"
#import "SCSDKSnapPhoto.h"
#import "SCSDKSnapSticker.h"
#import "SCSDKSnapVideo.h"
#import "SCSDKVideoSnapContent.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// SCSDKCreativeKitModelValidating.h
// SCSDKCreativeKit
//
// Created by Hongjai Cho on 1/25/19.
// Copyright © 2019 Snap, Inc. All rights reserved.
//

#import "SCSDKSnapErrorCode.h"

#import <Foundation/Foundation.h>

@protocol SCSDKCreativeKitModelValidating <NSObject>

- (SCSDKCreativeKitErrorCode)isModelValid;

@end
Loading

2 comments on commit 0de2ffa

@ull-4
Copy link

@ull-4 ull-4 commented on 0de2ffa Nov 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SCSDKLoginKit.xcframework/ios-arm64_x86_64-simulator/SCSDKLoginKit.framework/zh-Hant.lproj/Localizable.strings

@ull-4
Copy link

@ull-4 ull-4 commented on 0de2ffa Nov 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

Please sign in to comment.