amplify-swift
amplify-swift copied to clipboard
init a project with ios as selection and no xcode throws unhelpfull error
Describe the bug
related to https://github.com/aws-amplify/amplify-cli/issues/13104
creating a new applications without xcode being installed in your project throws
Updating Xcode project:
๐ซ xcodeProject:
-- Caused by: notFound(path: "/Users/ykethan/Documents/ampapps/adminqu/iostes")
๐ Command failed with exit code 1: /Users/ykethan/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-config --path=/Users/ykethan/Documents/ampapps/adminqu/iostes
Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Session Identifier: 798761f3-615a-4b06-9ab2-25d51d7f4c2e
appears due to https://github.com/aws-amplify/amplify-swift/blob/2df6d3cf4e6b8d3ed57c02bcd891cbb3945af9d8/AmplifyTools/AmplifyXcode/Sources/AmplifyXcodeCore/Environment/CommandEnvironment.swift#L92
further testing, on 11.0.5
Steps To Reproduce
1. make sure you dont have xcode installed
2. `amplify init` with following selections
? Initialize the project with the above configuration? No
? Enter a name for the environment dev
? Choose your default editor: Visual Studio Code
โ Choose the type of app that you're building ยท ios
Using default provider awscloudformation
? Select the authentication method you want to use: AWS profile
3. observe error when the deploy finishes.
Expected behavior
a better error: xcode not found, please install xcode.
Amplify Framework Version
n/a
Amplify Categories
API
Dependency manager
Swift PM
Swift version
n/a
CLI version
12.2.4
Xcode version
n/a
Relevant log output
<details>
<summary>Log Messages</summary>
INSERT LOG MESSAGES HERE
```
Is this a regression?
No
Regression additional context
No response
Platforms
No response
OS Version
13.5 ventura
Device
mac
Specific to simulators
No response
Additional context
No response
related https://github.com/aws-amplify/amplify-cli/issues/13064
Thanks for opening this @ykethan. As you mentioned, you're seeing this because Xcode is not installed on your machine, which is a requirement for init'ing an iOS application using Amplify CLI.
I agree that the error message could be clearer. We'll keep this open to track improving the error message.
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a ๐ reaction on the request. This helps us prioritize new features most important to you. Thank you!
Quick update: The fix has been merged in amplify-swift and is awaiting amplify-cli teams review.
The issue has been released. Please update amplify cli using amplify upgrade.
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. If you wish to keep having a conversation with other community members under this issue feel free to do so.