diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..bf77d54 --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +4.2 diff --git a/Drawsana Demo/AppDelegate.swift b/Drawsana Demo/AppDelegate.swift index 1900079..a2889df 100644 --- a/Drawsana Demo/AppDelegate.swift +++ b/Drawsana Demo/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Drawsana Demo/ViewController.swift b/Drawsana Demo/ViewController.swift index a31ff08..3904349 100644 --- a/Drawsana Demo/ViewController.swift +++ b/Drawsana Demo/ViewController.swift @@ -203,7 +203,7 @@ class ViewController: UIViewController { guard let image = drawingView.render(over: imageView.image), - let data = UIImageJPEGRepresentation(image, 0.75), + let data = image.jpegData(compressionQuality: 0.75), (try? data.write(to: savedImageURL)) != nil else { assert(false, "Can't create or save image") diff --git a/Drawsana.podspec b/Drawsana.podspec new file mode 100644 index 0000000..69434c5 --- /dev/null +++ b/Drawsana.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |spec| + spec.name = 'Drawsana' + spec.version = '0.9.2' + spec.license = { :type => 'MIT' } + spec.homepage = 'https://asana.github.io/Drawsana' + spec.documentation_url = 'https://asana.github.io/Drawsana' + spec.authors = { 'Steve Landey' => 'stevelandey@asana.com' } + spec.summary = 'Let your users mark up images with freehand drawings, shapes, and text' + spec.source = { :git => 'https://github.com/asana/Drawsana.git', :tag => '0.9.2' } + spec.source_files = 'Drawsana/**/*.swift' + + spec.platform = :ios, '9.0' + + spec.swift_version = '4.2' +end diff --git a/Drawsana.xcodeproj/project.pbxproj b/Drawsana.xcodeproj/project.pbxproj index 35c3b53..dd7156f 100644 --- a/Drawsana.xcodeproj/project.pbxproj +++ b/Drawsana.xcodeproj/project.pbxproj @@ -397,13 +397,14 @@ TargetAttributes = { 37EB4ED8210649E100E10461 = { CreatedOnToolsVersion = 9.4; - LastSwiftMigration = 0940; + LastSwiftMigration = 1010; }; 37EB4EE1210649E100E10461 = { CreatedOnToolsVersion = 9.4; }; 37EB4EF921064A5E00E10461 = { CreatedOnToolsVersion = 9.4; + LastSwiftMigration = 1010; }; }; }; @@ -689,7 +690,7 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -716,7 +717,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.asana.AMDrawingView; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -735,7 +736,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.asana.AMDrawingViewTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -754,7 +755,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.asana.AMDrawingViewTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -773,7 +774,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.asana.AMDrawingView-Demo"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -792,7 +793,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.asana.AMDrawingView-Demo"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Readme.md b/Readme.md index e4fefdc..0f81021 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -# Drawsana 0.9.1 +# Drawsana 0.9.2 Drawsana is a generalized framework for making freehand drawing views on iOS. You can let users scribble over images, add shapes and text, and even make your own tools. @@ -32,7 +32,7 @@ Add `Asana/Drawsana` to your Cartfile and update your project like you would for Carthage framework, or clone the source code and add the project to your workspace. ``` -github "Asana/Drawsana" == 0.9.1 +github "Asana/Drawsana" == 0.9.2 ``` ## Usage @@ -95,6 +95,10 @@ open https://asana.github.io/Drawsana ## Changelog +### 0.9.2 +* Convert to Swift 4.2 +* CocoaPods support + ### 0.9.1 * `DrawsanaView.selectionIndicatorViewShapeLayer` is exposed, allowing you to more