Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add Package dependencies of Xcode(IOS) #3907

Closed
Wilsonagene opened this issue Oct 28, 2024 · 10 comments
Closed

Unable to add Package dependencies of Xcode(IOS) #3907

Wilsonagene opened this issue Oct 28, 2024 · 10 comments
Labels
question General question

Comments

@Wilsonagene
Copy link

Describe the bug

I am unable to add the Package dependencies for IOS Xcode
Errors are in the image below:

Screenshot 2024-10-28 at 4 52 09 PM Screenshot 2024-10-28 at 4 52 27 PM

Steps To Reproduce

Steps to reproduce the behavior:
1. Go to Package dependencies on Xcode
2. Paste the link of "https://github.com/aws-amplify/amplify-swift"
3. Click on Add package
4. See error

Expected behavior

After clicking on Add package the package should be added to your Xcode project

Amplify Framework Version

4.43.0

Amplify Categories

Analytics, API, Auth, DataStore, Geo, Predictions, Storage

Dependency manager

Swift PM

Swift version

5.0

CLI version

12.1.1

Xcode version

15.4

Relevant log output

<details>
<summary>Log Messages</summary>


INSERT LOG MESSAGES HERE
```

Is this a regression?

No

Regression additional context

No response

Platforms

iOS

OS Version

17.5

Device

iPhone 15

Specific to simulators

No response

Additional context

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Oct 28, 2024
@sebaland
Copy link
Contributor

sebaland commented Oct 28, 2024

Hi @Wilsonagene.
I was unable to reproduce the issue and was able to add Amplify Swift to an Xcode project by following the steps you provided.

It's not possible to see the full error in the screenshots you provided, but it seems the issue happens when attempting to load the aws-sdk-swift package.
Have you tried doing File > Packages > Reset Package Caches?

@sebaland sebaland added question General question and removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Oct 28, 2024
@Wilsonagene
Copy link
Author

It's the normal process of adding package to Xcode.

I am unable to try File > Packages > Reset Package Caches?

Screenshot 2024-10-28 at 5 54 45 PM

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@sebaland
Copy link
Contributor

I see, I guess the options are greyed out because you don't have any package in that specific project.

This seems to be a network issue when Xcode tried to fetch the package, but not something caused by the package itself.
Are you perhaps behind a VPN or proxy you need to configure?

If that's not the case, you could try removing the affected packages from the list of "Recently Used" in Xcode by right-clicking and choosing "Remove Package", or just try wiping the whole SPM caches directory altogether:

rm -rf ~/Library/Caches/org.swift.swiftpm/

In any case, this issue is not something we have control of.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@kparichan
Copy link

Might be related to this if you use SourceTree.
https://forums.swift.org/t/fatal-cannot-use-bare-repository/75588

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@sebaland sebaland removed the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@Wilsonagene
Copy link
Author

no it's not sourceTree I have checked

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@sebaland sebaland removed the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@Wilsonagene
Copy link
Author

I see, I guess the options are greyed out because you don't have any package in that specific project.

This seems to be a network issue when Xcode tried to fetch the package, but not something caused by the package itself. Are you perhaps behind a VPN or proxy you need to configure?

If that's not the case, you could try removing the affected packages from the list of "Recently Used" in Xcode by right-clicking and choosing "Remove Package", or just try wiping the whole SPM caches directory altogether:

rm -rf ~/Library/Caches/org.swift.swiftpm/

In any case, this issue is not something we have control of.

okay thanks I will also try this.
Do u think updating my Xcode can fix this issue ?

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@sebaland
Copy link
Contributor

I can't reproduce this issue in either Xcode 15.4 nor Xcode 16, so I don't think it's related to that.
But feel free to give it a shot.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@Wilsonagene
Copy link
Author

I can't reproduce this issue in either Xcode 15.4 nor Xcode 16, so I don't think it's related to that. But feel free to give it a shot.

But I try other packages and it worked

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
@sebaland sebaland removed the pending-maintainer-response Issue is pending response from an Amplify team member label Oct 28, 2024
Copy link
Contributor

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.

@Wilsonagene
Copy link
Author

I my Derived Data folder and I was able to add the package to my project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question
Projects
None yet
Development

No branches or pull requests

3 participants