amplify-swift icon indicating copy to clipboard operation
amplify-swift copied to clipboard

No such module 'AWSAppSync'

Open ryancrunchi opened this issue 3 years ago • 3 comments

Describe the bug

Building a newly iOS project with amplify library raises error: No such module 'AWSAppSync' in API.swift generated file image

Steps To Reproduce

Steps to reproduce the behavior:

  1. I have followed the amplify iOS getting started tutorial : https://docs.amplify.aws/lib/project-setup/prereq/q/platform/ios/
  2. Added packages with SPM : AWSAPIPlugin, AWSCognitoAuthPlugin, AWSDataStorePlugin
  3. Using amplify with existing resources, I've used amplifyconfiguration.json and run amplify codegen in project folder : API.swift file and graphql folder were created with subscriptions.graphql queries.graphql mutations.graphql and schema.json. All my existing models and graphql stuff were generated well.
  4. Added following code to application(_, didFinishLaunching...):
do {
    try Amplify.add(plugin: AWSCognitoAuthPlugin())
    try Amplify.add(plugin: AWSAPIPlugin(modelRegistration: AmplifyModels()))
    try Amplify.configure()
} catch {
    print("An error occurred setting up Amplify: \(error)")
}
  1. Build project

Expected behavior

Project builds

Amplify Framework Version

1.28.1

Amplify Categories

API, Auth, DataStore

Dependency manager

Swift PM

Swift version

5.7

CLI version

10.0.0

Xcode version

14.0.1

Relevant log output


Is this a regression?

No

Regression additional context

No response

Device

macOS 12.6 building for iPhone 14 Pro simulator

iOS Version

iOS 14

Specific to simulators

No response

Additional context

No response

ryancrunchi avatar Oct 02 '22 19:10 ryancrunchi