Skip to content

Commit b442741

Browse files
Merge pull request #28 from DevCrew-io/update_camera_kit_version_to_1_27_0
Update camera kit version to 1 27 0
2 parents 71c1c58 + c718918 commit b442741

File tree

16 files changed

+198
-146
lines changed

16 files changed

+198
-146
lines changed

CHANGELOG.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
1-
## 0.0.1
1+
## 0.0.6
2+
* Make cameraKitLensId optional
3+
* Snap CameraKit Upgraded to 1.27.0
4+
* Update configuration setup instructions in README.md
25

3-
* Passing credentials from Flutter
6+
## 0.0.5
7+
* Refactoring
8+
* App id Removed
9+
* Snap CameraKit Upgraded to 1.26.1
10+
* permission HIGH_SAMPLING_RATE_SENSORS removed from plugin
411

5-
* Access Camerakit from Flutter
12+
## 0.0.4
13+
* apply dart format command
14+
* Add more detail to description in yaml
615

7-
* Get List of lenses for given list of group ids
816

9-
* Get media results
17+
## 0.0.3
18+
* Update documentation
1019

1120
## 0.0.2
12-
13-
* Refactor code
14-
1521
* Update readme
16-
17-
* Add Links to homepage and repository in yaml
18-
22+
* Refactor code
1923
* Implement Interface in unit testing
24+
* Add Links to homepage and repository in yaml
2025

21-
## 0.0.3
22-
23-
* Update documentation
24-
25-
## 0.0.4
26-
27-
* Add more detail to description in yaml
28-
29-
* apply dart format command
30-
31-
## 0.0.5
32-
33-
* permission HIGH_SAMPLING_RATE_SENSORS removed from plugin
34-
35-
* App id Removed
36-
37-
* Snap CameraKit Upgraded to 1.26.1
26+
## 0.0.1
27+
* Get media results
28+
* Access Camerakit from Flutter
29+
* Passing credentials from Flutter
30+
* Get List of lenses for given list of group ids
3831

39-
* Refactoring

README.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Once you have access to the account, locate your **groupIds**, **cameraKitLensId
2020
Now that you have obtained all your credentials, you can use it to initialize the Configuration class in your Flutter application as mentioned in the below section.
2121

2222
```dart
23-
class Constants {
24-
/// List of group IDs for Camera Kit (TODO: Fill group ID here).
25-
static const List<String> groupIdList = ['your-group-ids'];
26-
/// optional: if you want to get single lense you can set it otherwise set empty sting
27-
/// The lens ID for Camera Kit (TODO: Fill lens ID here).
28-
static const cameraKitLensId = 'camera-kit-lens-id';
29-
/// The API token for Camera Kit in the staging environment (TODO: Fill API token here).
30-
static const cameraKitApiToken = 'your-api-token'; //TODO fill api token staging & production here
31-
}
23+
class Constants {
24+
/// List of group IDs for Camera Kit (TODO: Fill group ID here).
25+
static const List<String> groupIdList = ['your-group-ids'];
26+
/// optional: if you want to get single lense you can set it otherwise set empty sting
27+
/// The lens ID for Camera Kit (TODO: Fill lens ID here).
28+
static const cameraKitLensId = 'camera-kit-lens-id';
29+
/// The API token for Camera Kit in the staging environment (TODO: Fill API token here).
30+
static const cameraKitApiToken = 'your-api-token'; //TODO fill api token staging & production here
31+
}
3232
```
3333
**Note:** To use production api token, your camerakit app should be approved and live on snapchat developer portal.
3434
Otherwise the app may cause `unauthorized` exception. [Read more](https://docs.snap.com/camera-kit/app-review/release-app) about submitting app for review
@@ -39,45 +39,49 @@ Then run ```flutter pub get``` to install the package.
3939

4040
Now in your Dart code, you can use:
4141
```dart
42-
import 'package:camerakit_flutter/camerakit_flutter.dart';
42+
import 'package:camerakit_flutter/camerakit_flutter.dart';
4343
```
4444
## iOS
4545
Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:
4646

4747
* NSCameraUsageDescription - describe why your app needs permission for the camera library. It's a privacy feature to ensure that apps don't access sensitive device features without the user's knowledge and consent.
4848
* NSMicrophoneUsageDescription - used to explain to the user why the app needs access to the device's microphone.
4949
```dart
50-
<key>NSCameraUsageDescription</key>
51-
<string>app need camera permission for showing camerakit lens</string>
52-
<key>NSMicrophoneUsageDescription</key>
53-
<string>app need microphone permission for recording a video</string>
50+
<key>NSCameraUsageDescription</key>
51+
<string>app need camera permission for showing camerakit lens</string>
52+
<key>NSMicrophoneUsageDescription</key>
53+
<string>app need microphone permission for recording a video</string>
5454
```
5555
* (Optional: To fix cocoapods installation error) Inside `Podfile` under `iOS` directory of your flutter project, uncomment the following line and set the iOS version 13
5656
```
57-
platform :ios, '11.0'
57+
platform :ios, '13.0'
5858
```
5959
## Android
6060
* CameraKit android SDK requires to use an AppCompat Theme for application, so make sure your application theme inherits an AppCompat theme.
6161

6262
* For example: in your `style.xml` define a new theme like this:
6363
```xml
64-
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
64+
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
6565
```
6666
* and then in `AndroidManifest.xml`
6767
```xml
68-
<application
68+
<application
6969
...
7070
android:theme="@style/AppTheme">
71-
...
72-
...
73-
</application>
71+
...
72+
...
73+
</application>
7474
```
7575
* Make sure in `build.gradle` under app module, the `minSdkVersion` version is `21`
7676
```groovy
77-
defaultConfig {
78-
minSdkVersion 21
79-
}
77+
defaultConfig {
78+
minSdkVersion 21
79+
}
8080
```
81+
* Make sure in `build.gradle` under android module, the minimum `kotlin_version` version is `1.8.10`
82+
```
83+
ext.kotlin_version = '1.8.10'
84+
```
8185
## Demo
8286

8387
https://github.com/DevCrew-io/camerakit-flutter/assets/136708738/63eb485d-1998-43f1-90ae-64193fde262e
@@ -104,12 +108,10 @@ https://github.com/DevCrew-io/camerakit-flutter/assets/136708738/63eb485d-1998-4
104108
Configuration class is used to pass all credentials required for Camerakit, you can pass list of Group ids to show all group lenses. You don't need to set separate credentials for iOS and Android.
105109

106110
```dart
107-
108-
final config = Configuration(
111+
final config = Configuration(
109112
Constants.cameraKitApiToken,
110-
Constants.groupIdList,
111-
Constants.cameraKitLensId,
112-
);
113+
Constants.groupIdList);
114+
113115
_cameraKitFlutterImpl.setCredentials(config);
114116
```
115117
## Access Camerakit in Flutter

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group 'com.camerakit.camerakit_flutter'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.7.10'
5+
ext.kotlin_version = '1.8.10'
66
repositories {
77
google()
88
mavenCentral()
@@ -52,7 +52,7 @@ android {
5252
dependencies {
5353
testImplementation 'org.jetbrains.kotlin:kotlin-test'
5454
testImplementation 'org.mockito:mockito-core:5.0.0'
55-
implementation "com.snap.camerakit:support-camera-activity:1.26.1"
55+
implementation "com.snap.camerakit:support-camera-activity:1.27.0"
5656
implementation 'com.google.code.gson:gson:2.8.8' // Use the latest version available
5757
}
5858

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
android:name="${applicationName}"
55
android:theme="@style/AppCompat"
66
android:icon="@mipmap/ic_launcher">
7+
78
<activity
89
android:name=".MainActivity"
910
android:exported="true"

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.8.10'
33
repositories {
44
google()
55
mavenCentral()

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Podfile.lock

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
PODS:
2-
- camerakit_flutter (0.0.1):
2+
- camerakit_flutter (0.0.6):
33
- Flutter
4-
- SCSDKCameraKit (~> 1.26.1)
5-
- SCSDKCameraKitReferenceUI (~> 1.26.1)
4+
- SCCameraKit (~> 1.27.0)
5+
- SCCameraKitReferenceUI (~> 1.27.0)
66
- Flutter (1.0.0)
77
- integration_test (0.0.1):
88
- Flutter
9-
- SCSDKCameraKit (1.26.1)
10-
- SCSDKCameraKitReferenceUI (1.26.1):
11-
- SCSDKCameraKit (~> 1.26.1)
9+
- SCCameraKit (1.27.0)
10+
- SCCameraKitReferenceUI (1.27.0):
11+
- SCCameraKit (~> 1.27.0)
1212
- video_player_avfoundation (0.0.1):
1313
- Flutter
14-
- FlutterMacOS
1514

1615
DEPENDENCIES:
1716
- camerakit_flutter (from `.symlinks/plugins/camerakit_flutter/ios`)
1817
- Flutter (from `Flutter`)
1918
- integration_test (from `.symlinks/plugins/integration_test/ios`)
20-
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
19+
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
2120

2221
SPEC REPOS:
2322
trunk:
24-
- SCSDKCameraKit
25-
- SCSDKCameraKitReferenceUI
23+
- SCCameraKit
24+
- SCCameraKitReferenceUI
2625

2726
EXTERNAL SOURCES:
2827
camerakit_flutter:
@@ -32,16 +31,16 @@ EXTERNAL SOURCES:
3231
integration_test:
3332
:path: ".symlinks/plugins/integration_test/ios"
3433
video_player_avfoundation:
35-
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
34+
:path: ".symlinks/plugins/video_player_avfoundation/ios"
3635

3736
SPEC CHECKSUMS:
38-
camerakit_flutter: a6fc56bcea70f9ea3162ccaeb2372229c5768851
37+
camerakit_flutter: 37fc1d1c766e7f0620ef7fb9f28f40763e44ee11
3938
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
4039
integration_test: 13825b8a9334a850581300559b8839134b124670
41-
SCSDKCameraKit: 3ebeb28638f7d478257caa3102e0edc987eb1a63
42-
SCSDKCameraKitReferenceUI: 9013428085da7532f2eb94204dc06882072b6081
43-
video_player_avfoundation: 8563f13d8fc8b2c29dc2d09e60b660e4e8128837
40+
SCCameraKit: db1a1ea9da38b2daede5c0cac8e229a8fadb27e0
41+
SCCameraKitReferenceUI: d18ca7b36a8118ced848d0bd2190a7693ac370fc
42+
video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126
4443

45-
PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
44+
PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5
4645

47-
COCOAPODS: 1.13.0
46+
COCOAPODS: 1.14.3

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</Testables>
5252
</TestAction>
5353
<LaunchAction
54-
buildConfiguration = "Debug"
54+
buildConfiguration = "Release"
5555
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5656
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
5757
launchStyle = "0"

example/lib/constants.dart

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
/// A class containing constants and configuration settings for the Camera Kit.
22
33
class Constants {
4-
/// List of group IDs for Camera Kit (TODO: Fill group ID here).
4+
/// List of group IDs for Camera Kit
5+
static const List<String> groupIdList = ['your-group-ids']; // TODO: Fill group IDs here
56

6-
static const List<String> groupIdList = ['your-group-ids'];
7+
/// Optional: if you want to get single len from a group you can set lens id here otherwise set empty string
8+
static const cameraKitLensId = ''; // TODO: Fill lens ID here
79

8-
/// optional: if you want to get single lens you can set it otherwise set empty string
9-
/// The lens ID for Camera Kit (TODO: Fill lens ID here).
10-
static const cameraKitLensId = 'camera-kit-lens-id';
11-
12-
/// The API token for Camera Kit in the staging environment (TODO: Fill API token here).
13-
14-
static const cameraKitApiToken =
15-
'your-api-token'; // TODO fill api token staging or production here
10+
/// The API token for Camera Kit in the staging environment
11+
static const cameraKitApiToken = 'your-api-token'; // TODO fill api token staging or production here
1612
}

example/lib/main.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ class _MyAppState extends State<MyApp> implements CameraKitFlutterEvents {
3737
super.initState();
3838
final config = Configuration(
3939
Constants.cameraKitApiToken,
40-
Constants.groupIdList,
41-
Constants.cameraKitLensId,
42-
);
40+
Constants.groupIdList);
41+
4342
_cameraKitFlutterImpl.setCredentials(config);
4443
}
4544

0 commit comments

Comments
 (0)