Skip to content

Commit

Permalink
SPM compatibility (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubpetrik authored Oct 23, 2020
1 parent df76875 commit e4aa2cf
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 103 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
23 changes: 23 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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"
),
]
)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.2.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions UIViewController-DisplayChild.podspec
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
43 changes: 31 additions & 12 deletions UIViewController-DisplayChild.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
3B0791DC2088D3DE00A39104 /* UIViewController-DisplayChild.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController-DisplayChild.h"; sourceTree = "<group>"; };
3B0791DD2088D3DE00A39104 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3B0791E52088D46100A39104 /* UIViewController+DisplayChild.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+DisplayChild.swift"; sourceTree = "<group>"; };
3B0E212D2542D13E00C56392 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
3B0E212E2542D13E00C56392 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
7AF376A420F6193D008B24D1 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = "<group>"; };
7AF376A520F6194C008B24D1 /* UIViewController-DisplayChild.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = "UIViewController-DisplayChild.podspec"; sourceTree = "<group>"; };
7AF376A620F61958008B24D1 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
Expand All @@ -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 = "<group>";
Expand All @@ -51,14 +56,21 @@
name = Products;
sourceTree = "<group>";
};
3B0791DB2088D3DE00A39104 /* UIViewController-DisplayChild */ = {
3B0791DB2088D3DE00A39104 /* Sources */ = {
isa = PBXGroup;
children = (
3B0791E52088D46100A39104 /* UIViewController+DisplayChild.swift */,
3B0791DC2088D3DE00A39104 /* UIViewController-DisplayChild.h */,
);
path = Sources;
sourceTree = "<group>";
};
3B0E21312542D32C00C56392 /* Supporting Files */ = {
isa = PBXGroup;
children = (
3B0791DD2088D3DE00A39104 /* Info.plist */,
);
path = "UIViewController-DisplayChild";
path = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -99,7 +111,7 @@
3B0791D02088D3DE00A39104 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = INLOOPX;
TargetAttributes = {
3B0791D82088D3DE00A39104 = {
Expand All @@ -114,6 +126,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 3B0791CF2088D3DE00A39104;
productRefGroup = 3B0791DA2088D3DE00A39104 /* Products */;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:UIViewController-DisplayChild.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down

This file was deleted.

0 comments on commit e4aa2cf

Please sign in to comment.