Skip to content

Commit 2e0d99c

Browse files
authored
Xcode 13 compatibility (#131)
* Remove unnecessary code for SwiftUI component. The project should build now using Xcode 13 * Update travis yml * Bump version number. Update xcode configuration to recommended settings. iOS minimum required version is now iOS 12.0 * Set minimum swift version to 5
1 parent 637438c commit 2e0d99c

File tree

8 files changed

+20
-29
lines changed

8 files changed

+20
-29
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode12
2+
osx_image: xcode12.5
33

44
branches:
55
only:
@@ -13,6 +13,6 @@ before_install:
1313
script:
1414
- set -o pipefail
1515
- xcodebuild -scheme Viperit -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
16-
- xcodebuild test -scheme ViperitTests -destination 'platform=iOS Simulator,name=iPhone 11 Pro,OS=14.0' | xcpretty -c
16+
- xcodebuild test -scheme ViperitTests -destination 'platform=iOS Simulator,name=iPhone 12 Pro,OS=14.5' | xcpretty -c
1717
after_success:
1818
- bash <(curl -s https://codecov.io/bash)

Viperit.podspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
Pod::Spec.new do |s|
44
s.name = 'Viperit'
5-
s.version = '1.4.5'
5+
s.version = '1.5.0'
66
s.summary = 'Viper Framework for iOS written in Swift'
77

88
s.description = <<-DESC
@@ -15,7 +15,8 @@ Viper Framework for iOS to implement VIPER architecture in an easy way
1515
s.source = { :git => 'https://github.com/ferranabello/Viperit.git', :tag => s.version.to_s }
1616
s.weak_framework = 'SwiftUI'
1717
s.social_media_url = 'https://twitter.com/acferran'
18+
s.swift_version = '5'
1819

19-
s.ios.deployment_target = '11.0'
20+
s.ios.deployment_target = '12.0'
2021
s.source_files = 'Viperit/**/*.swift'
2122
end

Viperit.xcodeproj/project.pbxproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@
640640
isa = PBXProject;
641641
attributes = {
642642
LastSwiftUpdateCheck = 0820;
643-
LastUpgradeCheck = 0930;
643+
LastUpgradeCheck = 1300;
644644
ORGANIZATIONNAME = "Ferran Abelló";
645645
TargetAttributes = {
646646
53532C371DD50BD200088AAC = {
@@ -888,6 +888,7 @@
888888
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
889889
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
890890
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
891+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
891892
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
892893
CLANG_WARN_STRICT_PROTOTYPES = YES;
893894
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -913,7 +914,7 @@
913914
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
914915
GCC_WARN_UNUSED_FUNCTION = YES;
915916
GCC_WARN_UNUSED_VARIABLE = YES;
916-
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
917+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
917918
MTL_ENABLE_DEBUG_INFO = YES;
918919
ONLY_ACTIVE_ARCH = YES;
919920
SDKROOT = iphoneos;
@@ -948,6 +949,7 @@
948949
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
949950
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
950951
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
952+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
951953
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
952954
CLANG_WARN_STRICT_PROTOTYPES = YES;
953955
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -967,7 +969,7 @@
967969
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
968970
GCC_WARN_UNUSED_FUNCTION = YES;
969971
GCC_WARN_UNUSED_VARIABLE = YES;
970-
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
972+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
971973
MTL_ENABLE_DEBUG_INFO = NO;
972974
SDKROOT = iphoneos;
973975
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -1057,9 +1059,9 @@
10571059
DYLIB_INSTALL_NAME_BASE = "@rpath";
10581060
INFOPLIST_FILE = Viperit/Info.plist;
10591061
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1060-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1062+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
10611063
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1062-
MARKETING_VERSION = 1.4.5;
1064+
MARKETING_VERSION = 1.5.0;
10631065
OTHER_LDFLAGS = (
10641066
"-weak_framework",
10651067
SwiftUI,
@@ -1088,9 +1090,9 @@
10881090
DYLIB_INSTALL_NAME_BASE = "@rpath";
10891091
INFOPLIST_FILE = Viperit/Info.plist;
10901092
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1091-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1093+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
10921094
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1093-
MARKETING_VERSION = 1.4.5;
1095+
MARKETING_VERSION = 1.5.0;
10941096
OTHER_LDFLAGS = (
10951097
"-weak_framework",
10961098
SwiftUI,

Viperit.xcodeproj/xcshareddata/xcschemes/Viperit.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 = "0930"
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:Viperit.xcodeproj">
5250
</BuildableReference>
5351
</MacroExpansion>
54-
<AdditionalOptions>
55-
</AdditionalOptions>
5652
</LaunchAction>
5753
<ProfileAction
5854
buildConfiguration = "Release"

Viperit.xcodeproj/xcshareddata/xcschemes/ViperitTests.xcscheme

Lines changed: 3 additions & 7 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 = "0930"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -10,8 +10,8 @@
1010
buildConfiguration = "Debug"
1111
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1212
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13-
codeCoverageEnabled = "YES"
14-
shouldUseLaunchSchemeArgsEnv = "YES">
13+
shouldUseLaunchSchemeArgsEnv = "YES"
14+
codeCoverageEnabled = "YES">
1515
<Testables>
1616
<TestableReference
1717
skipped = "NO">
@@ -24,8 +24,6 @@
2424
</BuildableReference>
2525
</TestableReference>
2626
</Testables>
27-
<AdditionalOptions>
28-
</AdditionalOptions>
2927
</TestAction>
3028
<LaunchAction
3129
buildConfiguration = "Debug"
@@ -37,8 +35,6 @@
3735
debugDocumentVersioning = "YES"
3836
debugServiceExtension = "internal"
3937
allowLocationSimulation = "YES">
40-
<AdditionalOptions>
41-
</AdditionalOptions>
4238
</LaunchAction>
4339
<ProfileAction
4440
buildConfiguration = "Release"

Viperit/Core/Presenter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2016 Ferran Abelló. All rights reserved.
77
//
88

9-
public protocol PresenterProtocol: class, ViperitComponent {
9+
public protocol PresenterProtocol: AnyObject, ViperitComponent {
1010
var _interactor: InteractorProtocol! { get set }
1111
var _view: UserInterfaceProtocol! { get set }
1212
var _router: RouterProtocol! { get set }

Viperit/Core/UserInterface.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
public protocol UserInterfaceProtocol: class, ViperitComponent {
11+
public protocol UserInterfaceProtocol: AnyObject {
1212
var _presenter: PresenterProtocol! { get set }
1313
var _displayData: DisplayData? { get set }
1414
var viewController: UIViewController { get }

Viperit/Extensions/UserInterface+SwiftUI.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import SwiftUI
1212

1313
@available(iOS 13.0, *)
1414
public class HostingUserInterface<Content: View>: UIHostingController<Content>, UserInterfaceProtocol {
15-
public required init() {
16-
super.init(nibName: nil, bundle: nil)
17-
}
18-
1915
public var _presenter: PresenterProtocol!
2016
public var _displayData: DisplayData?
2117

0 commit comments

Comments
 (0)