Docs
Launch GraphOS Studio

Using Apollo as an XCFramework


If you need to use and the code generation output as an XCFramework, this page will give a high level overview of how to do so, as well as collect some tips on things you may encounter that have been reported by the community.

Creating the XCFramework

Apollo iOS

In order to use as an XCFramework, we provide a apollo-ios-xcframework repository that can generate XCFrameworks from the code including the necessary commands. This can be used as is or as a starting point for you to customize further for your needs.

Code Generation Output

You can also use the output from code generation as an XCFramework, you will need to configure this setup yourself. You can use the code generation test project as an example/starting point for this.

Tips

Enum @unknown case

For enums in and code generation output, you should implement the @unknown case anywhere you are using the enumerations. For more information on @unknown see the Swift Docs.

Custom Scalars

If you have custom that are type Foundation types, you will need to do an @_exported import Foundation in order to prevent a Swift warning which will become an error in Swift 6.

Previous
Test Mocks
Next
File Uploads
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company