Skip to content

Commit e4aa2cf

Browse files
authored
SPM compatibility (#19)
1 parent df76875 commit e4aa2cf

File tree

10 files changed

+71
-103
lines changed

10 files changed

+71
-103
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# * https://www.objc.io/issues/6-build-tools/travis-ci/
33
# * https://github.com/supermarin/xcpretty#usage
44

5-
osx_image: xcode10.2
5+
osx_image: xcode12.2
66
language: swift
77
cache: cocoapods
88
script:
99
- pod lib lint
10-
- set -o pipefail && xcodebuild -project UIViewController-DisplayChild.xcodeproj -scheme UIViewController-DisplayChild -sdk iphonesimulator12.2 ONLY_ACTIVE_ARCH=NO | xcpretty
10+
- set -o pipefail && xcodebuild -project UIViewController-DisplayChild.xcodeproj -scheme UIViewController-DisplayChild -sdk iphonesimulator14.2 ONLY_ACTIVE_ARCH=NO | xcpretty

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [2.2.1]
2+
### Added
3+
- SPM support. Moved sources under `Sources` folder, `Info.plist` under `Supporting Files` folder.
4+
- Updated travis Xcode version to 12.2
5+
- Removed macOS scheme
6+
7+
## [2.2.0]
8+
### Added
9+
- Swift 5 support
10+
111
## [2.1.0]
212
### Added
313
- `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.

Package.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "UIViewController-DisplayChild",
8+
platforms: [
9+
.iOS(.v12)
10+
],
11+
products: [
12+
.library(
13+
name: "UIViewController-DisplayChild",
14+
targets: ["UIViewController-DisplayChild"]),
15+
],
16+
targets: [
17+
.target(
18+
name: "UIViewController-DisplayChild",
19+
dependencies: [],
20+
path: "Sources"
21+
),
22+
]
23+
)

UIViewController-DisplayChild/UIViewController+DisplayChild.swift renamed to Sources/UIViewController+DisplayChild.swift

File renamed without changes.

UIViewController-DisplayChild/UIViewController-DisplayChild.h renamed to Sources/UIViewController-DisplayChild.h

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.0</string>
18+
<string>2.2.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

UIViewController-DisplayChild.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'UIViewController-DisplayChild'
3-
s.version = '2.2.0'
3+
s.version = '2.2.1'
44
s.summary = 'UIViewController containment made easy'
55
s.description = <<-DESC
66
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
1212
s.license = { :type => 'MIT', :file => 'LICENSE' }
1313
s.author = { 'INLOOPX' => '[email protected]' }
1414
s.source = { :git => 'https://github.com/inloop/UIViewController-DisplayChild.git', :tag => s.version.to_s }
15-
s.ios.deployment_target = '10.0'
15+
s.ios.deployment_target = '12.0'
1616
s.swift_version = '5'
17-
s.source_files = 'UIViewController-DisplayChild/**/*'
17+
s.source_files = 'Sources/**/*'
1818
s.exclude_files = 'UIViewController-DisplayChild/Info.plist'
1919
end

UIViewController-DisplayChild.xcodeproj/project.pbxproj

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
3B0791DC2088D3DE00A39104 /* UIViewController-DisplayChild.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController-DisplayChild.h"; sourceTree = "<group>"; };
1717
3B0791DD2088D3DE00A39104 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1818
3B0791E52088D46100A39104 /* UIViewController+DisplayChild.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+DisplayChild.swift"; sourceTree = "<group>"; };
19+
3B0E212D2542D13E00C56392 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
20+
3B0E212E2542D13E00C56392 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
1921
7AF376A420F6193D008B24D1 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = "<group>"; };
2022
7AF376A520F6194C008B24D1 /* UIViewController-DisplayChild.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = "UIViewController-DisplayChild.podspec"; sourceTree = "<group>"; };
2123
7AF376A620F61958008B24D1 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
@@ -35,10 +37,13 @@
3537
3B0791CF2088D3DE00A39104 = {
3638
isa = PBXGroup;
3739
children = (
40+
3B0E21312542D32C00C56392 /* Supporting Files */,
41+
3B0E212D2542D13E00C56392 /* CHANGELOG.md */,
42+
3B0E212E2542D13E00C56392 /* Package.swift */,
3843
7AF376A420F6193D008B24D1 /* .travis.yml */,
3944
7AF376A520F6194C008B24D1 /* UIViewController-DisplayChild.podspec */,
4045
7AF376A620F61958008B24D1 /* README.md */,
41-
3B0791DB2088D3DE00A39104 /* UIViewController-DisplayChild */,
46+
3B0791DB2088D3DE00A39104 /* Sources */,
4247
3B0791DA2088D3DE00A39104 /* Products */,
4348
);
4449
sourceTree = "<group>";
@@ -51,14 +56,21 @@
5156
name = Products;
5257
sourceTree = "<group>";
5358
};
54-
3B0791DB2088D3DE00A39104 /* UIViewController-DisplayChild */ = {
59+
3B0791DB2088D3DE00A39104 /* Sources */ = {
5560
isa = PBXGroup;
5661
children = (
5762
3B0791E52088D46100A39104 /* UIViewController+DisplayChild.swift */,
5863
3B0791DC2088D3DE00A39104 /* UIViewController-DisplayChild.h */,
64+
);
65+
path = Sources;
66+
sourceTree = "<group>";
67+
};
68+
3B0E21312542D32C00C56392 /* Supporting Files */ = {
69+
isa = PBXGroup;
70+
children = (
5971
3B0791DD2088D3DE00A39104 /* Info.plist */,
6072
);
61-
path = "UIViewController-DisplayChild";
73+
path = "Supporting Files";
6274
sourceTree = "<group>";
6375
};
6476
/* End PBXGroup section */
@@ -99,7 +111,7 @@
99111
3B0791D02088D3DE00A39104 /* Project object */ = {
100112
isa = PBXProject;
101113
attributes = {
102-
LastUpgradeCheck = 0930;
114+
LastUpgradeCheck = 1200;
103115
ORGANIZATIONNAME = INLOOPX;
104116
TargetAttributes = {
105117
3B0791D82088D3DE00A39104 = {
@@ -114,6 +126,7 @@
114126
hasScannedForEncodings = 0;
115127
knownRegions = (
116128
en,
129+
Base,
117130
);
118131
mainGroup = 3B0791CF2088D3DE00A39104;
119132
productRefGroup = 3B0791DA2088D3DE00A39104 /* Products */;
@@ -173,6 +186,7 @@
173186
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
174187
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
175188
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
189+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
176190
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
177191
CLANG_WARN_STRICT_PROTOTYPES = YES;
178192
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -199,7 +213,8 @@
199213
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
200214
GCC_WARN_UNUSED_FUNCTION = YES;
201215
GCC_WARN_UNUSED_VARIABLE = YES;
202-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
216+
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
217+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
203218
MTL_ENABLE_DEBUG_INFO = YES;
204219
ONLY_ACTIVE_ARCH = YES;
205220
SDKROOT = iphoneos;
@@ -236,6 +251,7 @@
236251
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
237252
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
238253
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
254+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
239255
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
240256
CLANG_WARN_STRICT_PROTOTYPES = YES;
241257
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -256,7 +272,8 @@
256272
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
257273
GCC_WARN_UNUSED_FUNCTION = YES;
258274
GCC_WARN_UNUSED_VARIABLE = YES;
259-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
275+
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
276+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
260277
MTL_ENABLE_DEBUG_INFO = NO;
261278
SDKROOT = iphoneos;
262279
SWIFT_COMPILATION_MODE = wholemodule;
@@ -273,20 +290,21 @@
273290
CLANG_ENABLE_MODULES = YES;
274291
CODE_SIGN_IDENTITY = "";
275292
CODE_SIGN_STYLE = Automatic;
276-
CURRENT_PROJECT_VERSION = 200;
293+
CURRENT_PROJECT_VERSION = 0;
277294
DEFINES_MODULE = YES;
278295
DEVELOPMENT_TEAM = 7V6Y7G6333;
279296
DYLIB_COMPATIBILITY_VERSION = 200;
280297
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
281298
DYLIB_INSTALL_NAME_BASE = "@rpath";
282-
INFOPLIST_FILE = "UIViewController-DisplayChild/Info.plist";
299+
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
283300
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
284-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
301+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
285302
LD_RUNPATH_SEARCH_PATHS = (
286303
"$(inherited)",
287304
"@executable_path/Frameworks",
288305
"@loader_path/Frameworks",
289306
);
307+
MARKETING_VERSION = 2.2.1;
290308
PRODUCT_BUNDLE_IDENTIFIER = com.inloopx.Vito;
291309
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
292310
SKIP_INSTALL = YES;
@@ -302,20 +320,21 @@
302320
CLANG_ENABLE_MODULES = YES;
303321
CODE_SIGN_IDENTITY = "";
304322
CODE_SIGN_STYLE = Automatic;
305-
CURRENT_PROJECT_VERSION = 200;
323+
CURRENT_PROJECT_VERSION = 0;
306324
DEFINES_MODULE = YES;
307325
DEVELOPMENT_TEAM = 7V6Y7G6333;
308326
DYLIB_COMPATIBILITY_VERSION = 200;
309327
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
310328
DYLIB_INSTALL_NAME_BASE = "@rpath";
311-
INFOPLIST_FILE = "UIViewController-DisplayChild/Info.plist";
329+
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
312330
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
313-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
331+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
314332
LD_RUNPATH_SEARCH_PATHS = (
315333
"$(inherited)",
316334
"@executable_path/Frameworks",
317335
"@loader_path/Frameworks",
318336
);
337+
MARKETING_VERSION = 2.2.1;
319338
PRODUCT_BUNDLE_IDENTIFIER = com.inloopx.Vito;
320339
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
321340
SKIP_INSTALL = YES;

UIViewController-DisplayChild.xcodeproj/xcshareddata/xcschemes/UIViewController-DisplayChild.xcscheme

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1200"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -29,8 +29,6 @@
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
3131
</Testables>
32-
<AdditionalOptions>
33-
</AdditionalOptions>
3432
</TestAction>
3533
<LaunchAction
3634
buildConfiguration = "Debug"
@@ -51,8 +49,6 @@
5149
ReferencedContainer = "container:UIViewController-DisplayChild.xcodeproj">
5250
</BuildableReference>
5351
</MacroExpansion>
54-
<AdditionalOptions>
55-
</AdditionalOptions>
5652
</LaunchAction>
5753
<ProfileAction
5854
buildConfiguration = "Release"

UIViewController-DisplayChild.xcodeproj/xcshareddata/xcschemes/Vito.xcscheme

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)