Skip to content

Commit

Permalink
Merge pull request #2 from arturgrigor/develop
Browse files Browse the repository at this point in the history
Swift 5.1 and Xcode 11 support
  • Loading branch information
arturgrigor authored Nov 10, 2019
2 parents 19d54e5 + 31a8e92 commit c8f8d71
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.1
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode10
osx_image: xcode11.2
branches:
only:
- master
Expand All @@ -10,13 +10,13 @@ env:
- SCHEME="IPAPI"
matrix:
- DESTINATION="OS=4.0,name=Apple Watch Series 3 - 42mm" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=2.0,name=Apple Watch - 42mm" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=3.2,name=Apple Watch - 42mm" RUN_TESTS="NO" POD_LINT="NO"

- DESTINATION="OS=12.0,name=iPhone 8 Plus" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPad 2" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=13.2,name=iPhone 11 Pro Max" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=10.3.1,name=iPad Air" RUN_TESTS="NO" POD_LINT="NO"

- DESTINATION="OS=12.0,name=Apple TV" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=Apple TV 1080p" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=13.2,name=Apple TV" RUN_TESTS="NO" POD_LINT="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" RUN_TESTS="NO" POD_LINT="NO"

- DESTINATION="arch=x86_64" RUN_TESTS="YES" POD_LINT="NO"
script:
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "AliSoftware/OHHTTPStubs" "6.1.0"
github "AliSoftware/OHHTTPStubs" "8.0.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/OHHTTPStubs
Submodule OHHTTPStubs updated 74 files
+1 −0 .gitignore
+26 −9 .travis.yml
+38 −0 CHANGELOG.md
+0 −7 Examples/ObjC/MainViewController.m
+21 −34 Examples/ObjC/OHHTTPStubsDemo.xcodeproj/project.pbxproj
+1 −3 Examples/ObjC/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme
+1 −1 Examples/ObjC/Podfile
+11 −11 Examples/ObjC/Podfile.lock
+3 −3 Examples/ObjC/Pods/Local Podspecs/OHHTTPStubs.podspec.json
+11 −11 Examples/ObjC/Pods/Manifest.lock
+272 −255 Examples/ObjC/Pods/Pods.xcodeproj/project.pbxproj
+4 −5 Examples/ObjC/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig
+3 −4 Examples/ObjC/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo.debug.xcconfig
+3 −4 Examples/ObjC/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo.release.xcconfig
+9 −2 Examples/Swift/AppDelegate.swift
+1 −1 Examples/Swift/MainViewController.swift
+26 −23 Examples/Swift/OHHTTPStubsDemo.xcodeproj/project.pbxproj
+1 −3 Examples/Swift/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme
+11 −11 Examples/Swift/Podfile.lock
+3 −3 Examples/Swift/Pods/Local Podspecs/OHHTTPStubs.podspec.json
+11 −11 Examples/Swift/Pods/Manifest.lock
+383 −342 Examples/Swift/Pods/Pods.xcodeproj/project.pbxproj
+1 −1 Examples/Swift/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-Info.plist
+5 −6 Examples/Swift/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig
+26 −0 Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo-Info.plist
+64 −13 Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo-frameworks.sh
+6 −6 Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo.debug.xcconfig
+6 −6 Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo.release.xcconfig
+2 −3 OHHTTPStubs.podspec
+45 −166 OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj
+1 −3 OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs Mac Framework.xcscheme
+1 −3 OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS Framework.xcscheme
+1 −3 OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS StaticLib.xcscheme
+1 −3 OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs tvOS Framework.xcscheme
+30 −0 OHHTTPStubs/OHHTTPStubsProject.xcconfig
+1 −1 OHHTTPStubs/Podfile
+6 −2 OHHTTPStubs/Podfile.lock
+6 −2 OHHTTPStubs/Pods/Manifest.lock
+786 −959 OHHTTPStubs/Pods/Pods.xcodeproj/project.pbxproj
+5 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-c94d3492/AFNetworking-c94d3492-dummy.m
+8 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-c94d3492/AFNetworking-c94d3492-prefix.pch
+9 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-c94d3492/AFNetworking-c94d3492.xcconfig
+5 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS/AFNetworking-iOS-dummy.m
+8 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS/AFNetworking-iOS-prefix.pch
+9 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS/AFNetworking-iOS.xcconfig
+0 −5 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS7.0/AFNetworking-iOS7.0-dummy.m
+0 −15 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS7.0/AFNetworking-iOS7.0-prefix.pch
+0 −9 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS7.0/AFNetworking-iOS7.0.xcconfig
+0 −5 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS8.0/AFNetworking-iOS8.0-dummy.m
+0 −9 OHHTTPStubs/Pods/Target Support Files/AFNetworking-iOS8.0/AFNetworking-iOS8.0.xcconfig
+5 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS/AFNetworking-tvOS-dummy.m
+8 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS/AFNetworking-tvOS-prefix.pch
+9 −0 OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS/AFNetworking-tvOS.xcconfig
+0 −5 OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS9.0/AFNetworking-tvOS9.0-dummy.m
+0 −9 OHHTTPStubs/Pods/Target Support Files/AFNetworking-tvOS9.0/AFNetworking-tvOS9.0.xcconfig
+0 −5 ...chability-Security-Serialization/AFNetworking.root-NSURLSession-Reachability-Security-Serialization-dummy.m
+0 −9 ...hability-Security-Serialization/AFNetworking.root-NSURLSession-Reachability-Security-Serialization.xcconfig
+3 −1 ... Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests-acknowledgements.plist
+5 −4 ... Support Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests.debug.xcconfig
+5 −4 ...upport Files/Pods-TestingPods-OHHTTPStubs Mac Tests/Pods-TestingPods-OHHTTPStubs Mac Tests.release.xcconfig
+3 −1 ...ods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests-acknowledgements.plist
+5 −4 ... Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig
+5 −4 ...iles/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.release.xcconfig
+3 −1 ...ods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests-acknowledgements.plist
+5 −4 ... Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig
+5 −4 ...iles/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests.release.xcconfig
+3 −1 ...s-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests-acknowledgements.plist
+5 −4 ...iles/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig
+5 −4 ...es/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig
+25 −4 OHHTTPStubs/Sources/OHHTTPStubs.m
+10 −0 OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift
+73 −17 OHHTTPStubs/UnitTests/Test Suites/NSURLSessionTests.m
+2 −2 OHHTTPStubs/UnitTests/Test Suites/SwiftHelpersTests.swift
+14 −29 README.md
2 changes: 1 addition & 1 deletion IPAPI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'IPAPI'
s.version = '1.3.0'
s.version = '2.1.0'
s.license = 'MIT'
s.summary = 'http://ip-api.com Geolocation API client written in Swift.'
s.homepage = 'https://github.com/arturgrigor/IPAPI'
Expand Down
16 changes: 11 additions & 5 deletions IPAPI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Artur Grigor";
TargetAttributes = {
FE576B211E0C99E5009D4C46 = {
Expand All @@ -341,21 +341,23 @@
};
FEDFDB3D1FA39F7A00607D1A = {
CreatedOnToolsVersion = 9.0.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
FEE454001E0BE8DB00D8E707 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = FEE453FB1E0BE8DB00D8E707 /* Build configuration list for PBXProject "IPAPI" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = FEE453F71E0BE8DB00D8E707;
productRefGroup = FEE454021E0BE8DB00D8E707 /* Products */;
Expand Down Expand Up @@ -589,6 +591,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -642,7 +645,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -654,6 +657,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -699,7 +703,7 @@
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -717,6 +721,7 @@
INFOPLIST_FILE = Sources/Info.plist;
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.1.0;
PRODUCT_BUNDLE_IDENTIFIER = "me.arturgrigor.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = IPAPI;
SKIP_INSTALL = YES;
Expand All @@ -734,6 +739,7 @@
INFOPLIST_FILE = Sources/Info.plist;
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.1.0;
PRODUCT_BUNDLE_IDENTIFIER = "me.arturgrigor.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = IPAPI;
SKIP_INSTALL = YES;
Expand Down
2 changes: 1 addition & 1 deletion IPAPI.xcodeproj/xcshareddata/xcschemes/IPAPI.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 - 2018 Artur Grigor
Copyright (c) 2016 - 2019 Artur Grigor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 18 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
// swift-tools-version:3.1
// swift-tools-version:5.0

import PackageDescription

let package = Package(
name: "IPAPI",
exclude: ["Sources/Info.plist", "Sources/IPAPI.h", "Tests", "Pods"]
platforms: [
.iOS(.v8),
.macOS(.v10_10),
.tvOS(.v9),
.watchOS(.v2)
],
products: [
.library(name: "IPAPI", targets: ["IPAPI"])
],
targets: [
.target(
name: "IPAPI",
path: "Sources",
exclude: ["Sources/Info.plist", "Sources/IPAPI.h", "Sources/Info.plist"]
)
],
swiftLanguageVersions: [.v5]
)
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![SwiftPM compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Build Status](https://travis-ci.org/arturgrigor/IPAPI.svg?branch=master)](https://travis-ci.org/arturgrigor/IPAPI)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/IPAPI.svg)](https://img.shields.io/cocoapods/v/IPAPI.svg)
Expand All @@ -11,8 +12,8 @@ http://ip-api.com Geolocation API client written in Swift.
## Requirements

- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 10.0+
- Swift 4.2+
- Xcode 10.2+
- Swift 5.1+

## Installation

Expand All @@ -30,7 +31,7 @@ $ brew install carthage
To integrate IPAPI into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "arturgrigor/IPAPI" ~> 1.3
github "arturgrigor/IPAPI" ~> 2.1
```

Run `carthage update` to build the framework and drag the built `IPAPI.framework` into your Xcode project.
Expand All @@ -53,7 +54,7 @@ platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
pod 'IPAPI', '~> 1.3'
pod 'IPAPI', '~> 2.1'
end
```

Expand All @@ -65,13 +66,13 @@ $ pod install

### Swift Package Manager

The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but IPAPI does support its use on supported platforms.
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.

Once you have your Swift package set up, adding IPAPI as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```swift
dependencies: [
.Package(url: "https://github.com/arturgrigor/IPAPI.git", majorVersion: 1)
.Package(url: "https://github.com/arturgrigor/IPAPI.git", majorVersion: 2)
]
```

Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
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>$(CURRENT_PROJECT_VERSION)</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit c8f8d71

Please sign in to comment.