Search results for

missing package product

51,071 results found

Post

Replies

Boosts

Views

Activity

SwiftData model in Swift package
Hi, I am looking for information on how to setup a ModelContainer for a Swift app when the SwiftData model is located in a Swift package. Let's say the model code resides in a package called DomainModel. That package was added target's embedded content and the model types are used to init the model container using the modelContainer(for:) view modifier on the ContentView of the app. This crashes the app on startup with a EXC_BAD_ACCESS code=2. When copying the model code from the package directly into the app, the app starts just fine. I kindly ask for a code sample or any information about how to setup the model container when using a model from a Swift package. Thanks in advance and I am looking forward to replacing CoreData 🙂
6
0
2.5k
Jun ’23
Very Strange TVOS IBDesignables Errors in iOS Package
I have developed this shared package - https://github.com/RiftValleySoftware/RVS_Spinner. It works fine. In the package test harnesses (3 iOS apps), it works great, and also, the IB storyboard renders the control (It's an IBDesignable). However, when I include it as a package in another app (I can't share the source), I get these really weird render failure messages:Error: 'UIPickerView' is unavailable in tvOS And so on. There's a bunch of not available in tvOS errors. Well...DUH. It's an iOS package and utility, and leverages a lot of things like haptics. The package explicitly states that it is iOS(12), and I can't see any indication of why my storyboard is insisting on trying to render as tvOS. What am I missing?
2
0
1.1k
Sep ’20
Reply to Unable to rename the Swift Playground or add an icon when package dependencies is imported
I was able to reproduce the behavior you described, and I recommend you submit a bug via Feedback Assistant, and make sure to reply with the feedback's ID on this thread for reference. You may also link this thread on your feedback. Some details about this bug Swift Playgrounds are a superset of swiftpm (the Swift Package format), and they have a Package.swift` settings file that you may access via clicking on Show Package Contents option in Finder: This file includes all your App Playground's settings and used packages. Here's how it looks on a functional app, with the same package you were using: // swift-tools-version: 5.9 // WARNING: // This file is automatically generated. // Do not edit it by hand because the contents will be replaced. import PackageDescription import AppleProductTypes let package = Package( name: My App, platforms: [ .iOS(18.1) ], products: [ .iOSApplication( name: My App, targets: [AppModule], displayVersion: 1.0, bundleVe
Feb ’25
subprojects to swift packages ?
I have an app I'm returning to after a several years I'd like to freshen up, but am daunted by the changes since; 2018 WWDC - session 415: behind the scenes of Xcode Build process, points out the many changes just that year.It's Objective-C only, features several sub-projects both private and GitHub, whose .xcodeproj file I'd had dragged in as the then practice, which my main project has as dependencys; all was good.But have few but widespread problems:* IB plugins* framework headers not getting found* sub-builds failing - deprecated or now not viable code* what to do re: BWToolkit which appears stagnant?The 2nd is odd as they build ok invividually.So my question is to whether to continue the sub-project route, or try migration to modernize like envelop them as swift packages. This is not all viable as some have assets, but otherwise, what to do? I think the missing header issue is due to naming:i.e. `import foo.h` should now be `import <MyFramework/foo.h>`.But I suspect some m
2
0
1.9k
Jun ’20
Not able to create package file
I am trying to create installer package for Mac using productbuild and pkgbuild . while installing everything looks good but .app file is not getting copied to install-location. Commands: /usr/bin/pkgbuild --install-location /Applications/MyAppFolder --identifier com.xxx.xxx --component Content/MyApp.app --scripts Script --version 1.0.1 Build/MyPackage.pkg In the above command, I have copied signed .app file in the content folder all my scripts in scripts folder. I tried using root arg too. While using root, all the other files available in the Content folder are getting copied at the install-location but not the .app file. /usr/bin/pkgbuild --install-location /Applications/MyAppFolder --identifier com.xxx.xxx --root Content --scripts Script --version 1.0.1 Build/MyPackage.pkg I tried using productbuild command too but no luck. App file is missing post install. /usr/bin/productbuild --identifier com.xxx.xxx --package Build/MyPackage.pkg Final/MyPackage.pkg
1
0
1.1k
Jul ’23
Reply to SwiftUI Preview Runtime linking failure
Thank you for bearing with me! This was key missing information. I can reproduce the problem in a small sample project using a package structure like you described here. I'll update the feedback and see what we can do with the build system and linker teams to figure this out.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’25
Reply to Selling IAP consumables using price tiers above 60
You can work around this by selling multiple packages of consumables. For example, have a consumable at tier 60 (with 100 units) and another consumable at a discount of tier 40 (also with 100 units) (for example) but the second package is not usually offered for sale. Tell the user that if they want to purchase 100 units it will cost tier 60. If they want to purchase 200 units then they can purchase the first 100 units and, for the next 24 hours, they will be able to purchase the next 100 units for tier 40 for a toal price of only tier 60 plus tier 40. For 24 hours after the first purchase show them the tier 40 product rather than the tier 60 product.
Nov ’16
LOCALIZED_STRING_MACRO_NAMES for Swift package targets?
I have a custom localisation function in my project that enforces the inclusion of the bundle parameter (specifically so that Swift packages are forced to include the Bundle.module value). While migrating to String Catalogs, I noticed that my custom localisation function wasn't being recognised by the automatic extraction that the Swift compiler is doing, but only in my Swift package targets. Is there a way to set something like LOCALIZED_STRING_MACRO_NAMES in Swift Packages?
1
0
874
Jul ’24
Swift Package Manager, target based dependency
I wonder if its possible to get target based dependency using Swift Package Manager without Xcode resolving all dependency in package. I have a package like this: // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: ReCaptcha, platforms: [ .iOS(.v9) ], products: [ .library( name: ReCaptcha, targets: [ReCaptcha]), .library( name: ReCaptchaRx, targets: [ReCaptchaRx]) ], dependencies: [ .package(url: https://github.com/ReactiveX/RxSwift.git, from: 6.0.0), .package(url: https://github.com/JakubMazur/AppSwizzle.git, from: 1.3.2), ], targets: [ .target( name: ReCaptcha, dependencies: [], path: ReCaptcha/Classes, exclude: [Rx], linkerSettings: [ .linkedFramework(UIKit) ] ), .target( name: ReCaptchaRx, dependencies: [ ReCaptcha, .product(name: RxSwift, package: RxSwift) ], path: ReCaptcha/Classes
0
0
3.1k
Jul ’21