Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated May 1, 2026

LegacyYou are viewing Gen 1 documentation. Switch to the latest Gen 2 docs →

Remove DataStore

Before adding Apollo, remove Amplify DataStore from your project.

Remove DataStore frameworks from your target

  1. In the Xcode Navigator panel (left sidebar), select the blue project icon at the very top (the document icon labeled with your project name). This opens the Project Editor.
  2. In the Project Editor, you will see two columns: PROJECT and TARGETS. Select your app name under TARGETS (not under PROJECT).
  3. Select the "General" tab at the top.
  4. Scroll down to the "Frameworks, Libraries, and Embedded Content" section (below "Supported Destinations" and "Minimum Deployments").
  5. Remove the DataStore-related frameworks by selecting each one and selecting the ⊖ (minus) button at the bottom of the list. Remove at minimum:
    • AWSDataStorePlugin
    • AWSAPIPlugin (if it was only used by DataStore)

A typical Amplify project may have many framework products linked beyond DataStore, such as AWSCloudWatchLoggingPlugin, AWSLocationGeoPlugin, AWSPinpointAnalyticsPlugin, AWSPinpointPushNotificationsPlugin, AWSPredictionsPlugin, AWSS3StoragePlugin, etc. Remove all frameworks that you are not actively using. Keep the frameworks you still need — for example, if you use Amplify for authentication, keep Amplify, AWSCognitoAuthPlugin, AWSPluginsCore, and Authenticator (if using the Amplify Authenticator SwiftUI component).

Remove the DataStore plugin from app initialization

Remove the DataStore and API plugin registration from your Amplify configuration code:

// Remove these lines:
try Amplify.add(plugin: AWSDataStorePlugin(modelRegistration: AmplifyModels()))
try Amplify.add(plugin: AWSAPIPlugin(modelRegistration: AmplifyModels()))

Keep any other plugins you still need (e.g., AWSCognitoAuthPlugin).

Delete DataStore generated model files

If you used Amplify codegen, delete the generated model classes. These are typically found in a Models/ directory and include files like:

  • Post.swift
  • Post+Schema.swift
  • AmplifyModels.swift

These will be replaced by Apollo's generated types.

Remove all Amplify.DataStore.* calls

Search your codebase and remove or replace all DataStore calls:

DataStore CallApollo Replacement
Amplify.DataStore.save()Apollo mutations (see Migrate DataStore to Apollo)
Amplify.DataStore.delete()Apollo mutations (see Migrate DataStore to Apollo)
Amplify.DataStore.query()Apollo queries (see Migrate DataStore to Apollo)
Amplify.DataStore.observe()Apollo subscriptions (see Migrate DataStore to Apollo)
Amplify.DataStore.observeQuery()Apollo cache watchers (see Migrate DataStore to Apollo)
Amplify.DataStore.clear()apolloClient.store.clearCache()
Amplify.DataStore.start() / .stop()No longer needed

Keep AWSCognitoAuthPlugin (or other auth plugins) if you still use Amplify for authentication or other services. You only need to remove the DataStore plugin and the API plugin (if only used by DataStore). If you use the Amplify Authenticator SwiftUI view, keep Authenticator and AWSCognitoAuthPlugin — they work independently of DataStore.