Unable to add Package dependencies of Xcode(IOS)
Closed this issue · 10 comments
Describe the bug
I am unable to add the Package dependencies for IOS Xcode
Errors are in the image below:
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
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?
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.
Might be related to this if you use SourceTree.
https://forums.swift.org/t/fatal-cannot-use-bare-repository/75588
no it's not sourceTree I have checked
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 ?
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.
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
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.
I my Derived Data folder and I was able to add the package to my project