Skip to content

Commit a2f42d2

Browse files
committed
Update to Xcode 15, Swift 5 and apply recommendations - Drops support for iOS 8
1 parent 34027f7 commit a2f42d2

File tree

9 files changed

+35
-31
lines changed

9 files changed

+35
-31
lines changed

ContainerController.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Pod::Spec.new do |s|
1212
s.summary = 'Lightweight Swift Framework for iOS which let you replace UIViewController in UIContainerViews based on UIStoryboardSegues!'
1313
s.homepage = 'https://github.com/tschob/ContainerController.git'
1414
s.license = { :type => 'MIT', :file => 'LICENSE' }
15-
s.author = { 'Hans Seiffert' => '[email protected]' }
15+
s.author = { 'Hans Seiffert' => '[email protected]' }
1616

1717
s.source = { :git => 'https://github.com/tschob/ContainerController.git', :tag => s.version.to_s }
1818

1919
s.platform = :ios
20-
s.ios.deployment_target = '8.0'
21-
s.swift_version = '4.2'
20+
s.ios.deployment_target = '9.0'
21+
s.swift_version = '5.3'
2222

2323
s.source_files = 'ContainerController/**/*.{swift,h}'
2424
s.public_header_files = 'ContainerController/**/*.h'

ContainerController/ContainerController.xcodeproj/project.pbxproj

+10-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
874CF04A1D55F02E0049423E /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
2525
877DFDE81D56226000A1BF33 /* UIViewController+ContainerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+ContainerViewController.swift"; sourceTree = "<group>"; };
2626
F7DBED6C220A20AC000ED71A /* ContainerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContainerViewController.swift; sourceTree = "<group>"; };
27-
F7DBED6E220A22AC000ED71A /* ContainerController.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = ContainerController.podspec; path = ../ContainerController.podspec; sourceTree = "<group>"; };
27+
F7DBED6E220A22AC000ED71A /* ContainerController.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = ContainerController.podspec; path = ../ContainerController.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
2828
/* End PBXFileReference section */
2929

3030
/* Begin PBXFrameworksBuildPhase section */
@@ -132,7 +132,7 @@
132132
87114B0F1D55EBA500C58D85 /* Project object */ = {
133133
isa = PBXProject;
134134
attributes = {
135-
LastUpgradeCheck = 1010;
135+
LastUpgradeCheck = 1300;
136136
ORGANIZATIONNAME = "Hans Seiffert";
137137
TargetAttributes = {
138138
87114B171D55EBA600C58D85 = {
@@ -143,10 +143,11 @@
143143
};
144144
buildConfigurationList = 87114B121D55EBA500C58D85 /* Build configuration list for PBXProject "ContainerController" */;
145145
compatibilityVersion = "Xcode 3.2";
146-
developmentRegion = English;
146+
developmentRegion = en;
147147
hasScannedForEncodings = 0;
148148
knownRegions = (
149149
en,
150+
Base,
150151
);
151152
mainGroup = 87114B0E1D55EBA500C58D85;
152153
productRefGroup = 87114B191D55EBA600C58D85 /* Products */;
@@ -205,6 +206,7 @@
205206
isa = XCBuildConfiguration;
206207
buildSettings = {
207208
ALWAYS_SEARCH_USER_PATHS = NO;
209+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
208210
CLANG_ANALYZER_NONNULL = YES;
209211
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
210212
CLANG_CXX_LIBRARY = "libc++";
@@ -224,6 +226,7 @@
224226
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
225227
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
226228
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
229+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
227230
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
228231
CLANG_WARN_STRICT_PROTOTYPES = YES;
229232
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -254,7 +257,7 @@
254257
ONLY_ACTIVE_ARCH = YES;
255258
SDKROOT = iphoneos;
256259
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
257-
SWIFT_VERSION = 4.2;
260+
SWIFT_VERSION = 5.0;
258261
TARGETED_DEVICE_FAMILY = "1,2";
259262
VERSIONING_SYSTEM = "apple-generic";
260263
VERSION_INFO_PREFIX = "";
@@ -265,6 +268,7 @@
265268
isa = XCBuildConfiguration;
266269
buildSettings = {
267270
ALWAYS_SEARCH_USER_PATHS = NO;
271+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
268272
CLANG_ANALYZER_NONNULL = YES;
269273
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
270274
CLANG_CXX_LIBRARY = "libc++";
@@ -284,6 +288,7 @@
284288
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
285289
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
286290
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
291+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
287292
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
288293
CLANG_WARN_STRICT_PROTOTYPES = YES;
289294
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -307,7 +312,7 @@
307312
MTL_ENABLE_DEBUG_INFO = NO;
308313
SDKROOT = iphoneos;
309314
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
310-
SWIFT_VERSION = 4.2;
315+
SWIFT_VERSION = 5.0;
311316
TARGETED_DEVICE_FAMILY = "1,2";
312317
VALIDATE_PRODUCT = YES;
313318
VERSIONING_SYSTEM = "apple-generic";
@@ -334,7 +339,6 @@
334339
SKIP_INSTALL = YES;
335340
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
336341
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
337-
SWIFT_VERSION = 4.2;
338342
};
339343
name = Debug;
340344
};
@@ -356,7 +360,6 @@
356360
PRODUCT_NAME = ContainerController;
357361
SKIP_INSTALL = YES;
358362
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
359-
SWIFT_VERSION = 4.2;
360363
};
361364
name = Release;
362365
};

ContainerController/ContainerController.xcodeproj/xcshareddata/xcschemes/ContainerController.xcscheme

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1300"
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:ContainerController.xcodeproj">
5250
</BuildableReference>
5351
</MacroExpansion>
54-
<AdditionalOptions>
55-
</AdditionalOptions>
5652
</LaunchAction>
5753
<ProfileAction
5854
buildConfiguration = "Release"

ContainerController/Core/ContainerViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ open class ContainerViewController: UIViewController {
189189
// Remove the old content controller from the stored controllers if reusing is disabled. This will release the old content controller
190190
if
191191
!self.shouldReuseContentController,
192-
let index = self.embedContentControllers.values.index(of: sourceContentController) {
192+
let index = self.embedContentControllers.values.firstIndex(of: sourceContentController) {
193193
log("Remove content controller: \(sourceContentController) from the stored embed controller as it shouldn't be reused." as AnyObject)
194194
self.embedContentControllers.remove(at: index)
195195
}

ContainerController/Core/ContainerViewControllerDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
public protocol ContainerViewControllerDelegate: class {
11+
public protocol ContainerViewControllerDelegate: AnyObject {
1212

1313
func containerViewController(_ containerController: ContainerViewController, willDisplay contentController: UIViewController, isReused: Bool)
1414
}

ContainerController/Core/UIViewController+ContainerViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public extension UIViewController {
1717
/// This property is set within the `cc_setupContainerViewControllerIfNeeded` method using the default segue identifier.
1818
///
1919
/// If you want to use a diferent segue identifier or multiple container controller in one view controller you have to store them manually by responding to your custom segue identifier.
20-
public var cc_ContainerViewController: ContainerViewController? {
20+
var cc_ContainerViewController: ContainerViewController? {
2121
return self.privateContainerViewController
2222
}
2323

@@ -28,7 +28,7 @@ public extension UIViewController {
2828
/// - segue: A `UIStoryboardSegue` which might use the default container controller segue identifier.
2929
/// - segueIdentifier: The default segue identifier of the content controller which should be used as first content to show.
3030
/// - didSetup: A closure which will only be called if the container controller is initialized. You might want to adjust the settings then. The default value is `nil`.
31-
public func cc_setupContainerViewControllerIfNeeded(_ segue: UIStoryboardSegue, default segueIdentifier: ContainerViewController.StoryboardSegueIdentifier?, didSetup: (() -> Void)? = nil) {
31+
func cc_setupContainerViewControllerIfNeeded(_ segue: UIStoryboardSegue, default segueIdentifier: ContainerViewController.StoryboardSegueIdentifier?, didSetup: (() -> Void)? = nil) {
3232
if
3333
self.privateContainerViewController == nil && segue.identifier == ContainerViewController.embedSegueIdentifier,
3434
let containerController = segue.destination as? ContainerViewController {

Example/Example.xcodeproj/project.pbxproj

+13-4
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@
162162
isa = PBXProject;
163163
attributes = {
164164
LastSwiftUpdateCheck = 0730;
165-
LastUpgradeCheck = 1010;
165+
LastUpgradeCheck = 1300;
166166
ORGANIZATIONNAME = "Hans Seiffert";
167167
TargetAttributes = {
168168
87114B2B1D55EBDB00C58D85 = {
169169
CreatedOnToolsVersion = 7.3;
170170
DevelopmentTeam = BY48Q678R7;
171-
LastSwiftMigration = 0900;
171+
LastSwiftMigration = 1300;
172172
};
173173
};
174174
};
@@ -177,6 +177,7 @@
177177
developmentRegion = English;
178178
hasScannedForEncodings = 0;
179179
knownRegions = (
180+
English,
180181
en,
181182
Base,
182183
);
@@ -275,6 +276,7 @@
275276
isa = XCBuildConfiguration;
276277
buildSettings = {
277278
ALWAYS_SEARCH_USER_PATHS = NO;
279+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
278280
CLANG_ANALYZER_NONNULL = YES;
279281
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
280282
CLANG_CXX_LIBRARY = "libc++";
@@ -294,6 +296,7 @@
294296
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
295297
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
296298
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
299+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
297300
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
298301
CLANG_WARN_STRICT_PROTOTYPES = YES;
299302
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -318,7 +321,7 @@
318321
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
319322
GCC_WARN_UNUSED_FUNCTION = YES;
320323
GCC_WARN_UNUSED_VARIABLE = YES;
321-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
324+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
322325
MTL_ENABLE_DEBUG_INFO = YES;
323326
ONLY_ACTIVE_ARCH = YES;
324327
SDKROOT = iphoneos;
@@ -332,6 +335,7 @@
332335
isa = XCBuildConfiguration;
333336
buildSettings = {
334337
ALWAYS_SEARCH_USER_PATHS = NO;
338+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
335339
CLANG_ANALYZER_NONNULL = YES;
336340
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
337341
CLANG_CXX_LIBRARY = "libc++";
@@ -351,6 +355,7 @@
351355
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
352356
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
353357
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
358+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
354359
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
355360
CLANG_WARN_STRICT_PROTOTYPES = YES;
356361
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -369,7 +374,7 @@
369374
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
370375
GCC_WARN_UNUSED_FUNCTION = YES;
371376
GCC_WARN_UNUSED_VARIABLE = YES;
372-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
377+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
373378
MTL_ENABLE_DEBUG_INFO = NO;
374379
SDKROOT = iphoneos;
375380
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -387,10 +392,12 @@
387392
CODE_SIGN_IDENTITY = "iPhone Developer";
388393
INFOPLIST_FILE = "PLists/Example-Info.plist";
389394
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
395+
OTHER_LDFLAGS = "$(inherited)";
390396
OTHER_SWIFT_FLAGS = "$(inherited) -D DEBUG";
391397
PRODUCT_BUNDLE_IDENTIFIER = de.seiffert.hans.swift.containercontroller.example;
392398
PRODUCT_NAME = "$(TARGET_NAME)";
393399
PROVISIONING_PROFILE = "35c65a7a-c0c5-4add-ae0f-c5b38f3809d0";
400+
SWIFT_VERSION = 5.0;
394401
};
395402
name = Debug;
396403
};
@@ -402,9 +409,11 @@
402409
CODE_SIGN_IDENTITY = "iPhone Developer";
403410
INFOPLIST_FILE = "PLists/Example-Info.plist";
404411
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
412+
OTHER_LDFLAGS = "$(inherited)";
405413
OTHER_SWIFT_FLAGS = "$(inherited) -D RELEASE";
406414
PRODUCT_BUNDLE_IDENTIFIER = de.seiffert.hans.swift.containercontroller.example;
407415
PRODUCT_NAME = "$(TARGET_NAME)";
416+
SWIFT_VERSION = 5.0;
408417
};
409418
name = Release;
410419
};

Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:Example.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:Example.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

Example/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://github.com/CocoaPods/Specs.git'
22

3-
platform :ios, '8.0'
3+
platform :ios, '9.0'
44

55
use_frameworks!
66

0 commit comments

Comments
 (0)