Skip to content

Commit 0b0d5c0

Browse files
Updated for swift 4.2.
1 parent c6ed8af commit 0b0d5c0

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

UIImage+PDF/UIImage+PDF.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ extension UIImage {
124124

125125
guard
126126
let image = imageFromContext,
127-
let imageData = UIImagePNGRepresentation(image),
127+
let imageData = image.pngData(),
128128
let cgImage = image.cgImage
129129
else { return nil }
130130

UIImagePlusPDF.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@
317317
SDKROOT = iphoneos;
318318
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
319319
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
320+
SWIFT_VERSION = 4.2;
320321
};
321322
name = Debug;
322323
};
@@ -370,6 +371,7 @@
370371
SDKROOT = iphoneos;
371372
SWIFT_COMPILATION_MODE = wholemodule;
372373
SWIFT_OPTIMIZATION_LEVEL = "-O";
374+
SWIFT_VERSION = 4.2;
373375
VALIDATE_PRODUCT = YES;
374376
};
375377
name = Release;
@@ -387,7 +389,7 @@
387389
);
388390
PRODUCT_BUNDLE_IDENTIFIER = com.dima.uiimage.pdf.UIImagePlusPDF;
389391
PRODUCT_NAME = "$(TARGET_NAME)";
390-
SWIFT_VERSION = 4.0;
392+
SWIFT_VERSION = 4.2;
391393
TARGETED_DEVICE_FAMILY = "1,2";
392394
};
393395
name = Debug;
@@ -405,7 +407,7 @@
405407
);
406408
PRODUCT_BUNDLE_IDENTIFIER = com.dima.uiimage.pdf.UIImagePlusPDF;
407409
PRODUCT_NAME = "$(TARGET_NAME)";
408-
SWIFT_VERSION = 4.0;
410+
SWIFT_VERSION = 4.2;
409411
TARGETED_DEVICE_FAMILY = "1,2";
410412
};
411413
name = Release;
@@ -425,7 +427,7 @@
425427
);
426428
PRODUCT_BUNDLE_IDENTIFIER = com.dima.uiimage.pdf.UIImagePlusPDFTests;
427429
PRODUCT_NAME = "$(TARGET_NAME)";
428-
SWIFT_VERSION = 4.0;
430+
SWIFT_VERSION = 4.2;
429431
TARGETED_DEVICE_FAMILY = "1,2";
430432
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIImagePlusPDF.app/UIImagePlusPDF";
431433
};
@@ -446,7 +448,7 @@
446448
);
447449
PRODUCT_BUNDLE_IDENTIFIER = com.dima.uiimage.pdf.UIImagePlusPDFTests;
448450
PRODUCT_NAME = "$(TARGET_NAME)";
449-
SWIFT_VERSION = 4.0;
451+
SWIFT_VERSION = 4.2;
450452
TARGETED_DEVICE_FAMILY = "1,2";
451453
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIImagePlusPDF.app/UIImagePlusPDF";
452454
};

UIImagePlusPDF/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919
return true
2020
}

0 commit comments

Comments
 (0)