aws-amplify / amplify-studio

AWS Amplify Studio (Formerly Admin UI)
135 stars 31 forks source link

Cannot find 'AmplifyModels' in scope #47

Closed mr-fixit closed 1 year ago

mr-fixit commented 3 years ago

The instructions for creating a sample Amplify app are excellent, but they leave out one step.

On this page, https://sandbox.amplifyapp.com/test/ABCD1234, after step 3, the user should be told to add the files in AWSAmplify/amplify/generated to the project.

Otherwise, the line

    let dataStorePlugin = AWSDataStorePlugin(modelRegistration: AmplifyModels())

will fail to compile with the error Cannot find 'AmplifyModels' in scope

ref: https://stackoverflow.com/questions/65261123/xcode-project-fails-to-find-the-amplifymodels-file-that-is-generated-for-ios-p

swaminator commented 3 years ago

@mr-fixit are you using the latest version of the Amplify CLI?

kaustavghosh06 commented 3 years ago

@mr-fixit Are you running amplify pull --sandboxId <ABCD1234> to generate the models locally?

mr-fixit commented 3 years ago

I was following the sample project flow, doing as it told me.

swaminator commented 3 years ago

@mr-fixit can you run amplify -v on your CLI?

mr-fixit commented 3 years ago
$ ~/.amplify/bin/amplify -v
Scanning for plugins...
Plugin scan successful
4.39.0
afern247 commented 3 years ago

I'm having the same excact problem in SwiftUI for iOS. Excellent Intro! BUT it gives me that error. I'm in step 4: Install Amplify library and initialize Amplify

EDIT: I fixed it by adding the Amplify folder to the project: https://stackoverflow.com/questions/65261123/xcode-project-fails-to-find-the-amplifymodels-file-that-is-generated-for-ios-p

Guys keep the docs updated, it's going extremely well so far! Add that up!

renebrandel commented 3 years ago

Hi this should be addressed in: https://github.com/aws-amplify/amplify-cli/pull/7152

VamsiKrishna1805 commented 2 years ago

Hi, I'm facing this issue. I'm using SPM and I don't know which file to add into the my iOS project. Can you please assist me in this?

Thanks!

CVirus commented 1 year ago

Issue still reproducible with the latest CLI

afern247 commented 1 year ago

I can confirm, the models are not being generated @renebrandel

renebrandel commented 1 year ago

Hi @afern247 - can you provide me your app ID, region info, and CLI version?

afern247 commented 1 year ago

Hi @afern247 - can you provide me your app ID, region info, and CLI version?

Appid: d3fooq4aiahxc0 Region: us-east-1 CLI version: 10.7.3

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.