Skip to content

Commit 5431829

Browse files
authored
Merge pull request #295 from jeffctown/feature/Swift4Support
Updating for swift 4.x and Xcode 10.1
2 parents 30246ce + 78da4ef commit 5431829

File tree

61 files changed

+1193
-1460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1193
-1460
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ profile
1313
*.moved-aside
1414
.DS_Store
1515
*.xccheckout
16+
IDEWorkspaceChecks.plist
1617

1718
# Carthage
1819
Carthage/

.travis.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ before_install:
99

1010
matrix:
1111
include:
12-
- osx_image: xcode8.3
13-
env: RAKETASK="ios[iOS Framework,latest,build test,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
14-
- osx_image: xcode8.3
15-
env: RAKETASK="osx[Mac Framework,x86_64,build test,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
1612
- osx_image: xcode9.1
1713
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
1814
- osx_image: xcode9.1
@@ -21,6 +17,15 @@ matrix:
2117
env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
2218
- osx_image: xcode9.1
2319
env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
20+
- osx_image: xcode10.1
21+
env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
22+
- osx_image: xcode10.1
23+
env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
24+
- osx_image: xcode10.1
25+
env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
26+
- osx_image: xcode10.1
27+
env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]"
28+
2429

2530
script:
2631
- rake "$RAKETASK"

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# OHHTTPStubs — CHANGELOG
22

3+
## [7.0.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/7.0.0)
4+
5+
* Updating default Swift Version to 4.2.
6+
[@jeffctown](https://github.com/jeffctown)
7+
* Updating example projects to Swift 4.2 and Xcode 10.1.
8+
[@jeffctown](https://github.com/jeffctown)
9+
* Updating iOS Lib Tests to have a minimum iOS version of 8.0.
10+
[@jeffctown](https://github.com/jeffctown)
11+
12+
> Notes:
13+
> * Bumping this version to 7.0.0 because it's now using the Swift 4 APIs.
14+
> * This version is still compatible with Swift 3.x when integrating with CocoaPods, as CocoaPods uses the same `SWIFT_VERSION` as your app project does so it adapts automatically and it's transparent for users.
15+
> * If you're using Carthage and need Swift 3.x compatibility, you can follow the tips in the installation instructions of the `README.md`.
16+
> * CI is now only testing Swift 4.x on Xcode 9.1 and 10.1.
17+
> * Thank you to [@hellensoloviy](https://github.com/hellensoloviy), [@robertoferraz](https://github.com/robertoferraz), [@rckoenes](https://github.com/rckoenes), [@NikSativa](https://github.com/NikSativa) for their pull requests updating Swift!
18+
319
## [6.2.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/6.2.0)
20+
421
* Enabled application extension API only.
522
[@lightsprint09](https://github.com/lightsprint09)
623
* Disabled a flaky redirect test and adding the known issue with redirects to the README.

Examples/ObjC/MainViewController.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ - (void)viewDidLoad
3535
NSLog(@"[OHHTTPStubs] Request to %@ has been stubbed with %@", request.URL, stub.name);
3636
}];
3737
}
38-
- (void)viewDidUnload
39-
{
40-
[self setTextView:nil];
41-
[self setImageView:nil];
42-
[self setDelaySwitch:nil];
43-
[super viewDidUnload];
44-
}
4538

4639
- (BOOL)shouldUseDelay {
4740
__block BOOL res = NO;

Examples/ObjC/OHHTTPStubsDemo.xcodeproj/project.pbxproj

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
098FBDC615D704E800623941 /* Project object */ = {
157157
isa = PBXProject;
158158
attributes = {
159-
LastUpgradeCheck = 0700;
159+
LastUpgradeCheck = 1010;
160160
ORGANIZATIONNAME = AliSoftware;
161161
TargetAttributes = {
162162
098FBDCE15D704E800623941 = {
@@ -235,13 +235,21 @@
235235
ALWAYS_SEARCH_USER_PATHS = NO;
236236
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
237237
CLANG_ENABLE_OBJC_ARC = YES;
238+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
238239
CLANG_WARN_BOOL_CONVERSION = YES;
240+
CLANG_WARN_COMMA = YES;
239241
CLANG_WARN_CONSTANT_CONVERSION = YES;
242+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
240243
CLANG_WARN_EMPTY_BODY = YES;
241244
CLANG_WARN_ENUM_CONVERSION = YES;
242245
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
246+
CLANG_WARN_INFINITE_RECURSION = YES;
243247
CLANG_WARN_INT_CONVERSION = YES;
248+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
249+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
250+
CLANG_WARN_STRICT_PROTOTYPES = YES;
244251
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
252+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
245253
CLANG_WARN_UNREACHABLE_CODE = YES;
246254
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
247255
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -284,13 +292,21 @@
284292
ALWAYS_SEARCH_USER_PATHS = NO;
285293
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
286294
CLANG_ENABLE_OBJC_ARC = YES;
295+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
287296
CLANG_WARN_BOOL_CONVERSION = YES;
297+
CLANG_WARN_COMMA = YES;
288298
CLANG_WARN_CONSTANT_CONVERSION = YES;
299+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
289300
CLANG_WARN_EMPTY_BODY = YES;
290301
CLANG_WARN_ENUM_CONVERSION = YES;
291302
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
303+
CLANG_WARN_INFINITE_RECURSION = YES;
292304
CLANG_WARN_INT_CONVERSION = YES;
305+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
306+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
307+
CLANG_WARN_STRICT_PROTOTYPES = YES;
293308
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
309+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
294310
CLANG_WARN_UNREACHABLE_CODE = YES;
295311
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
296312
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";

Examples/ObjC/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme

Lines changed: 1 addition & 3 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 = "0700"
3+
LastUpgradeVersion = "1010"
44
version = "2.0">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -47,7 +46,6 @@
4746
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4847
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4948
enableUBSanitizer = "YES"
50-
language = ""
5149
launchStyle = "0"
5250
useCustomWorkingDirectory = "NO"
5351
ignoresPersistentStateOnLaunch = "NO"

Examples/ObjC/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'https://github.com/CocoaPods/Specs.git'
22

33
project 'OHHTTPStubsDemo.xcodeproj'
4-
platform :ios, '7.0'
4+
platform :ios, '8.0'
55

66
target 'OHHTTPStubsDemo' do
77
pod 'OHHTTPStubs', :path => '../..'

Examples/ObjC/Podfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
PODS:
2-
- OHHTTPStubs (6.2.0):
3-
- OHHTTPStubs/Default (= 6.2.0)
4-
- OHHTTPStubs/Core (6.2.0)
5-
- OHHTTPStubs/Default (6.2.0):
2+
- OHHTTPStubs (7.0.0):
3+
- OHHTTPStubs/Default (= 7.0.0)
4+
- OHHTTPStubs/Core (7.0.0)
5+
- OHHTTPStubs/Default (7.0.0):
66
- OHHTTPStubs/Core
77
- OHHTTPStubs/JSON
88
- OHHTTPStubs/NSURLSession
99
- OHHTTPStubs/OHPathHelpers
10-
- OHHTTPStubs/JSON (6.2.0):
10+
- OHHTTPStubs/JSON (7.0.0):
1111
- OHHTTPStubs/Core
12-
- OHHTTPStubs/NSURLSession (6.2.0):
12+
- OHHTTPStubs/NSURLSession (7.0.0):
1313
- OHHTTPStubs/Core
14-
- OHHTTPStubs/OHPathHelpers (6.2.0)
14+
- OHHTTPStubs/OHPathHelpers (7.0.0)
1515

1616
DEPENDENCIES:
1717
- OHHTTPStubs (from `../..`)
@@ -21,8 +21,8 @@ EXTERNAL SOURCES:
2121
:path: "../.."
2222

2323
SPEC CHECKSUMS:
24-
OHHTTPStubs: 9cde8b5c0b8cc5c0f393b5e20c8efb6e05915c63
24+
OHHTTPStubs: ef33a2c353110d306bb98f695435ec56ff5a26c3
2525

26-
PODFILE CHECKSUM: cde9fecbdd4703d197e608172ad2e689548bc0ac
26+
PODFILE CHECKSUM: 9a67077a86911aa4a252748903da3d5ea5d5d922
2727

2828
COCOAPODS: 1.6.0

Examples/ObjC/Pods/Local Podspecs/OHHTTPStubs.podspec.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/ObjC/Pods/Manifest.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)