Questions tagged [swift-package]
103 questions
0
votes
0 answers
how to import swift package in flutter project
I have swift package like this:
package
├── SigningSDK
├── Package.swift
├── README.md
├── Sources
│ ├── SigningSDK
│ └── file1.swift
└── Tests
└── SigningSDKTests
└── SigningSDKTests.swift
I…

joisberg
- 175
- 2
- 13
0
votes
0 answers
Which prefix operator ! works, global or extension binding?
I made a test code for inverted bool binding as following, including almost binding ways I can think of(except @Environment...).
struct TestView: View {
@State private var isOn: Bool = false
@State private var parameter: Parameter = .init()
…

foolbear
- 726
- 1
- 7
- 19
0
votes
0 answers
Duplicate libraries within Dependency Graph
I've got an app that depends on a UI library. The app also depends on another feature library that depends on the same UI library.
Is the UI library bundled with the app twice? Is there a way to ensure it only does it once?
If the app uses git…

Kelvin Lau
- 6,373
- 6
- 34
- 57
0
votes
0 answers
Swift Package depend on local Xcode project
Is it possible for a Local Swift Package to depend on a Xcode Project (that creates a xcframework) in the same workspace?
I have tried things in the targets section in Package.swift file to point to the path where the local Xcode project…

e1un
- 3
- 1
0
votes
0 answers
Library not loaded: @rpath/Sample_320EDFA1A561D4D9_PackageProduct.framework Error on AppLaunch on device
Created a Swift Package and it works fine on Simulator but fails to run on device with Library not loaded error on device on Launch.
Library not loaded: @rpath/Sample_320EDFA1A561D4D9_PackageProduct.framework/Sample_320EDFA1A561D4D9_PackageProduct

SreekanthI
- 393
- 3
- 13
0
votes
0 answers
How to get a Swift Package to be build with the Release Build Configuration of the current Scheme in Xcode?
I have moved some of my code from my main application to a Swift Package. But I noticed a slow down.
I have set the Build Configuration to Release in the scheme configuration, but it does not seem to be used when building the package.
So the same…

Brice
- 75
- 2
- 7
0
votes
0 answers
Is it possible to import files from a swift package that are not in the Sources directory?
I am using a swift package in my iOS project that happens to have various files in a Tests directory. Tests exists the same parent directory as its Sources folder. I can see and use all the classes defined in the Sources directory, but see no way to…

livingtech
- 3,570
- 29
- 42
0
votes
0 answers
Can't name the resources folder "Resources" in my Swift package
When I use resources: [.copy("Resources")] for my Swift package, the bundle can't be built: "Command CodeSign failed with a nonzero exit code" (undle format unrecognized, invalid, or unsuitable).
When I rename the folder to something else, the…

chkpnt
- 125
- 10
0
votes
0 answers
Could not find module 'RealmSwift' for target 'x86_64-apple-ios-simulator
Hello I am trying to replace all Pod dependencies in my project with Swift packages. Currently I have one blocker. There is one framework which only supports x86_64 architecture (its kotlin multiplatform) so I set the setting for excluded…

Hawkeye
- 21
- 3
0
votes
1 answer
Where is package.resolved stored?
Problem
I am using Swift Package in my project
I can't find package.resolved in the following path:
[appName].xcodeproj/project.xcworkspace/xcshareddata/ (even tried showing the hidden files)
My findings:
Following path exists but is…

user1046037
- 16,755
- 12
- 92
- 138
0
votes
0 answers
Swift package containing a dynamic library and having a static one as a dependency
I have a Swift package containing two libraries, one is dynamic and the other one is static. The dynamic library has the static one as a dependency. Will the static library be embedded in the dynamic one's code only once or each time the dynamic…

user19344300
- 45
- 5
0
votes
0 answers
embedded SDK-that depends on Swift Package
In my iOS project, I have an embedded SDK-that depends on AFNetworking (and other SDKs).
I used SPM to get the SDKs which the embedded SDK depends on.
When I run it, it crashes immediately with:
"dyld[75996]: Library not loaded:…

Anthony Harvey
- 1
- 1
0
votes
1 answer
Able to call generic SwiftUI View when in my project but issues once it's in a package and imported
I have a SwiftUI app that calls a View with passed in Views, methods, and variables. This view, let's call it DisplayView is general enough that I'm able to call it in different ways and have it display really different things. This worked great but…

Kyra
- 5,129
- 5
- 35
- 55
0
votes
0 answers
Unable to load JS file from a swift package unit test
I am trying to load a Javascript file from within a Unit Test for a Swift Package I am working on and it is failing.
Here is what I have so far ...
The sample files are located in MyPackage/Tests/MyPackageTests/Resources/Sample.js
Within the…

ra9r
- 4,528
- 4
- 42
- 52
0
votes
1 answer
Expose Swift Package as part of Another Swift Package
I have a set of Swift Packages that I'm writing (ex: CUIExpandableButton), that I'd like to roll up into another Swift Package called CrystalUI. The overall goal is to write a set of packages that get bundled into a single package. However, I want…

robhasacamera
- 2,967
- 2
- 28
- 41