HomeiOS DevelopmentiOS/Xcode 14, Apollo Improve from 0.40.0 to 1.0.7 - Swift Package deal...

iOS/Xcode 14, Apollo Improve from 0.40.0 to 1.0.7 – Swift Package deal Supervisor


I’ve an current challenge utilizing an previous Apollo construct(0.4.0) w/cocoapods and am making an attempt to improve to 1.0.7. I adopted all of the steps right here:

https://www.apollographql.com/docs/ios/migrations/1.0/#breaking-changes

utilizing the ‘SPM With Xcode challenge’ arrange that’s outlined in Step 2.

When putting in the bundle by way of SPM (i chosen, Apollo, apollo-ios-cli, Apollo-Websocket) within the checklist of choices obtainable.

I used to be in a position to then run the command:

./apollo-ios-cli init –schema-name Schemas –module-type embeddedInTarget –target-name MyAppName

which gave me the apollo-codegen-config.json file with the next contents:

{
  "schemaName" : "Schemas",
  "enter" : {
    "operationSearchPaths" : [
      "**/*.graphql"
    ],
    "schemaSearchPaths" : [
      "MyAppName/schema.json"
    ]
  },
  "output" : {
    "testMocks" : {
      "none" : {
      }
    },
    "schemaTypes" : {
      "path" : "./Schemas",
      "moduleType" : {
        "embeddedInTarget" : {
          "title" : "MyAppName"
        }
      }
    },
    "operations" : {
      "inSchemaModule" : {
      }
    }
  }
}

the place schema.json is the already constructed schema file that was already within the challenge.

Subsequent up is the command:

/apollo-ios-cli generate

which now creates for me my new Schemas listing with all my new queries, mutations, and many others in it. In the meantime i needed to take away the previous challenge Apollo folders, which at the moment are out of date. (please see screenshot for Venture listing).

I get a whole lot of errors associated to ApolloCodeGenLib (however I do know that’s alleged to solely work for the Mac). I’m not certain why it was a part of the Apollo SPM bundle, when i did not choose it in Xcode, when putting in it).

Has anybody efficiently upgraded to Apollo 1.0.7 inside the iOS/Xcode setting? All of the movies and tutorials on-line re: this topic is utilizing an older Apollo model. enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments