diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
old mode 100644
new mode 100755
index 56bc699..3d7a5bd
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,4 +1,5 @@
name: CI
+
on:
push:
branches:
@@ -6,7 +7,8 @@ on:
jobs:
build:
- runs-on: macOS-latest
+
+ runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
@@ -14,4 +16,4 @@ jobs:
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
- pod trunk push imglyKit2.podspec
+ pod trunk push imglyKit2.podspec --allow-warnings
diff --git a/Assets/Example.png b/Assets/Example.png
new file mode 100644
index 0000000..4244a24
Binary files /dev/null and b/Assets/Example.png differ
diff --git a/Assets/Identity.png b/Assets/Identity.png
new file mode 100644
index 0000000..ed814df
Binary files /dev/null and b/Assets/Identity.png differ
diff --git a/Assets/Logo.png b/Assets/Logo.png
new file mode 100644
index 0000000..1a7ce39
Binary files /dev/null and b/Assets/Logo.png differ
diff --git a/Package.swift b/Package.swift
new file mode 100644
index 0000000..0dad5ea
--- /dev/null
+++ b/Package.swift
@@ -0,0 +1,18 @@
+// swift-tools-version:5.1
+
+import PackageDescription
+
+let package = Package(
+ name: "imglyKit",
+ platforms: [
+ .iOS(.v8),
+ .macOS(.v10_10)
+ ],
+ products: [
+ .library(
+ name: "imglyKit",
+ targets: ["imglyKit"]
+ )
+ ],
+ dependencies: []
+)
diff --git a/README.md b/README.md
index e99a31b..ebba664 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
## Foreword
@@ -6,7 +6,7 @@ This project was [originally](https://github.com/chenzeyu/imgly-sdk-ios) created
| imglyKit2 version | Swift version |
|:-----------------:|:-----------------:|
-| 1.1.0 | 5 |
+| 1.1.0 - 1.2.0 | 5 |
| 1.0.0 | 4 |
## img.ly SDK for iOS
@@ -21,7 +21,7 @@ img.ly SDK provides tools for creating photo applications for iOS with a big var
* 40 stunning build in filters to choose from.
* Open source, need anything? Want to change anything? Go ahead, we provide the full source code.
-* Native code. Our backend is Core Image based, therefore we dodge all the nasty OpenGL problems other frameworks face. Also its easier to add new filters. Just derive from `CIFilter` override the `outputImage` property and you are good to go.
+* Native code. Our backend is Core Image based, therefore we dodge all the nasty OpenGL problems other frameworks face. Also its easier to add new filters. Just derive from `CIFilter` override the `outputImage` imageproperty and you are good to go.
* iPad support.
* Design filters in photoshop! Before you had to tweak values in code or copy & paste them from photoshop or your favorite image editor. With our response technology that is a thing of the past. Design your filter in photoshop, once you are done apply it onto the provided identity image. That will 'record' the filter response. Save it, add it as new filter, done!
* Swift. Keeping up with time, we used Swift to code the img.ly SDK, leading to leaner easier code.
@@ -30,7 +30,7 @@ img.ly SDK provides tools for creating photo applications for iOS with a big var
* Non-destructive. Don't like what you did? No problem, just redo or even discard it.
* In addition to adding beautiful filters to your photos, you can now also record videos and add the same filters.
-
+
## Requirements
@@ -66,6 +66,18 @@ To integrate imglyKit into your Xcode project using [Carthage](https://github.co
github "ky1vstar/imgly-sdk-ios-2"
```
+### Swift Package Manager (thanks to [MoveUpwardsDev](https://github.com/MoveUpwardsDev))
+
+The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.
+
+Once you have your Swift package set up, adding imglyKit as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
+
+```swift
+dependencies: [
+ .package(url: "https://github.com/ky1vstar/imgly-sdk-ios-2.git", from: "1.2.0")
+]
+```
+
### Manually
If you prefer not to use either of the aforementioned dependency managers, you can integrate imglyKit into your project manually.
@@ -131,17 +143,17 @@ The `IMGLYMainEditorViewController` can be used without the `IMGLYCameraViewCont
```
func callEditorViewController() {
-var editorViewController = IMGLYMainEditorViewController()
-editorViewController.highResolutionImage = image
-editorViewController.initialFilterType = .none
-editorViewController.initialFilterIntensity = 0.5
-editorViewController.completionBlock = editorCompletionBlock
+ var editorViewController = IMGLYMainEditorViewController()
+ editorViewController.highResolutionImage = image
+ editorViewController.initialFilterType = .none
+ editorViewController.initialFilterIntensity = 0.5
+ editorViewController.completionBlock = editorCompletionBlock
}
...
func editorCompletionBlock(result: IMGLYEditorResult, image: UIImage?) {
-...
+ ...
}
```
@@ -177,7 +189,7 @@ The resulting image represents the response of the colors to the effect.
To use the filter in you project you need to:
* Apply the desired modifications to this image
-
+
* Add the resulting image to the `Filter Responses` group in the project. Note: the image must be saved in PNG format.
* Create a new class that derives from `IMGLYResponseFilter`.
@@ -191,19 +203,19 @@ Here is an example of a response filter
```
class IMGLYSteelTypeFilter: IMGLYResponseFilter {
-override init() {
-super.init()
-self.responseName = "Steel"
-self.imgly_displayName = "steel"
-}
-
-required init(coder aDecoder: NSCoder) {
-super.init(coder: aDecoder)
-}
-
-override var filterType: FilterType {
-return IMGLYFilterType.steel
-}
+ override init() {
+ super.init()
+ self.responseName = "Steel"
+ self.imgly_displayName = "steel"
+ }
+
+ required init(coder aDecoder: NSCoder) {
+ super.init(coder: aDecoder)
+ }
+
+ override var filterType: FilterType {
+ return IMGLYFilterType.steel
+ }
}
```
diff --git a/imglyKit.xcodeproj/project.pbxproj b/imglyKit.xcodeproj/project.pbxproj
index 44cd658..b861af7 100755
--- a/imglyKit.xcodeproj/project.pbxproj
+++ b/imglyKit.xcodeproj/project.pbxproj
@@ -1529,6 +1529,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -1581,6 +1582,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
diff --git a/imglyKit2.podspec b/imglyKit2.podspec
index 487c511..8edea36 100755
--- a/imglyKit2.podspec
+++ b/imglyKit2.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "imglyKit2"
- s.version = "1.1.0"
+ s.version = "1.2.0"
s.license = { :type => 'Copyright', :file => 'LICENSE' }
s.summary = "Creates stunning images with a nice selection of premium filters."
s.homepage = "https://github.com/ky1vstar/imgly-sdk-ios-2"