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

init a project with ios as selection and no xcode throws unhelpfull error

Open ykethan opened this issue 1 year ago โ€ข 4 comments

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

image

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

ykethan avatar Aug 11 '23 18:08 ykethan

related https://github.com/aws-amplify/amplify-cli/issues/13064

josefaidt avatar Aug 15 '23 20:08 josefaidt

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.

atierian avatar Aug 15 '23 20:08 atierian

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!

github-actions[bot] avatar Jan 08 '24 19:01 github-actions[bot]

Quick update: The fix has been merged in amplify-swift and is awaiting amplify-cli teams review.

harsh62 avatar Feb 26 '24 22:02 harsh62

The issue has been released. Please update amplify cli using amplify upgrade.

harsh62 avatar Apr 29 '24 13:04 harsh62

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.

github-actions[bot] avatar Apr 29 '24 13:04 github-actions[bot]