123 questions
0
votes
0
answers
36
views
Automatically add string from swift package to apps string catalog
I have a String Catalog file in the iOS app. If I have e.g. a Text("Hello App") in a view in the app, everything is automatically recognized and the key "Hello App" is added to the ...
1
vote
0
answers
34
views
Does Swift Packages have a similar feature to the "Private Module Map File" build setting?
I have seen a few projects where there is a import Module and a import Module.Internal.
If I open them up and build them I can see that the built .framework file in the Modules/ folder has both module....
1
vote
0
answers
59
views
How to make a Swift package for a C library imported from Homebrew
The frustrating thing is there are so many related questions that almost help me, but not the exact combination I'm doing.
This is my first time trying to make a Swift package wrapping a C library ...
0
votes
1
answer
384
views
Error when running Previews in a Swift Package: XCPreviewAgent crashed because "Testing.framework" is missing
I moved all of my snapshot dependencies and some utility code that simplified my testing to a separate Package, so I didn't need to import all of my snapshots dependencies in every Package I wanted to ...
0
votes
1
answer
223
views
How do I fix this error of "not found in scope" when my classes are public with swift package manager?
I'm writting my first package for an XCode project I'm doing. I made the class inside of my package public. I import the package into my xcode project and then I try to call the class and it can't be ...
1
vote
1
answer
370
views
Publishing and Consuming swift Artifacts as package dependencies in xcode project
I have a package repository on aws azure (a swift package name lets say SimplePackage)
I have created a repository in Code Artifacts section name (artifactsRepo)
Now I have followed Configure Swift ...
4
votes
2
answers
501
views
Cannot delete files from a Swift Package in Xcode
I've created a new Swift Package to store all classes from an SDK I'm developing. The idea is to reuse that Swift Package between other projects.
I've added the package to my current Xcode project by ...
2
votes
5
answers
4k
views
Xcode "Missing package product 'GoogleUtilities_UserDefaults'" after updating to latest package version using SPM
A few days ago I updated the packages in my swift project to newer versions. I am using the Firebase SDK as well as a few others. Immediately after updating, I got a "Missing package product '...
0
votes
1
answer
1k
views
Xcode not updating Package to latest version, despite correct pushes and tags
I have a Swift package in our Github repo, which has been updated, newly tagged, and pushed. In Github everything shows to be in the correct state (i.e. the updated code is correct).
However, I cannot ...
0
votes
1
answer
443
views
How to prevent Xcode compiling a package for a target which is not designated?
I am building a package that contains a lot of classes, extensions and modules I have been building since I started developing for iOS in 2008.
Because I also develop for macOS, watchOS, iPadOS, and ...
1
vote
1
answer
3k
views
Xcode error 'can not resolve package dependency graph' when overriding a dependency with a local package for package editing
I have an Xcode project with a package dependency and want to add that package dependency locally for editing within my app project, but Xcode reports an error when trying to add the package locally.
...
-1
votes
1
answer
682
views
Why is the *Delete* option grayed out for my package dependency in xcode?
Xcode version: 15.2 (15C500b)
I've looked around in various screens in Xcode but have not seen any way to delete a package dependency. Some StackOverflow posts mention the screen option Swift Packages ...
2
votes
1
answer
515
views
Adding a package to an iOS app extension Xcode
How can I add a package dependency that's already added to my main app to an app extension (for example a WidgetKit extension)?
I searched for this answer for a while, so it might save people some ...
2
votes
1
answer
91
views
How to Create a Version-Independent and Scheme-Agnostic Build Script for Swift Package using Xcode and Swift Build?
Consider the following code to verify the compilation of some swift package (for the Swift Package Manager)
xcodebuild \
-scheme name-Package \
-sdk iphonesimulator \
-destination 'platform=iOS ...
0
votes
1
answer
711
views
Add a Swift Package to a workspace in a script
I can create a new Swift Package in Xcode and able to add it in a workspace.
This can be done using Xcode -> File -> New Package, add the name and select the workspace in "Add to" and ...
3
votes
1
answer
1k
views
Swift Package Manager: dependency rules: "from" vs "upToNextMajor"
Let's consider a common format of listing a dependency inside the package:
.package(url: "ssh://[email protected]:firm/repo.git", from: "1.1.0"),
And this format:
.package(url: &...
2
votes
0
answers
191
views
Can I define my binary framework which has open source dependencies without specifying the 'type' parameter in each of my framework's dependencies?
I'm having a problem defining the Package.swift file for my binary closed-source dynamic framework which depends on a number of non-binary open-source dynamic frameworks.
My Package.swift file looks ...
0
votes
0
answers
208
views
Strange error while using Swift Package OpenSSL (code signing a Swift Package?)
I have added the Swift Package OpenSSL to my project.
When I run the app, it crashes with this error
/Users/myself/Library/Developer/Xcode/DerivedData/MyApp-axyxgyhzyndlrqbybswlbgbcdcqd/Build/Products/...
1
vote
0
answers
436
views
Authenticate private Git repo in a swift package, How to refer the package specific .ssh directory?
I have implemented a package which has Private SPM dependencies, I am trying to authenticate the private Git repo with GitHub Deploy Key (SSH key), added dependency looks like below,
dependencies:...
0
votes
2
answers
828
views
How to debug and build a swift package from a project and why public classes inside the package are still not seen?
I have created a swift package that compiled fine.
I have imported the swift package in a project.
No class inside the package is seen on the project. So I made them public.
I added public init() {} ...
0
votes
0
answers
368
views
Can framework include another framework as a dependency?
I am building a new UI framework, let's call it a framework2, there is already existing UI framework framework1, unfortunately can not add or make more changes to that framework1(Provide by a vendor, ...
3
votes
2
answers
453
views
Swift package C header errors
My C library compiles and gets packaged into an xcframework without a problem, but my Swift project that uses this through a Swift Package then has some errors...
Namely, I'm getting
Token is not a ...
0
votes
1
answer
858
views
Error message: "Type 'any ViewModifier' cannot conform to 'ViewModifier'"
At the moment I try to create a package with SwiftUI. I created a ProfileImageView. I get an Url as an optional String, which I convert to a non-optional String with if...let... In the body I use this ...
1
vote
0
answers
125
views
Can not import dependency of Google-Mobile-Ad in my swift package
I want to make a package of google-mobile-ads to use on multiple devices.But the issue is I can not import or add the dependency of google-mobile-ads in my swift package.
How I can do this?
3
votes
1
answer
1k
views
Swift Package with dependencies giving error in console
I am trying to create a Swift Package from a custom xcframework that I'm building for a client. The framework has a dependency on a couple of 3rd party frameworks. I've read about how even though ...