From ef2ebb67fa4e98a657a9ee41c0bc40d1694a2cf6 Mon Sep 17 00:00:00 2001 From: Mohammad Nabulsi Date: Sun, 5 May 2019 18:51:58 +0300 Subject: [PATCH] Upgrade to swift 5.0 --- .swift-version | 1 - Example/Example.xcodeproj/project.pbxproj | 35 +++++++------------ .../xcschemes/xcschememanagement.plist | 7 +++- Example/Example/AppDelegate.swift | 2 +- Example/Podfile | 2 +- JNGroupAvatarImageView.podspec | 25 ++++++------- .../project.pbxproj | 11 +++--- .../xcschemes/JNGroupAvatarImageView.xcscheme | 2 +- JNGroupAvatarImageView/Info.plist | 2 +- Podfile | 2 +- 10 files changed, 43 insertions(+), 46 deletions(-) delete mode 100644 .swift-version diff --git a/.swift-version b/.swift-version deleted file mode 100644 index b8626c4..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index e87b118..600ef38 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -103,7 +103,6 @@ 845DF2FF1F8FB61B0017F1E2 /* Frameworks */, 845DF3001F8FB61B0017F1E2 /* Resources */, B59C766645876587D6A3B4B7 /* [CP] Embed Pods Frameworks */, - A5283330CA38A40FB7053C3A /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -121,11 +120,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = JNDisrupter; TargetAttributes = { 845DF3011F8FB61B0017F1E2 = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; @@ -162,28 +162,13 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - A5283330CA38A40FB7053C3A /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; B59C766645876587D6A3B4B7 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/JNAvatarWithInitials/JNAvatarWithInitials.framework", "${BUILT_PRODUCTS_DIR}/JNGroupAvatarImageView/JNGroupAvatarImageView.framework", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", @@ -196,7 +181,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; D169916BEC508D22C54FE9C6 /* [CP] Check Pods Manifest.lock */ = { @@ -266,6 +251,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -273,6 +259,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -300,7 +287,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -323,6 +310,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -330,6 +318,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -351,7 +340,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -370,7 +359,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = JNDisrupter.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -386,7 +375,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = JNDisrupter.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Example/Example.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/Example.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/xcschememanagement.plist index b67cdbd..9c5d024 100644 --- a/Example/Example.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Example/Example.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,12 @@ Example.xcscheme orderHint - 0 + 4 + + Example.xcscheme_^#shared#^_ + + orderHint + 4 diff --git a/Example/Example/AppDelegate.swift b/Example/Example/AppDelegate.swift index 8fa0f1a..3784877 100644 --- a/Example/Example/AppDelegate.swift +++ b/Example/Example/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/Example/Podfile b/Example/Podfile index ed795f3..9f3e876 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -2,5 +2,5 @@ platform :ios, '9.0' use_frameworks! target 'Example' do - pod 'JNGroupAvatarImageView' , :git => 'https://github.com/JNDisrupter/JNGroupAvatarImageView.git' + pod 'JNGroupAvatarImageView' , :path => '../' end diff --git a/JNGroupAvatarImageView.podspec b/JNGroupAvatarImageView.podspec index 4f295a1..51fa77a 100644 --- a/JNGroupAvatarImageView.podspec +++ b/JNGroupAvatarImageView.podspec @@ -1,14 +1,15 @@ Pod::Spec.new do |s| - s.name = "JNGroupAvatarImageView" - s.version = "1.2.3" - s.summary = "Group avatar image view with initials" - s.description = "This library provide a way to create group avatar images with initials" - s.homepage = "https://github.com/JNDisrupter" - s.license = { :type => "MIT", :file => "LICENSE" } - s.authors = { "Jayel Zaghmoutt" => "eng.jayel.z@gmail.com", "Mohammad Nabulsi" => "mohammad.s.nabulsi@gmail.com" } - s.ios.deployment_target = '9.0' - s.source = { :git => "https://github.com/JNDisrupter/JNGroupAvatarImageView.git", :tag => "#{s.version}"} - s.source_files = "JNGroupAvatarImageView/**/*.{swift}" - s.screenshots = [ 'https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot1.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot2.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot3.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot4.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot5.png'] - s.dependency 'JNAvatarWithInitials' , '~> 1.1.2' + s.name = "JNGroupAvatarImageView" + s.version = "1.2.4" + s.summary = "Group avatar image view with initials" + s.description = "This library provide a way to create group avatar images with initials" + s.homepage = "https://github.com/JNDisrupter" + s.license = { :type => "MIT", :file => "LICENSE" } + s.authors = { "Jayel Zaghmoutt" => "eng.jayel.z@gmail.com", "Mohammad Nabulsi" => "mohammad.s.nabulsi@gmail.com" } + s.ios.deployment_target = '9.0' + s.source = { :git => "https://github.com/JNDisrupter/JNGroupAvatarImageView.git", :tag => "#{s.version}"} + s.source_files = "JNGroupAvatarImageView/**/*.{swift}" + s.screenshots = [ 'https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot1.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot2.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot3.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot4.png','https://github.com/JNDisrupter/JNGroupAvatarImageView/raw/development/Images/screenshot5.png'] + s.swift_version = '5.0' + s.dependency 'JNAvatarWithInitials' , '~> 1.1.4' end diff --git a/JNGroupAvatarImageView.xcodeproj/project.pbxproj b/JNGroupAvatarImageView.xcodeproj/project.pbxproj index d1e9122..c170434 100644 --- a/JNGroupAvatarImageView.xcodeproj/project.pbxproj +++ b/JNGroupAvatarImageView.xcodeproj/project.pbxproj @@ -121,12 +121,12 @@ 84B7B2181F71756F009CCC1D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = JNDisrupter; TargetAttributes = { 84B7B2201F717570009CCC1D = { CreatedOnToolsVersion = 8.3.3; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; @@ -136,6 +136,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 84B7B2171F71756F009CCC1D; @@ -196,6 +197,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -260,6 +262,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -331,7 +334,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -352,7 +355,7 @@ PRODUCT_BUNDLE_IDENTIFIER = JNDisrupter.JNGroupAvatarImageView; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/JNGroupAvatarImageView.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/JNGroupAvatarImageView.xcscheme b/JNGroupAvatarImageView.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/JNGroupAvatarImageView.xcscheme index a046de0..efd466f 100644 --- a/JNGroupAvatarImageView.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/JNGroupAvatarImageView.xcscheme +++ b/JNGroupAvatarImageView.xcodeproj/xcuserdata/mohammadnabulsi.xcuserdatad/xcschemes/JNGroupAvatarImageView.xcscheme @@ -1,6 +1,6 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.2.0 + 1.2.4 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Podfile b/Podfile index fda1923..aef5dba 100644 --- a/Podfile +++ b/Podfile @@ -2,5 +2,5 @@ platform :ios, '9.0' use_frameworks! target 'JNGroupAvatarImageView' do - pod 'JNAvatarWithInitials' + pod 'JNAvatarWithInitials' end