Xcode 16 Support
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.17.0
Amplify CLI Version
12.12.6
What operating system are you using?
macOS 14.6.1 (23G93)
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
When attempting to run codegen models with a project created with Xcode 16, the generation succeeds, but updating the Xcode project is failing with the following error:
Updating Xcode project:
🚫 xcodeProject:
-- Caused by: The element PBXFileSystemSynchronizedRootGroup is not supported.
🛑 Command failed with exit code 1: /Users/{redacted}/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-models --path=/Users/{redacted}
Expected behavior
Codegen successfully generates the models and modifies the Xcode project appropriately.
Reproduction steps
- Open up an iOS application that uses the AWSDataStorePlugin and GraphQL that was created using Xcode 16
- Run
amplify pullif needed - Run
amplify codegen models
Note the codegen fails with the included error.
Project Identifier
704bf3f4b979261c925b5cb99d13f5b2
Log output
2024-09-17T15:26:35.586Z|info : amplify version core
2024-09-17T15:26:37.079Z|info : amplify pull core
2024-09-17T15:26:37.136Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2024-09-17T15:26:40.039Z|info : amplify-provider-awscloudformation.zip-util.downloadZip.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip"},null])
2024-09-17T15:26:40.041Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip","Bucket":"[***]ify-[***]sthenics-[***]ev-[***]26-[***]ment"}])
2024-09-17T15:26:46.821Z|info : amplify-provider-awscloudformation.initialize-env.run.cfn.updateamplifyMetaFileWithStackOutputs([{"StackName":"[***]ify-[***]sthenics-[***]ev-[***]26"}])
2024-09-17T15:26:47.507Z|info : amplify-provider-awscloudformation.aws-cfn.updateamplifyMetaFileWithStackOutputs.cfn.listStackResources([{"StackName":"[***]ify-[***]sthenics-[***]ev-[***]26"}])
2024-09-17T15:26:47.859Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]ify-[***]sthenics-[***]ev-[***]26"}])
2024-09-17T15:26:47.998Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]uthStack-[***]Q4NS5Q/[***]5a40-[***]01-[***]ee-[***]1f-[***]ac293"}])
2024-09-17T15:26:48.002Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]isthenics-[***]C57CFT/[***]6830-[***]bb-[***]ee-[***]c6-[***]c70c5"}])
2024-09-17T15:26:48.007Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]iptions-[***]4RCCH5/[***]05a0-[***]01-[***]ee-[***]92-[***]6362f"}])
2024-09-17T15:26:48.012Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]nics60664a22-[***]785TY/[***]40a0-[***]b8-[***]ee-[***]58-[***]411d7"}])
2024-09-17T15:26:48.017Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]eSubscription-[***]4KFLE/[***]1870-[***]be-[***]ee-[***]35-[***]2e0d7"}])
2024-09-17T15:26:48.023Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]bscriptionData-[***]UE5ZKE/[***]20d0-[***]be-[***]ee-[***]01-[***]b4bf1"}])
2024-09-17T15:26:48.029Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]idPublisherApi-[***]UQR481/[***]fc20-[***]01-[***]ee-[***]73-[***]174bd"}])
2024-09-17T15:26:48.036Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]eUserData-[***]1EIKY/[***]5200-[***]a8-[***]ee-[***]5d-[***]88df3"}])
2024-09-17T15:26:48.041Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]BackTime-[***]ZTGLZZ/[***]d950-[***]a1-[***]ee-[***]29-[***]511ed"}])
2024-09-17T15:26:48.045Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]21:stack/[***]ify-[***]sthenics-[***]ev-[***]26-[***]storage-[***]D7UXK/[***]dd60-[***]7c-[***]ee-[***]66-[***]f188f"}])
2024-09-17T15:26:48.204Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]ify-[***]json","Bucket":"[***]ify-[***]sthenics-[***]ev-[***]26-[***]ment"}])
2024-09-17T15:27:00.639Z|error : Command failed with exit code 1: /Users/{redacted}/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-config --path=/Users/{redacted}
UnknownFault: Command failed with exit code 1: /Users/{redacted}/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-config --path=/Users/{redacted}
2024-09-17T15:28:15.577Z|info : amplify models codegen
2024-09-17T15:28:15.649Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2024-09-17T15:28:19.340Z|error : Command failed with exit code 1: /Users/{redacted}/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-models --path=/Users/{redacted}
UnknownFault: Command failed with exit code 1: /Users/{redacted}/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-models --path=/Users/{redacted}
2024-09-17T15:29:16.958Z|info : amplify diagnose core {"send-report":true,"yes":false}
2024-09-17T15:29:17.034Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2024-09-17T15:46:21.243Z|info : amplify version core
2024-09-17T15:47:04.509Z|info : amplify version core
Additional information
No response
Before submitting, please confirm:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
Hey, thanks for raising this! I'm going to transfer this over to our swift repository for better assistance.
@mindgrub-rkoch Thanks for submitting the issue. We'll try to reproduce the issue and investigate further.
Transferring this issue back to the Amplify CLI team to added support for XCode 16.
- Running the command Gen1 command
amplify init --quickstart --frontend iosto initialize a new project fails with the following error:
Updating Xcode project:
🚫 xcodeProject:
-- Caused by: keyNotFound(CodingKeys(stringValue: "compatibilityVersion", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"compatibilityVersion\", intValue: nil) (\"compatibilityVersion\").", underlyingError: nil))
- A new element
PBXFileSystemSynchronizedRootGroupis introduced in the project.pbxproj file created by Xcode 16 is not recognized by the cli.
/* Begin PBXFileSystemSynchronizedRootGroup section */
737AC85F2C9B32E500B4F698 /* xcode16test */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = xcode16test;
sourceTree = "<group>";
};
737AC8702C9B32E600B4F698 /* xcode16testTests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = xcode16testTests;
sourceTree = "<group>";
};
737AC87A2C9B32E600B4F698 /* xcode16testUITests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = xcode16testUITests;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
@phantumcode thanks for the verification. Marking this as bug.
Hi, I also meet this issue when I set up amplify environment in my demo project to test AWS Rekognition.
The document I was reading is https://docs.aws.amazon.com/rekognition/latest/dg/face-liveness.html .
When I typed amplify init, the console reminded me that I was using Amplify Gen 1.
Here is my question: Is it possible to use Gen 2 to complete the tutorial, to complete the whole procedures of face-liveness?
ps: I'm an iOS developer, where can I help to solve the issue? As I can see, it is related to the element introduced by Xcode 16. So I guess if I know what exactly "Updating Xcode project" do, maybe I can update the script to make the "Updating Xcode project" work?
Same issue after running amplify init as described in https://aws.amazon.com/getting-started/hands-on/build-ios-app-amplify/module-two/ xCode 16 on Sequoia (15.0.1)
I tried in another Xcode 15 project, and found the differences after amplify init.
Maybe the script is just add folder and two configuration files to projects.
So, as workaround, maybe we can manually create the folder and add the 2 configuration files to project?
Hey folks, for new projects we recommend using Amplify Gen 2 which uses AWS cdk with a TypeScript-based, code-first developer experience (DX) for defining your backends. Refer to our Amplify Gen 2 documentation: https://docs.amplify.aws/swift/
I was developing AWS Face liveness, https://ui.docs.amplify.aws/swift/connected-components/liveness
- The doc was using Amplify Gen 1.
- Amplify just doesn't tell us what it does because of "code-first developer experience"
Then how can I migrate to Gen 2 while I don't know what Amplify does and what liveness sdk needes, and Gen 1 just fails to run? We are developers, not fools, if we know the last step is just add two json files to the project, we can help to solve the issue. And then after we figure out what the sdk need and what gen1 does, we can migrate to Gen2.
@RentonLin the liveliness component for swift is currently a part of the swift repository. Could you open a new issue on the amplify-swift repository with the above request.
I was developing AWS Face liveness, https://ui.docs.amplify.aws/swift/connected-components/liveness
- The doc was using Amplify Gen 1.
- Amplify just doesn't tell us what it does because of "code-first developer experience"
Then how can I migrate to Gen 2 while I don't know what Amplify does and what liveness sdk needes, and Gen 1 just fails to run? We are developers, not fools, if we know the last step is just add two json files to the project, we can help to solve the issue. And then after we figure out what the sdk need and what gen1 does, we can migrate to Gen2.
@RentonLin I am having exactly the same issues that you are, but with a different AWS iOS demo project. I have tried adding the files manually and adding Package Dependencies, but Xcode compilation still fails. I suspect other changes are required to the project files. I have opened support tickets with AWS and sent all logs and information possible. They are still looking into the issue. The AWS status is "Pending Amazon Action". It has been a week, so it looks like no real rush from their side.
Running into the same issue, any help here?
Do note the temporary mitigation is to drop the generated models (e.g. User, User+Schema, AmplifyModels.swift) from amplify/generated/models into an "AmplifyModels" folder (create it). Make sure the files/folder are a part of your target.
The support ticket I opened with AWS about this issue, has been closed. They were able to replicate the issue/s with Amplify CLI Gen 1, but the problem has been pushed to Xcode.
What I have been able to do is successfully follow an Amplify Gen 2 demo project. https://docs.amplify.aws/swift/start/quickstart/ Just be sure to change the Amplify version in the upper left drop down box on the landing page to Gen 2. Then just below that, choose the framework/language you use. The demo app worked up until Authorisation, but then I now have issues with GraphQL auth that I am still working through. But its a start anyway. Gen 2 works differently to Gen 1, where you code the backend locally and then push it to AWS, not the other way around. If you follow the steps in the demo, it will become clear.
Support for Xcode 16 was added in version 12.14.0.
This issue is now closed. 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.