Add SPM local package adds folder rather than package

We have a macOS and iOS app using Apollo, both communicate to the same backend. We’ve successfully upgraded to Apollo 1.x in the Mac app using the Swift Package Manager approach, but we’ve run up against an issue in trying to do the same thing with the iOS app. Can you help us out? Thanks! This is what we’ve done:

  1. Add the graphqls file from Apollo Studio and the operations file (the files are the exact same for both apps for now)
  2. Add the Apollo dependency to the project via SPM (version 1.0.6)
  3. Install the CLI by control-clicking the project in Xcode
  4. Run ./apollo-ios-cli init --schema-name MyAppAPI --module-type swiftPackageManager
  5. Run ./apollo-ios-cli generate to create a MyAppAPI folder containing a Package.swift file and Sources folder
  6. Choose File > Add Packages > Add Local and select MyAppAPI then select the project in the Add to project dropdown
    At this point, the macOS project shows MyAppAPI with a brown package icon in the sidebar. But in the iOS project, MyAppAPI has a blue folder icon.
  7. Add the module to each target via Frameworks, Libraries, and Embedded Content (we have two app targets because this is a white-labeled app)
    The macOS project shows the MyAppAPI brown package in the list within Workspace and it has a MyAppAPI library within it and we were able to add that without issue, but the iOS project does not show MyAppAPI in this list so we cannot add it - the Workspace only contains Pods (we use CocoaPods to install other dependencies that don’t support SPM).

Seems this is an Xcode bug. Quitting and relaunching it fixed it.

Just to follow up on this for anyone else who comes along, there are more details in this issue.Tthe workaround is just to manually re-resolve package versions, which is easiest with a quit and relaunch :upside_down_face:

Sorry you hit that @jordanh , grrrr XCode