Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 5d15e83

Browse files
authored
Merge pull request #310 from manicmaniac/support-apollo-0.37.x
Support Apollo 0.37.x
2 parents 9af5f30 + 1e19933 commit 5d15e83

4 files changed

Lines changed: 25 additions & 13 deletions

File tree

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@ jobs:
3838
fail-fast: false
3939
matrix:
4040
apollo:
41+
- 0.37.0
4142
- 0.36.0
4243
- 0.35.0
4344
- 0.34.1
4445
platform:
4546
- iOS
4647
- macOS
4748
include:
49+
- apollo: 0.37.0
50+
platform: iOS
51+
sdk: iphonesimulator
52+
xcode: '12'
53+
destination: platform=iOS Simulator,OS=14.0,name=iPhone 11
4854
- apollo: 0.36.0
4955
platform: iOS
5056
sdk: iphonesimulator
@@ -60,6 +66,11 @@ jobs:
6066
sdk: iphonesimulator
6167
xcode: '12'
6268
destination: platform=iOS Simulator,OS=14.0,name=iPhone 11
69+
- apollo: 0.37.0
70+
platform: macOS
71+
sdk: macosx
72+
xcode: '12'
73+
destination: platform=OS X,arch=x86_64
6374
- apollo: 0.36.0
6475
platform: macOS
6576
sdk: macosx

ApolloDeveloperKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ Pod::Spec.new do |spec|
1818
spec.resource = "Sources/ApolloDeveloperKit/Assets"
1919
spec.cocoapods_version = '>= 1.7.0'
2020
spec.swift_versions = ['5.0', '5.1', '5.2', '5.3']
21-
spec.dependency "Apollo", ">= 0.34.0", "< 0.37.0"
21+
spec.dependency "Apollo", ">= 0.34.0", "< 0.38.0"
2222
end

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Prerequisites
2525
-------------
2626

2727
- Xcode `>= 12.0`
28-
- [Apollo iOS](https://github.com/apollographql/apollo-ios) `>= 0.34.0`, `< 0.37.0`
28+
- [Apollo iOS](https://github.com/apollographql/apollo-ios) `>= 0.34.0`, `< 0.38.0`
2929
- [Apollo Client Devtools](https://www.apollographql.com/docs/react/development-testing/developer-tooling/#apollo-client-devtools)
3030

3131
Installation

Sources/ApolloDeveloperKit/JSON/JSONCocoaTypeConversions.swift

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ import Foundation
1616
* and when I use those utility extensions on them, `fatalError()` occurs because it doesn't conform to `JSONEncodable`.
1717
* So to avoid this problem, `ApolloDeveloperKit` have to prepare some more extensions for Cocoa types.
1818
*/
19+
protocol ExtendedJSONEncodable: JSONEncodable {}
1920

20-
extension NSString: JSONEncodable {
21+
extension NSString: ExtendedJSONEncodable {
2122
public var jsonValue: JSONValue {
2223
return (self as String).jsonValue
2324
}
2425
}
2526

26-
extension NSNumber: JSONEncodable {
27+
extension NSNumber: ExtendedJSONEncodable {
2728
public var jsonValue: JSONValue {
2829
switch CFGetTypeID(self) {
2930
case CFBooleanGetTypeID():
@@ -36,55 +37,55 @@ extension NSNumber: JSONEncodable {
3637
}
3738
}
3839

39-
extension NSDictionary: JSONEncodable {
40+
extension NSDictionary: ExtendedJSONEncodable {
4041
public var jsonValue: JSONValue {
4142
return (self as [NSObject: AnyObject]).jsonValue
4243
}
4344
}
4445

45-
extension NSArray: JSONEncodable {
46+
extension NSArray: ExtendedJSONEncodable {
4647
public var jsonValue: JSONValue {
4748
return (self as [AnyObject]).jsonValue
4849
}
4950
}
5051

51-
extension NSNull: JSONEncodable {
52+
extension NSNull: ExtendedJSONEncodable {
5253
public var jsonValue: JSONValue {
5354
return self
5455
}
5556
}
5657

57-
extension CFString: JSONEncodable {
58+
extension CFString: ExtendedJSONEncodable {
5859
public var jsonValue: JSONValue {
5960
return (self as NSString).jsonValue
6061
}
6162
}
6263

63-
extension CFNumber: JSONEncodable {
64+
extension CFNumber: ExtendedJSONEncodable {
6465
public var jsonValue: JSONValue {
6566
return (self as NSNumber).jsonValue
6667
}
6768
}
6869

69-
extension CFBoolean: JSONEncodable {
70+
extension CFBoolean: ExtendedJSONEncodable {
7071
public var jsonValue: JSONValue {
7172
return CFBooleanGetValue(self).jsonValue
7273
}
7374
}
7475

75-
extension CFDictionary: JSONEncodable {
76+
extension CFDictionary: ExtendedJSONEncodable {
7677
public var jsonValue: JSONValue {
7778
return (self as NSDictionary).jsonValue
7879
}
7980
}
8081

81-
extension CFArray: JSONEncodable {
82+
extension CFArray: ExtendedJSONEncodable {
8283
public var jsonValue: JSONValue {
8384
return (self as NSArray).jsonValue
8485
}
8586
}
8687

87-
extension CFNull: JSONEncodable {
88+
extension CFNull: ExtendedJSONEncodable {
8889
public var jsonValue: JSONValue {
8990
return self as NSNull
9091
}

0 commit comments

Comments
 (0)