diff --git a/.travis.yml b/.travis.yml index a8fbe00..057453a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ # * https://www.objc.io/issues/6-build-tools/travis-ci/ # * https://github.com/supermarin/xcpretty#usage -osx_image: xcode10.2 +osx_image: xcode12.2 language: swift cache: cocoapods script: - pod lib lint -- set -o pipefail && xcodebuild -project UIViewController-DisplayChild.xcodeproj -scheme UIViewController-DisplayChild -sdk iphonesimulator12.2 ONLY_ACTIVE_ARCH=NO | xcpretty +- set -o pipefail && xcodebuild -project UIViewController-DisplayChild.xcodeproj -scheme UIViewController-DisplayChild -sdk iphonesimulator14.2 ONLY_ACTIVE_ARCH=NO | xcpretty diff --git a/CHANGELOG.md b/CHANGELOG.md index c597129..26a72af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [2.2.1] +### Added +- SPM support. Moved sources under `Sources` folder, `Info.plist` under `Supporting Files` folder. +- Updated travis Xcode version to 12.2 +- Removed macOS scheme + +## [2.2.0] +### Added +- Swift 5 support + ## [2.1.0] ### Added - `UIStackView` support. You can now use `UIStackView` as a container, and you can insert child's view with animation if you wish. `UIStackView` is a great help, especially if you have multiple childs. You no longer need to set them constraints - `UIStackView` + autolayout will do this for you. diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..d17ac27 --- /dev/null +++ b/Package.swift @@ -0,0 +1,23 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "UIViewController-DisplayChild", + platforms: [ + .iOS(.v12) + ], + products: [ + .library( + name: "UIViewController-DisplayChild", + targets: ["UIViewController-DisplayChild"]), + ], + targets: [ + .target( + name: "UIViewController-DisplayChild", + dependencies: [], + path: "Sources" + ), + ] +) diff --git a/UIViewController-DisplayChild/UIViewController+DisplayChild.swift b/Sources/UIViewController+DisplayChild.swift similarity index 100% rename from UIViewController-DisplayChild/UIViewController+DisplayChild.swift rename to Sources/UIViewController+DisplayChild.swift diff --git a/UIViewController-DisplayChild/UIViewController-DisplayChild.h b/Sources/UIViewController-DisplayChild.h similarity index 100% rename from UIViewController-DisplayChild/UIViewController-DisplayChild.h rename to Sources/UIViewController-DisplayChild.h diff --git a/UIViewController-DisplayChild/Info.plist b/Supporting Files/Info.plist similarity index 96% rename from UIViewController-DisplayChild/Info.plist rename to Supporting Files/Info.plist index d749896..90af859 100644 --- a/UIViewController-DisplayChild/Info.plist +++ b/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.0 + 2.2.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/UIViewController-DisplayChild.podspec b/UIViewController-DisplayChild.podspec index ebf92ba..46bcd5a 100644 --- a/UIViewController-DisplayChild.podspec +++ b/UIViewController-DisplayChild.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'UIViewController-DisplayChild' - s.version = '2.2.0' + s.version = '2.2.1' s.summary = 'UIViewController containment made easy' s.description = <<-DESC The problem: sometimes you need to embed a controller, but it might be embedded already. E.g. you have an empty view, and you do refresh only to get empty view again. If you do not check for its existence, you might end up creating a new instance unneccessarily. This can also have bad side effects when there is some heavier work in viewDidLoad for example. @@ -12,8 +12,8 @@ The solution: transition to type, instead of an instance. If the instance does n s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { 'INLOOPX' => 'info@inloopx.com' } s.source = { :git => 'https://github.com/inloop/UIViewController-DisplayChild.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '12.0' s.swift_version = '5' - s.source_files = 'UIViewController-DisplayChild/**/*' + s.source_files = 'Sources/**/*' s.exclude_files = 'UIViewController-DisplayChild/Info.plist' end diff --git a/UIViewController-DisplayChild.xcodeproj/project.pbxproj b/UIViewController-DisplayChild.xcodeproj/project.pbxproj index ca99ebe..ce17c6b 100644 --- a/UIViewController-DisplayChild.xcodeproj/project.pbxproj +++ b/UIViewController-DisplayChild.xcodeproj/project.pbxproj @@ -16,6 +16,8 @@ 3B0791DC2088D3DE00A39104 /* UIViewController-DisplayChild.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController-DisplayChild.h"; sourceTree = ""; }; 3B0791DD2088D3DE00A39104 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3B0791E52088D46100A39104 /* UIViewController+DisplayChild.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+DisplayChild.swift"; sourceTree = ""; }; + 3B0E212D2542D13E00C56392 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + 3B0E212E2542D13E00C56392 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 7AF376A420F6193D008B24D1 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; 7AF376A520F6194C008B24D1 /* UIViewController-DisplayChild.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = "UIViewController-DisplayChild.podspec"; sourceTree = ""; }; 7AF376A620F61958008B24D1 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; @@ -35,10 +37,13 @@ 3B0791CF2088D3DE00A39104 = { isa = PBXGroup; children = ( + 3B0E21312542D32C00C56392 /* Supporting Files */, + 3B0E212D2542D13E00C56392 /* CHANGELOG.md */, + 3B0E212E2542D13E00C56392 /* Package.swift */, 7AF376A420F6193D008B24D1 /* .travis.yml */, 7AF376A520F6194C008B24D1 /* UIViewController-DisplayChild.podspec */, 7AF376A620F61958008B24D1 /* README.md */, - 3B0791DB2088D3DE00A39104 /* UIViewController-DisplayChild */, + 3B0791DB2088D3DE00A39104 /* Sources */, 3B0791DA2088D3DE00A39104 /* Products */, ); sourceTree = ""; @@ -51,14 +56,21 @@ name = Products; sourceTree = ""; }; - 3B0791DB2088D3DE00A39104 /* UIViewController-DisplayChild */ = { + 3B0791DB2088D3DE00A39104 /* Sources */ = { isa = PBXGroup; children = ( 3B0791E52088D46100A39104 /* UIViewController+DisplayChild.swift */, 3B0791DC2088D3DE00A39104 /* UIViewController-DisplayChild.h */, + ); + path = Sources; + sourceTree = ""; + }; + 3B0E21312542D32C00C56392 /* Supporting Files */ = { + isa = PBXGroup; + children = ( 3B0791DD2088D3DE00A39104 /* Info.plist */, ); - path = "UIViewController-DisplayChild"; + path = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ @@ -99,7 +111,7 @@ 3B0791D02088D3DE00A39104 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = INLOOPX; TargetAttributes = { 3B0791D82088D3DE00A39104 = { @@ -114,6 +126,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 3B0791CF2088D3DE00A39104; productRefGroup = 3B0791DA2088D3DE00A39104 /* Products */; @@ -173,6 +186,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -199,7 +213,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; + INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -236,6 +251,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -256,7 +272,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; + INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -273,20 +290,21 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 200; + CURRENT_PROJECT_VERSION = 0; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 7V6Y7G6333; DYLIB_COMPATIBILITY_VERSION = 200; DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "UIViewController-DisplayChild/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.inloopx.Vito; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -302,20 +320,21 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 200; + CURRENT_PROJECT_VERSION = 0; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 7V6Y7G6333; DYLIB_COMPATIBILITY_VERSION = 200; DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "UIViewController-DisplayChild/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = com.inloopx.Vito; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/UIViewController-DisplayChild.xcodeproj/xcshareddata/xcschemes/UIViewController-DisplayChild.xcscheme b/UIViewController-DisplayChild.xcodeproj/xcshareddata/xcschemes/UIViewController-DisplayChild.xcscheme index e544f8c..62b0e81 100644 --- a/UIViewController-DisplayChild.xcodeproj/xcshareddata/xcschemes/UIViewController-DisplayChild.xcscheme +++ b/UIViewController-DisplayChild.xcodeproj/xcshareddata/xcschemes/UIViewController-DisplayChild.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -