├── screenshot.png ├── GitHub-GraphQL-API-Example-iOS.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved └── project.pbxproj ├── GitHub-GraphQL-API-Example-iOS ├── RepositoryDetails.graphql ├── AppDelegate.swift ├── RepositoriesViewController.graphql ├── RepositoryCell.swift ├── Info.plist ├── Base.lproj │ └── LaunchScreen.storyboard ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── RepositoriesViewController.swift ├── Main.storyboard └── API.swift ├── .gitignore ├── README.md └── LICENSE /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shingt/GitHub-GraphQL-API-Example-iOS/HEAD/screenshot.png -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/RepositoryDetails.graphql: -------------------------------------------------------------------------------- 1 | fragment RepositoryDetails on Repository { 2 | name 3 | owner { 4 | resourcePath 5 | } 6 | stargazers { 7 | totalCount 8 | } 9 | url 10 | } 11 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @UIApplicationMain 4 | final class AppDelegate: UIResponder, UIApplicationDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 9 | return true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/RepositoriesViewController.graphql: -------------------------------------------------------------------------------- 1 | query SearchRepositories($query: String!, $count: Int!) { 2 | search(query: $query, type: REPOSITORY, first: $count) { 3 | edges { 4 | node { 5 | ... on Repository { 6 | ...RepositoryDetails 7 | } 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Build generated 2 | build/ 3 | DerivedData/ 4 | 5 | ## Various settings 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | 16 | ## Other 17 | *.moved-aside 18 | *.xcuserstate 19 | .DS_Store 20 | 21 | ## Obj-C/Swift specific 22 | *.hmap 23 | *.ipa 24 | *.dSYM.zip 25 | *.dSYM 26 | 27 | ## Playgrounds 28 | timeline.xctimeline 29 | playground.xcworkspace 30 | 31 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/RepositoryCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | final class RepositoryCell: UITableViewCell { 4 | @IBOutlet private weak var nameLabel: UILabel! 5 | @IBOutlet private weak var urlLabel: UILabel! 6 | @IBOutlet private weak var stargazersCountLabel: UILabel! 7 | 8 | func configure(with repository: RepositoryDetails) { 9 | nameLabel.text = "\(repository.owner.resourcePath)/\(repository.name)" 10 | urlLabel.text = repository.url 11 | stargazersCountLabel.text = "Stars: \(repository.stargazers.totalCount)" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub-GraphQL-API-Example-iOS 2 | 3 | An example iOS app that uses [Apollo iOS](https://github.com/apollographql/apollo-ios) to hit GitHub GraphQL API. 4 | 5 | 6 | 7 | * Article (deprecated as it's for older version of Apollo) 8 | * https://shingt.com/blog/2017-04-02-graphql-on-ios-using-apollo/ 9 | 10 | ## Environments 11 | 12 | - Xcode 12.0.1 13 | - Swift 5.3 14 | 15 | ## How to start 16 | 17 | - Open `GitHub-GraphQL-API-Example-iOS.xcodeproj` 18 | - Replace `YOUR_TOKEN` in `RepositoriesViewController` with your private access token on GitHub and build! (Make sure not to commit your token.) 19 | 20 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "apollo-ios", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/apollographql/apollo-ios.git", 7 | "state" : { 8 | "revision" : "42646f765d22dac0f22bfff48590102195c76da4", 9 | "version" : "0.53.0" 10 | } 11 | }, 12 | { 13 | "identity" : "sqlite.swift", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/stephencelis/SQLite.swift.git", 16 | "state" : { 17 | "revision" : "4d543d811ee644fa4cc4bfa0be996b4dd6ba0f54", 18 | "version" : "0.13.3" 19 | } 20 | } 21 | ], 22 | "version" : 2 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Shinichi Goto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/RepositoriesViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Apollo 3 | 4 | private let token = "YOUR_TOKEN" 5 | 6 | final class TokenAddingInterceptor: ApolloInterceptor { 7 | func interceptAsync( 8 | chain: RequestChain, 9 | request: HTTPRequest, 10 | response: HTTPResponse?, 11 | completion: @escaping (Result, Error>) -> Void) { 12 | request.addHeader(name: "Authorization", value: "Bearer \(token)") 13 | chain.proceedAsync(request: request, response: response, completion: completion) 14 | } 15 | } 16 | 17 | final class NetworkInterceptorProvider: InterceptorProvider { 18 | private let client: URLSessionClient 19 | private let store: ApolloStore 20 | 21 | init(client: URLSessionClient, store: ApolloStore) { 22 | self.client = client 23 | self.store = store 24 | } 25 | 26 | func interceptors(for operation: Operation) -> [ApolloInterceptor] where Operation : GraphQLOperation { 27 | [ 28 | TokenAddingInterceptor(), 29 | NetworkFetchInterceptor(client: self.client), 30 | JSONResponseParsingInterceptor(cacheKeyForObject: self.store.cacheKeyForObject), 31 | ] 32 | } 33 | } 34 | 35 | final class RepositoriesViewController: UITableViewController { 36 | private var repositories: [SearchRepositoriesQuery.Data.Search.Edge.Node.AsRepository]? { 37 | didSet { 38 | tableView.reloadData() 39 | } 40 | } 41 | 42 | private lazy var apollo: ApolloClient = { 43 | let client = URLSessionClient() 44 | let cache = InMemoryNormalizedCache() 45 | let store = ApolloStore(cache: cache) 46 | let provider = NetworkInterceptorProvider(client: client, store: store) 47 | let url = URL(string: "https://api.github.com/graphql")! 48 | let transport = RequestChainNetworkTransport( 49 | interceptorProvider: provider, 50 | endpointURL: url 51 | ) 52 | return .init(networkTransport: transport, store: store) 53 | }() 54 | 55 | override func viewWillAppear(_ animated: Bool) { 56 | super.viewWillAppear(animated) 57 | 58 | let queryString = "GraphQL" 59 | navigationItem.title = "Query: \(queryString)" 60 | 61 | apollo.fetch(query: SearchRepositoriesQuery(query: queryString, count: 10), cachePolicy: .fetchIgnoringCacheData) { [weak self] result in 62 | switch result { 63 | case .success(let result): 64 | result.data?.search.edges?.forEach { edge in 65 | guard let repository = edge?.node?.asRepository?.fragments.repositoryDetails else { return } 66 | print("Name: \(repository.name)") 67 | print("Path: \(repository.url)") 68 | print("Owner: \(repository.owner.resourcePath)") 69 | print("Stars: \(repository.stargazers.totalCount)") 70 | print("\n") 71 | } 72 | 73 | self?.repositories = result.data?.search.edges?.compactMap { $0?.node?.asRepository } 74 | case .failure(let error): 75 | print("Error: \(error)") 76 | } 77 | } 78 | } 79 | 80 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 81 | return repositories?.count ?? 0 82 | } 83 | 84 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 85 | guard let cell = tableView.dequeueReusableCell(withIdentifier: "RepositoryCell", for: indexPath) as? RepositoryCell else { 86 | fatalError() 87 | } 88 | 89 | guard let repository = repositories?[indexPath.row] else { 90 | fatalError() 91 | } 92 | 93 | cell.configure(with: repository.fragments.repositoryDetails) 94 | return cell 95 | } 96 | 97 | override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 98 | return 54.0 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | 55 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS/API.swift: -------------------------------------------------------------------------------- 1 | // @generated 2 | // This file was automatically generated and should not be edited. 3 | 4 | import Apollo 5 | import Foundation 6 | 7 | public final class SearchRepositoriesQuery: GraphQLQuery { 8 | /// The raw GraphQL definition of this operation. 9 | public let operationDefinition: String = 10 | """ 11 | query SearchRepositories($query: String!, $count: Int!) { 12 | search(query: $query, type: REPOSITORY, first: $count) { 13 | __typename 14 | edges { 15 | __typename 16 | node { 17 | __typename 18 | ... on Repository { 19 | __typename 20 | ...RepositoryDetails 21 | } 22 | } 23 | } 24 | } 25 | } 26 | """ 27 | 28 | public let operationName: String = "SearchRepositories" 29 | 30 | public var queryDocument: String { 31 | var document: String = operationDefinition 32 | document.append("\n" + RepositoryDetails.fragmentDefinition) 33 | return document 34 | } 35 | 36 | public var query: String 37 | public var count: Int 38 | 39 | public init(query: String, count: Int) { 40 | self.query = query 41 | self.count = count 42 | } 43 | 44 | public var variables: GraphQLMap? { 45 | return ["query": query, "count": count] 46 | } 47 | 48 | public struct Data: GraphQLSelectionSet { 49 | public static let possibleTypes: [String] = ["Query"] 50 | 51 | public static var selections: [GraphQLSelection] { 52 | return [ 53 | GraphQLField("search", arguments: ["query": GraphQLVariable("query"), "type": "REPOSITORY", "first": GraphQLVariable("count")], type: .nonNull(.object(Search.selections))), 54 | ] 55 | } 56 | 57 | public private(set) var resultMap: ResultMap 58 | 59 | public init(unsafeResultMap: ResultMap) { 60 | self.resultMap = unsafeResultMap 61 | } 62 | 63 | public init(search: Search) { 64 | self.init(unsafeResultMap: ["__typename": "Query", "search": search.resultMap]) 65 | } 66 | 67 | /// Perform a search across resources. 68 | public var search: Search { 69 | get { 70 | return Search(unsafeResultMap: resultMap["search"]! as! ResultMap) 71 | } 72 | set { 73 | resultMap.updateValue(newValue.resultMap, forKey: "search") 74 | } 75 | } 76 | 77 | public struct Search: GraphQLSelectionSet { 78 | public static let possibleTypes: [String] = ["SearchResultItemConnection"] 79 | 80 | public static var selections: [GraphQLSelection] { 81 | return [ 82 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 83 | GraphQLField("edges", type: .list(.object(Edge.selections))), 84 | ] 85 | } 86 | 87 | public private(set) var resultMap: ResultMap 88 | 89 | public init(unsafeResultMap: ResultMap) { 90 | self.resultMap = unsafeResultMap 91 | } 92 | 93 | public init(edges: [Edge?]? = nil) { 94 | self.init(unsafeResultMap: ["__typename": "SearchResultItemConnection", "edges": edges.flatMap { (value: [Edge?]) -> [ResultMap?] in value.map { (value: Edge?) -> ResultMap? in value.flatMap { (value: Edge) -> ResultMap in value.resultMap } } }]) 95 | } 96 | 97 | public var __typename: String { 98 | get { 99 | return resultMap["__typename"]! as! String 100 | } 101 | set { 102 | resultMap.updateValue(newValue, forKey: "__typename") 103 | } 104 | } 105 | 106 | /// A list of edges. 107 | public var edges: [Edge?]? { 108 | get { 109 | return (resultMap["edges"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Edge?] in value.map { (value: ResultMap?) -> Edge? in value.flatMap { (value: ResultMap) -> Edge in Edge(unsafeResultMap: value) } } } 110 | } 111 | set { 112 | resultMap.updateValue(newValue.flatMap { (value: [Edge?]) -> [ResultMap?] in value.map { (value: Edge?) -> ResultMap? in value.flatMap { (value: Edge) -> ResultMap in value.resultMap } } }, forKey: "edges") 113 | } 114 | } 115 | 116 | public struct Edge: GraphQLSelectionSet { 117 | public static let possibleTypes: [String] = ["SearchResultItemEdge"] 118 | 119 | public static var selections: [GraphQLSelection] { 120 | return [ 121 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 122 | GraphQLField("node", type: .object(Node.selections)), 123 | ] 124 | } 125 | 126 | public private(set) var resultMap: ResultMap 127 | 128 | public init(unsafeResultMap: ResultMap) { 129 | self.resultMap = unsafeResultMap 130 | } 131 | 132 | public init(node: Node? = nil) { 133 | self.init(unsafeResultMap: ["__typename": "SearchResultItemEdge", "node": node.flatMap { (value: Node) -> ResultMap in value.resultMap }]) 134 | } 135 | 136 | public var __typename: String { 137 | get { 138 | return resultMap["__typename"]! as! String 139 | } 140 | set { 141 | resultMap.updateValue(newValue, forKey: "__typename") 142 | } 143 | } 144 | 145 | /// The item at the end of the edge. 146 | public var node: Node? { 147 | get { 148 | return (resultMap["node"] as? ResultMap).flatMap { Node(unsafeResultMap: $0) } 149 | } 150 | set { 151 | resultMap.updateValue(newValue?.resultMap, forKey: "node") 152 | } 153 | } 154 | 155 | public struct Node: GraphQLSelectionSet { 156 | public static let possibleTypes: [String] = ["App", "Issue", "MarketplaceListing", "Organization", "PullRequest", "Repository", "User"] 157 | 158 | public static var selections: [GraphQLSelection] { 159 | return [ 160 | GraphQLTypeCase( 161 | variants: ["Repository": AsRepository.selections], 162 | default: [ 163 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 164 | ] 165 | ) 166 | ] 167 | } 168 | 169 | public private(set) var resultMap: ResultMap 170 | 171 | public init(unsafeResultMap: ResultMap) { 172 | self.resultMap = unsafeResultMap 173 | } 174 | 175 | public static func makeApp() -> Node { 176 | return Node(unsafeResultMap: ["__typename": "App"]) 177 | } 178 | 179 | public static func makeIssue() -> Node { 180 | return Node(unsafeResultMap: ["__typename": "Issue"]) 181 | } 182 | 183 | public static func makeMarketplaceListing() -> Node { 184 | return Node(unsafeResultMap: ["__typename": "MarketplaceListing"]) 185 | } 186 | 187 | public static func makeOrganization() -> Node { 188 | return Node(unsafeResultMap: ["__typename": "Organization"]) 189 | } 190 | 191 | public static func makePullRequest() -> Node { 192 | return Node(unsafeResultMap: ["__typename": "PullRequest"]) 193 | } 194 | 195 | public static func makeUser() -> Node { 196 | return Node(unsafeResultMap: ["__typename": "User"]) 197 | } 198 | 199 | public var __typename: String { 200 | get { 201 | return resultMap["__typename"]! as! String 202 | } 203 | set { 204 | resultMap.updateValue(newValue, forKey: "__typename") 205 | } 206 | } 207 | 208 | public var asRepository: AsRepository? { 209 | get { 210 | if !AsRepository.possibleTypes.contains(__typename) { return nil } 211 | return AsRepository(unsafeResultMap: resultMap) 212 | } 213 | set { 214 | guard let newValue = newValue else { return } 215 | resultMap = newValue.resultMap 216 | } 217 | } 218 | 219 | public struct AsRepository: GraphQLSelectionSet { 220 | public static let possibleTypes: [String] = ["Repository"] 221 | 222 | public static var selections: [GraphQLSelection] { 223 | return [ 224 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 225 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 226 | GraphQLFragmentSpread(RepositoryDetails.self), 227 | ] 228 | } 229 | 230 | public private(set) var resultMap: ResultMap 231 | 232 | public init(unsafeResultMap: ResultMap) { 233 | self.resultMap = unsafeResultMap 234 | } 235 | 236 | public var __typename: String { 237 | get { 238 | return resultMap["__typename"]! as! String 239 | } 240 | set { 241 | resultMap.updateValue(newValue, forKey: "__typename") 242 | } 243 | } 244 | 245 | public var fragments: Fragments { 246 | get { 247 | return Fragments(unsafeResultMap: resultMap) 248 | } 249 | set { 250 | resultMap += newValue.resultMap 251 | } 252 | } 253 | 254 | public struct Fragments { 255 | public private(set) var resultMap: ResultMap 256 | 257 | public init(unsafeResultMap: ResultMap) { 258 | self.resultMap = unsafeResultMap 259 | } 260 | 261 | public var repositoryDetails: RepositoryDetails { 262 | get { 263 | return RepositoryDetails(unsafeResultMap: resultMap) 264 | } 265 | set { 266 | resultMap += newValue.resultMap 267 | } 268 | } 269 | } 270 | } 271 | } 272 | } 273 | } 274 | } 275 | } 276 | 277 | public struct RepositoryDetails: GraphQLFragment { 278 | /// The raw GraphQL definition of this fragment. 279 | public static let fragmentDefinition: String = 280 | """ 281 | fragment RepositoryDetails on Repository { 282 | __typename 283 | name 284 | owner { 285 | __typename 286 | resourcePath 287 | } 288 | stargazers { 289 | __typename 290 | totalCount 291 | } 292 | url 293 | } 294 | """ 295 | 296 | public static let possibleTypes: [String] = ["Repository"] 297 | 298 | public static var selections: [GraphQLSelection] { 299 | return [ 300 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 301 | GraphQLField("name", type: .nonNull(.scalar(String.self))), 302 | GraphQLField("owner", type: .nonNull(.object(Owner.selections))), 303 | GraphQLField("stargazers", type: .nonNull(.object(Stargazer.selections))), 304 | GraphQLField("url", type: .nonNull(.scalar(String.self))), 305 | ] 306 | } 307 | 308 | public private(set) var resultMap: ResultMap 309 | 310 | public init(unsafeResultMap: ResultMap) { 311 | self.resultMap = unsafeResultMap 312 | } 313 | 314 | public init(name: String, owner: Owner, stargazers: Stargazer, url: String) { 315 | self.init(unsafeResultMap: ["__typename": "Repository", "name": name, "owner": owner.resultMap, "stargazers": stargazers.resultMap, "url": url]) 316 | } 317 | 318 | public var __typename: String { 319 | get { 320 | return resultMap["__typename"]! as! String 321 | } 322 | set { 323 | resultMap.updateValue(newValue, forKey: "__typename") 324 | } 325 | } 326 | 327 | /// The name of the repository. 328 | public var name: String { 329 | get { 330 | return resultMap["name"]! as! String 331 | } 332 | set { 333 | resultMap.updateValue(newValue, forKey: "name") 334 | } 335 | } 336 | 337 | /// The User owner of the repository. 338 | public var owner: Owner { 339 | get { 340 | return Owner(unsafeResultMap: resultMap["owner"]! as! ResultMap) 341 | } 342 | set { 343 | resultMap.updateValue(newValue.resultMap, forKey: "owner") 344 | } 345 | } 346 | 347 | /// A list of users who have starred this starrable. 348 | public var stargazers: Stargazer { 349 | get { 350 | return Stargazer(unsafeResultMap: resultMap["stargazers"]! as! ResultMap) 351 | } 352 | set { 353 | resultMap.updateValue(newValue.resultMap, forKey: "stargazers") 354 | } 355 | } 356 | 357 | /// The HTTP URL for this repository 358 | public var url: String { 359 | get { 360 | return resultMap["url"]! as! String 361 | } 362 | set { 363 | resultMap.updateValue(newValue, forKey: "url") 364 | } 365 | } 366 | 367 | public struct Owner: GraphQLSelectionSet { 368 | public static let possibleTypes: [String] = ["Organization", "User"] 369 | 370 | public static var selections: [GraphQLSelection] { 371 | return [ 372 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 373 | GraphQLField("resourcePath", type: .nonNull(.scalar(String.self))), 374 | ] 375 | } 376 | 377 | public private(set) var resultMap: ResultMap 378 | 379 | public init(unsafeResultMap: ResultMap) { 380 | self.resultMap = unsafeResultMap 381 | } 382 | 383 | public static func makeOrganization(resourcePath: String) -> Owner { 384 | return Owner(unsafeResultMap: ["__typename": "Organization", "resourcePath": resourcePath]) 385 | } 386 | 387 | public static func makeUser(resourcePath: String) -> Owner { 388 | return Owner(unsafeResultMap: ["__typename": "User", "resourcePath": resourcePath]) 389 | } 390 | 391 | public var __typename: String { 392 | get { 393 | return resultMap["__typename"]! as! String 394 | } 395 | set { 396 | resultMap.updateValue(newValue, forKey: "__typename") 397 | } 398 | } 399 | 400 | /// The HTTP URL for the owner. 401 | public var resourcePath: String { 402 | get { 403 | return resultMap["resourcePath"]! as! String 404 | } 405 | set { 406 | resultMap.updateValue(newValue, forKey: "resourcePath") 407 | } 408 | } 409 | } 410 | 411 | public struct Stargazer: GraphQLSelectionSet { 412 | public static let possibleTypes: [String] = ["StargazerConnection"] 413 | 414 | public static var selections: [GraphQLSelection] { 415 | return [ 416 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 417 | GraphQLField("totalCount", type: .nonNull(.scalar(Int.self))), 418 | ] 419 | } 420 | 421 | public private(set) var resultMap: ResultMap 422 | 423 | public init(unsafeResultMap: ResultMap) { 424 | self.resultMap = unsafeResultMap 425 | } 426 | 427 | public init(totalCount: Int) { 428 | self.init(unsafeResultMap: ["__typename": "StargazerConnection", "totalCount": totalCount]) 429 | } 430 | 431 | public var __typename: String { 432 | get { 433 | return resultMap["__typename"]! as! String 434 | } 435 | set { 436 | resultMap.updateValue(newValue, forKey: "__typename") 437 | } 438 | } 439 | 440 | /// Identifies the total count of items in the connection. 441 | public var totalCount: Int { 442 | get { 443 | return resultMap["totalCount"]! as! Int 444 | } 445 | set { 446 | resultMap.updateValue(newValue, forKey: "totalCount") 447 | } 448 | } 449 | } 450 | } 451 | -------------------------------------------------------------------------------- /GitHub-GraphQL-API-Example-iOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 120103741DFBE26E00E8128E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120103731DFBE26E00E8128E /* AppDelegate.swift */; }; 11 | 120103761DFBE26E00E8128E /* RepositoriesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120103751DFBE26E00E8128E /* RepositoriesViewController.swift */; }; 12 | 1201037B1DFBE26E00E8128E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1201037A1DFBE26E00E8128E /* Assets.xcassets */; }; 13 | 1201037E1DFBE26E00E8128E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1201037C1DFBE26E00E8128E /* LaunchScreen.storyboard */; }; 14 | 1201038B1DFBF28200E8128E /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1201038A1DFBF28200E8128E /* API.swift */; }; 15 | 12A3242C1DFE56EC00D905E7 /* RepositoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A3242B1DFE56EC00D905E7 /* RepositoryCell.swift */; }; 16 | 12A3242E1DFF499800D905E7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12A3242D1DFF499800D905E7 /* Main.storyboard */; }; 17 | 12A324301E0215E400D905E7 /* RepositoryDetails.graphql in Resources */ = {isa = PBXBuildFile; fileRef = 12A3242F1E0215E400D905E7 /* RepositoryDetails.graphql */; }; 18 | 12F01AA41DFD05CD00EB0547 /* RepositoriesViewController.graphql in Resources */ = {isa = PBXBuildFile; fileRef = 12F01AA31DFD05CD00EB0547 /* RepositoriesViewController.graphql */; }; 19 | DDF8A0B224D643AB0065A795 /* Apollo in Frameworks */ = {isa = PBXBuildFile; productRef = DDF8A0B124D643AB0065A795 /* Apollo */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 120103701DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "GitHub-GraphQL-API-Example-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 120103731DFBE26E00E8128E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 25 | 120103751DFBE26E00E8128E /* RepositoriesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepositoriesViewController.swift; sourceTree = ""; }; 26 | 1201037A1DFBE26E00E8128E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | 1201037D1DFBE26E00E8128E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 28 | 1201037F1DFBE26E00E8128E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 1201038A1DFBF28200E8128E /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; }; 30 | 12A3242B1DFE56EC00D905E7 /* RepositoryCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RepositoryCell.swift; sourceTree = ""; }; 31 | 12A3242D1DFF499800D905E7 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 32 | 12A3242F1E0215E400D905E7 /* RepositoryDetails.graphql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RepositoryDetails.graphql; sourceTree = ""; }; 33 | 12F01AA31DFD05CD00EB0547 /* RepositoriesViewController.graphql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RepositoriesViewController.graphql; sourceTree = ""; }; 34 | /* End PBXFileReference section */ 35 | 36 | /* Begin PBXFrameworksBuildPhase section */ 37 | 1201036D1DFBE26E00E8128E /* Frameworks */ = { 38 | isa = PBXFrameworksBuildPhase; 39 | buildActionMask = 2147483647; 40 | files = ( 41 | DDF8A0B224D643AB0065A795 /* Apollo in Frameworks */, 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | 120103671DFBE26E00E8128E = { 49 | isa = PBXGroup; 50 | children = ( 51 | 120103721DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS */, 52 | 120103711DFBE26E00E8128E /* Products */, 53 | 120103851DFBF0AD00E8128E /* Frameworks */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 120103711DFBE26E00E8128E /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 120103701DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS.app */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 120103721DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 120103731DFBE26E00E8128E /* AppDelegate.swift */, 69 | 120103751DFBE26E00E8128E /* RepositoriesViewController.swift */, 70 | 12A3242B1DFE56EC00D905E7 /* RepositoryCell.swift */, 71 | 1201038A1DFBF28200E8128E /* API.swift */, 72 | 12A3242D1DFF499800D905E7 /* Main.storyboard */, 73 | 12F01AA31DFD05CD00EB0547 /* RepositoriesViewController.graphql */, 74 | 12A3242F1E0215E400D905E7 /* RepositoryDetails.graphql */, 75 | 1201037A1DFBE26E00E8128E /* Assets.xcassets */, 76 | 1201037C1DFBE26E00E8128E /* LaunchScreen.storyboard */, 77 | 1201037F1DFBE26E00E8128E /* Info.plist */, 78 | ); 79 | path = "GitHub-GraphQL-API-Example-iOS"; 80 | sourceTree = ""; 81 | }; 82 | 120103851DFBF0AD00E8128E /* Frameworks */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | ); 86 | name = Frameworks; 87 | sourceTree = ""; 88 | }; 89 | /* End PBXGroup section */ 90 | 91 | /* Begin PBXNativeTarget section */ 92 | 1201036F1DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS */ = { 93 | isa = PBXNativeTarget; 94 | buildConfigurationList = 120103821DFBE26E00E8128E /* Build configuration list for PBXNativeTarget "GitHub-GraphQL-API-Example-iOS" */; 95 | buildPhases = ( 96 | 120103891DFBF22000E8128E /* Generate Apollo GraphQL API */, 97 | 1201036C1DFBE26E00E8128E /* Sources */, 98 | 1201036D1DFBE26E00E8128E /* Frameworks */, 99 | 1201036E1DFBE26E00E8128E /* Resources */, 100 | 120103881DFBF0C900E8128E /* ShellScript */, 101 | ); 102 | buildRules = ( 103 | ); 104 | dependencies = ( 105 | ); 106 | name = "GitHub-GraphQL-API-Example-iOS"; 107 | packageProductDependencies = ( 108 | DDF8A0B124D643AB0065A795 /* Apollo */, 109 | ); 110 | productName = "GitHub-GraphQL-API-Example-iOS"; 111 | productReference = 120103701DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | 120103681DFBE26E00E8128E /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 0810; 121 | LastUpgradeCheck = 1200; 122 | ORGANIZATIONNAME = shingt; 123 | TargetAttributes = { 124 | 1201036F1DFBE26E00E8128E = { 125 | CreatedOnToolsVersion = 8.1; 126 | DevelopmentTeam = 9527BZ5WE5; 127 | ProvisioningStyle = Automatic; 128 | }; 129 | }; 130 | }; 131 | buildConfigurationList = 1201036B1DFBE26E00E8128E /* Build configuration list for PBXProject "GitHub-GraphQL-API-Example-iOS" */; 132 | compatibilityVersion = "Xcode 3.2"; 133 | developmentRegion = en; 134 | hasScannedForEncodings = 0; 135 | knownRegions = ( 136 | en, 137 | Base, 138 | ); 139 | mainGroup = 120103671DFBE26E00E8128E; 140 | packageReferences = ( 141 | DDF8A0B024D643AB0065A795 /* XCRemoteSwiftPackageReference "apollo-ios" */, 142 | ); 143 | productRefGroup = 120103711DFBE26E00E8128E /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | 1201036F1DFBE26E00E8128E /* GitHub-GraphQL-API-Example-iOS */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | 1201036E1DFBE26E00E8128E /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | 1201037E1DFBE26E00E8128E /* LaunchScreen.storyboard in Resources */, 158 | 1201037B1DFBE26E00E8128E /* Assets.xcassets in Resources */, 159 | 12F01AA41DFD05CD00EB0547 /* RepositoriesViewController.graphql in Resources */, 160 | 12A3242E1DFF499800D905E7 /* Main.storyboard in Resources */, 161 | 12A324301E0215E400D905E7 /* RepositoryDetails.graphql in Resources */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXResourcesBuildPhase section */ 166 | 167 | /* Begin PBXShellScriptBuildPhase section */ 168 | 120103881DFBF0C900E8128E /* ShellScript */ = { 169 | isa = PBXShellScriptBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | ); 173 | inputPaths = ( 174 | ); 175 | outputPaths = ( 176 | ); 177 | runOnlyForDeploymentPostprocessing = 0; 178 | shellPath = /bin/sh; 179 | shellScript = " 180 | "; 181 | }; 182 | 120103891DFBF22000E8128E /* Generate Apollo GraphQL API */ = { 183 | isa = PBXShellScriptBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | ); 187 | inputPaths = ( 188 | ); 189 | name = "Generate Apollo GraphQL API"; 190 | outputPaths = ( 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | shellPath = /bin/sh; 194 | shellScript = "# Go to the build root and search up the chain to find the Derived Data Path where the source packages are checked out.\nDERIVED_DATA_CANDIDATE=\"${BUILD_ROOT}\"\n\nwhile ! [ -d \"${DERIVED_DATA_CANDIDATE}/SourcePackages\" ]; do\n if [ \"${DERIVED_DATA_CANDIDATE}\" = / ]; then\n echo >&2 \"error: Unable to locate SourcePackages directory from BUILD_ROOT: '${BUILD_ROOT}'\"\n exit 1\n fi\n\n DERIVED_DATA_CANDIDATE=\"$(dirname \"${DERIVED_DATA_CANDIDATE}\")\"\ndone\n\n# Grab a reference to the directory where scripts are checked out\nSCRIPT_PATH=\"${DERIVED_DATA_CANDIDATE}/SourcePackages/checkouts/apollo-ios/scripts\"\n\nif [ -z \"${SCRIPT_PATH}\" ]; then\n echo >&2 \"error: Couldn't find the CLI script in your checked out SPM packages; make sure to add the framework to your project.\"\n exit 1\nfi\n\ncd \"${SRCROOT}/${TARGET_NAME}\"\n\"${SCRIPT_PATH}\"/run-bundled-codegen.sh codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile=\"schema.json\" API.swift\n"; 195 | }; 196 | /* End PBXShellScriptBuildPhase section */ 197 | 198 | /* Begin PBXSourcesBuildPhase section */ 199 | 1201036C1DFBE26E00E8128E /* Sources */ = { 200 | isa = PBXSourcesBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | 120103761DFBE26E00E8128E /* RepositoriesViewController.swift in Sources */, 204 | 1201038B1DFBF28200E8128E /* API.swift in Sources */, 205 | 120103741DFBE26E00E8128E /* AppDelegate.swift in Sources */, 206 | 12A3242C1DFE56EC00D905E7 /* RepositoryCell.swift in Sources */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | /* End PBXSourcesBuildPhase section */ 211 | 212 | /* Begin PBXVariantGroup section */ 213 | 1201037C1DFBE26E00E8128E /* LaunchScreen.storyboard */ = { 214 | isa = PBXVariantGroup; 215 | children = ( 216 | 1201037D1DFBE26E00E8128E /* Base */, 217 | ); 218 | name = LaunchScreen.storyboard; 219 | sourceTree = ""; 220 | }; 221 | /* End PBXVariantGroup section */ 222 | 223 | /* Begin XCBuildConfiguration section */ 224 | 120103801DFBE26E00E8128E /* Debug */ = { 225 | isa = XCBuildConfiguration; 226 | buildSettings = { 227 | ALWAYS_SEARCH_USER_PATHS = NO; 228 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 229 | CLANG_ANALYZER_NONNULL = YES; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 235 | CLANG_WARN_BOOL_CONVERSION = YES; 236 | CLANG_WARN_COMMA = YES; 237 | CLANG_WARN_CONSTANT_CONVERSION = YES; 238 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 239 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 240 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 241 | CLANG_WARN_EMPTY_BODY = YES; 242 | CLANG_WARN_ENUM_CONVERSION = YES; 243 | CLANG_WARN_INFINITE_RECURSION = YES; 244 | CLANG_WARN_INT_CONVERSION = YES; 245 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 246 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 247 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 248 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 249 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 250 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 251 | CLANG_WARN_STRICT_PROTOTYPES = YES; 252 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 253 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 254 | CLANG_WARN_UNREACHABLE_CODE = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | DEBUG_INFORMATION_FORMAT = dwarf; 259 | ENABLE_STRICT_OBJC_MSGSEND = YES; 260 | ENABLE_TESTABILITY = YES; 261 | GCC_C_LANGUAGE_STANDARD = gnu99; 262 | GCC_DYNAMIC_NO_PIC = NO; 263 | GCC_NO_COMMON_BLOCKS = YES; 264 | GCC_OPTIMIZATION_LEVEL = 0; 265 | GCC_PREPROCESSOR_DEFINITIONS = ( 266 | "DEBUG=1", 267 | "$(inherited)", 268 | ); 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 276 | MTL_ENABLE_DEBUG_INFO = YES; 277 | ONLY_ACTIVE_ARCH = YES; 278 | SDKROOT = iphoneos; 279 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 280 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 281 | SWIFT_VERSION = 4.0; 282 | TARGETED_DEVICE_FAMILY = "1,2"; 283 | }; 284 | name = Debug; 285 | }; 286 | 120103811DFBE26E00E8128E /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 291 | CLANG_ANALYZER_NONNULL = YES; 292 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 293 | CLANG_CXX_LIBRARY = "libc++"; 294 | CLANG_ENABLE_MODULES = YES; 295 | CLANG_ENABLE_OBJC_ARC = YES; 296 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 297 | CLANG_WARN_BOOL_CONVERSION = YES; 298 | CLANG_WARN_COMMA = YES; 299 | CLANG_WARN_CONSTANT_CONVERSION = YES; 300 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 301 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 302 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 303 | CLANG_WARN_EMPTY_BODY = YES; 304 | CLANG_WARN_ENUM_CONVERSION = YES; 305 | CLANG_WARN_INFINITE_RECURSION = YES; 306 | CLANG_WARN_INT_CONVERSION = YES; 307 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 308 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 309 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 310 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 311 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 312 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 313 | CLANG_WARN_STRICT_PROTOTYPES = YES; 314 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 315 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 316 | CLANG_WARN_UNREACHABLE_CODE = YES; 317 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 318 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 319 | COPY_PHASE_STRIP = NO; 320 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 321 | ENABLE_NS_ASSERTIONS = NO; 322 | ENABLE_STRICT_OBJC_MSGSEND = YES; 323 | GCC_C_LANGUAGE_STANDARD = gnu99; 324 | GCC_NO_COMMON_BLOCKS = YES; 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 332 | MTL_ENABLE_DEBUG_INFO = NO; 333 | SDKROOT = iphoneos; 334 | SWIFT_COMPILATION_MODE = wholemodule; 335 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 336 | SWIFT_VERSION = 4.0; 337 | TARGETED_DEVICE_FAMILY = "1,2"; 338 | VALIDATE_PRODUCT = YES; 339 | }; 340 | name = Release; 341 | }; 342 | 120103831DFBE26E00E8128E /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 346 | DEVELOPMENT_TEAM = 9527BZ5WE5; 347 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 348 | INFOPLIST_FILE = "GitHub-GraphQL-API-Example-iOS/Info.plist"; 349 | LD_RUNPATH_SEARCH_PATHS = ( 350 | "$(inherited)", 351 | "@executable_path/Frameworks", 352 | ); 353 | PRODUCT_BUNDLE_IDENTIFIER = "com.shingt.GitHub-GraphQL-API-Example-iOS"; 354 | PRODUCT_NAME = "$(TARGET_NAME)"; 355 | SWIFT_VERSION = 5.0; 356 | }; 357 | name = Debug; 358 | }; 359 | 120103841DFBE26E00E8128E /* Release */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 363 | DEVELOPMENT_TEAM = 9527BZ5WE5; 364 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 365 | INFOPLIST_FILE = "GitHub-GraphQL-API-Example-iOS/Info.plist"; 366 | LD_RUNPATH_SEARCH_PATHS = ( 367 | "$(inherited)", 368 | "@executable_path/Frameworks", 369 | ); 370 | PRODUCT_BUNDLE_IDENTIFIER = "com.shingt.GitHub-GraphQL-API-Example-iOS"; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | SWIFT_VERSION = 5.0; 373 | }; 374 | name = Release; 375 | }; 376 | /* End XCBuildConfiguration section */ 377 | 378 | /* Begin XCConfigurationList section */ 379 | 1201036B1DFBE26E00E8128E /* Build configuration list for PBXProject "GitHub-GraphQL-API-Example-iOS" */ = { 380 | isa = XCConfigurationList; 381 | buildConfigurations = ( 382 | 120103801DFBE26E00E8128E /* Debug */, 383 | 120103811DFBE26E00E8128E /* Release */, 384 | ); 385 | defaultConfigurationIsVisible = 0; 386 | defaultConfigurationName = Release; 387 | }; 388 | 120103821DFBE26E00E8128E /* Build configuration list for PBXNativeTarget "GitHub-GraphQL-API-Example-iOS" */ = { 389 | isa = XCConfigurationList; 390 | buildConfigurations = ( 391 | 120103831DFBE26E00E8128E /* Debug */, 392 | 120103841DFBE26E00E8128E /* Release */, 393 | ); 394 | defaultConfigurationIsVisible = 0; 395 | defaultConfigurationName = Release; 396 | }; 397 | /* End XCConfigurationList section */ 398 | 399 | /* Begin XCRemoteSwiftPackageReference section */ 400 | DDF8A0B024D643AB0065A795 /* XCRemoteSwiftPackageReference "apollo-ios" */ = { 401 | isa = XCRemoteSwiftPackageReference; 402 | repositoryURL = "https://github.com/apollographql/apollo-ios.git"; 403 | requirement = { 404 | kind = upToNextMinorVersion; 405 | minimumVersion = 0.53.0; 406 | }; 407 | }; 408 | /* End XCRemoteSwiftPackageReference section */ 409 | 410 | /* Begin XCSwiftPackageProductDependency section */ 411 | DDF8A0B124D643AB0065A795 /* Apollo */ = { 412 | isa = XCSwiftPackageProductDependency; 413 | package = DDF8A0B024D643AB0065A795 /* XCRemoteSwiftPackageReference "apollo-ios" */; 414 | productName = Apollo; 415 | }; 416 | /* End XCSwiftPackageProductDependency section */ 417 | }; 418 | rootObject = 120103681DFBE26E00E8128E /* Project object */; 419 | } 420 | --------------------------------------------------------------------------------