Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 12 + iOS 14 + Swift 5.3 + associated Updates #1280

Merged
merged 19 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1a1e85f
(rebased)
designatednerd Jun 26, 2020
6fa0ee5
Update #file -> #filePath in File Finder
designatednerd Jun 26, 2020
2f0fa19
add warning about quoted include in framework header as suggested by …
designatednerd Jun 26, 2020
5251dfe
Add playground demoing mutations / queries / subscriptions [Xcode 12 …
designatednerd Jun 27, 2020
1760e61
point at the Circle 12.0 image and associated versions
designatednerd Jun 29, 2020
b2e2ebf
update macos SDK to 11.0
designatednerd Jun 29, 2020
a05ea3f
Use 10.16 sdk for macosx
designatednerd Jun 29, 2020
9d7a22f
use 13.5 as previous iOS version
designatednerd Jun 29, 2020
7eba72e
The user facing string is 11.0, whatever the underlying value is
designatednerd Jun 29, 2020
840af1a
apparently the 12.0 image doesn't believe in the iPhone Xs
designatednerd Jun 30, 2020
212466f
poke apollo core for Xcode 12
designatednerd Jul 8, 2020
3636ba0
add arm64 to valid macOS architectures to support Apple Silicon
designatednerd Jul 8, 2020
50cd340
Add SQLite setup playground page
designatednerd Jul 14, 2020
9ee6ff1
add note about sqlite file browser and/or kick the build
designatednerd Aug 4, 2020
4ca3610
Update macosx SDK
designatednerd Aug 6, 2020
319fbdd
fix #file -> #filePath that got borked in a rebase
designatednerd Aug 19, 2020
1ffd86a
remove unndecessary _ on a void function
designatednerd Aug 19, 2020
3523002
fix another #file -> #filePath
designatednerd Aug 19, 2020
10f05b9
Get rid of VALID_ARCHS setting since this is now covered by other set…
designatednerd Sep 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ version: 2.1
parameters:
xcode_version:
type: string
default: "11.6.0"
default: "12.0.0"
ios_current_version:
type: string
default: "13.6"
default: "14.0"
ios_previous_version:
type: string
default: "12.4"
default: "13.5"
ios_sdk:
type: string
default: "iphonesimulator13.6"
default: "iphonesimulator14.0"
macos_version: # The user-facing version string for macOS builds
type: string
default: "10.15"
default: "11.0"
macos_sdk: # The full SDK string to use for macOS builds
type: string
default: "macosx10.15"
default: "macosx11.0"
tvos_version: # The user-facing version string of tvOS builds
type: string
default: "13.4"
default: "14.0"
tvos_sdk:
type: string
default: "appletvsimulator13.4"
default: "appletvsimulator14.0"

commands:
common_test_steps:
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: ApolloSQLite
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: ApolloWebSocket
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
Expand Down
4 changes: 3 additions & 1 deletion Apollo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@
9BAEEC14234C132600808306 /* CLIExtractorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CLIExtractorTests.swift; sourceTree = "<group>"; };
9BAEEC16234C275600808306 /* ApolloSchemaTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloSchemaTests.swift; sourceTree = "<group>"; };
9BAEEC18234C297800808306 /* ApolloCodegenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloCodegenTests.swift; sourceTree = "<group>"; };
9BB1DAC624A66B2500396235 /* ApolloMacPlayground.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = ApolloMacPlayground.playground; path = Playgrounds/ApolloMacPlayground.playground; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
9BC2D9CE233C3531007BD083 /* Apollo-Target-ApolloCodegen.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-ApolloCodegen.xcconfig"; sourceTree = "<group>"; };
9BC2D9D1233C6DC0007BD083 /* Basher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Basher.swift; sourceTree = "<group>"; };
9BCF0CD923FC9CA50031D2A2 /* TestCacheProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCacheProvider.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1377,6 +1378,7 @@
9FC750461D2A532C00458D91 /* Apollo */ = {
isa = PBXGroup;
children = (
9BB1DAC624A66B2500396235 /* ApolloMacPlayground.playground */,
9FC750621D2A59F600458D91 /* ApolloClient.swift */,
9B708AAC2305884500604A11 /* ApolloClientProtocol.swift */,
9FC9A9D21E2FD48B0023C4D5 /* GraphQLError.swift */,
Expand Down Expand Up @@ -1898,7 +1900,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1130;
LastUpgradeCheck = 1130;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Apollo GraphQL";
TargetAttributes = {
9B2DFBB524E1FA0D00ED3AE6 = {
Expand Down
177 changes: 177 additions & 0 deletions Apollo.xcodeproj/xcshareddata/xcschemes/Apollo Playground.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FC750431D2A532C00458D91"
BuildableName = "Apollo.framework"
BlueprintName = "Apollo"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FCE2CF91E6C213D00E34457"
BuildableName = "StarWarsAPI.framework"
BlueprintName = "StarWarsAPI"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9B7BDA7C23FDE90400ACD198"
BuildableName = "ApolloWebSocket.framework"
BlueprintName = "ApolloWebSocket"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO"
codeCoverageEnabled = "YES"
onlyGenerateCoverageForSpecifiedTargets = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FC750431D2A532C00458D91"
BuildableName = "Apollo.framework"
BlueprintName = "Apollo"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "APOLLO_TEST_CACHE_PROVIDER"
value = "ApolloTestSupport.InMemoryTestCacheProvider"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<CodeCoverageTargets>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FC750431D2A532C00458D91"
BuildableName = "Apollo.framework"
BlueprintName = "Apollo"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</CodeCoverageTargets>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FC7504D1D2A532D00458D91"
BuildableName = "ApolloTests.xctest"
BlueprintName = "ApolloTests"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FA6ABBB1EC0A988000017BE"
BuildableName = "ApolloCacheDependentTests.xctest"
BlueprintName = "ApolloCacheDependentTests"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
<SkippedTests>
<Test
Identifier = "SQLiteFetchQueryTests">
</Test>
<Test
Identifier = "SQLiteLoadQueryFromStoreTests">
</Test>
<Test
Identifier = "SQLiteReadWriteFromStoreTests">
</Test>
<Test
Identifier = "SQLiteStarWarsServerAPQsGetMethodTests">
</Test>
<Test
Identifier = "SQLiteStarWarsServerAPQsTests">
</Test>
<Test
Identifier = "SQLiteStarWarsServerCachingRoundtripTests">
</Test>
<Test
Identifier = "SQLiteStarWarsServerTests">
</Test>
<Test
Identifier = "SQLiteWatchQueryTests">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FC750431D2A532C00458D91"
BuildableName = "Apollo.framework"
BlueprintName = "Apollo"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FC750431D2A532C00458D91"
BuildableName = "Apollo.framework"
BlueprintName = "Apollo"
ReferencedContainer = "container:Apollo.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion Apollo.xcodeproj/xcshareddata/xcschemes/Apollo.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 0 additions & 1 deletion Configuration/Apollo/Apollo-Target-ApolloCodegen.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ SDKROOT = macosx
SUPPORTED_PLATFORMS = macosx

ENABLE_BITCODE = NO
VALID_ARCHS = x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
INFOPLIST_FILE = Sources/ApolloCodegenLib/Info.plist
SUPPORTED_PLATFORMS = macosx
SDKROOT = macosx
VALID_ARCHS = x86_64
1 change: 1 addition & 0 deletions Configuration/Shared/Workspace-Debug.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ SWIFT_COMPILATION_MODE = singlefile
DEBUG_INFORMATION_FORMAT = dwarf

ENABLE_NS_ASSERTIONS = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES
1 change: 1 addition & 0 deletions Configuration/Shared/Workspace-Release.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ LLVM_LTO = YES
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym

ENABLE_NS_ASSERTIONS = NO
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES
3 changes: 0 additions & 3 deletions Configuration/Shared/Workspace-Universal-Framework.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ SUPPORTED_PLATFORMS = iphoneos iphonesimulator appletvsimulator appletvos watchs

// iOS-specific default settings
SDKROOT[sdk=iphone*] = iphoneos
VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
VALID_ARCHS[sdk=iphonesimulator*] = x86_64 i386
TARGETED_DEVICE_FAMILY[sdk=iphone*] = 1,2

// TV-specific default settings
Expand All @@ -19,7 +17,6 @@ TARGETED_DEVICE_FAMILY[sdk=watch*] = 4

// macOS-specific default settings
SDKROOT[sdk=macosx*] = macosx
VALID_ARCHS[sdk=macosx*] = x86_64
SUPPORTS_MACCATALYST = YES

// Enable Bitcode only for actual devices, not for macOS or simulators
Expand Down
31 changes: 31 additions & 0 deletions Playgrounds/ApolloMacPlayground.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Foundation
import Apollo
import StarWarsAPI
import PlaygroundSupport

/// Taking a query and working with its results

let url = URL(string: "http://localhost:8080/graphql")!
let client = ApolloClient(url: url)

// You can change the episode here if you want, or omit the episode to receive the default value.
let query = HeroDetailsQuery(episode: .empire)

client.fetch(query: query) { result in
switch result {
case .success(let graphQLResult):
if let errors = graphQLResult.errors {
print("GraphQL errors: \(errors)")
}

if let hero = graphQLResult.data?.hero {
print("Hero name: \(hero.name)")
}
case .failure(let error):
print("Network error: \(error)")
}

PlaygroundPage.current.finishExecution()
}

PlaygroundPage.current.needsIndefiniteExecution = true
Loading