Search results for

“missing package product”

55,552 results found

Post

Replies

Boosts

Views

Activity

Swift Package Manager not building external dependencies correctly
I have created my own SPM through File -> New -> Package Package.swift looks like: // swift-tools-version: 5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: MyPackage, platforms: [.iOS(.v16), .macCatalyst(.v16), .macOS(.v14)], products: [.library(name: MyPackage, targets: [MyPackage]),], dependencies: [ .package(path: ../external-package) ], targets: [ .target(name: MyPackage, path: Sources), .testTarget(name: MyPackageTests, dependencies: [MyPackage]), ] ) When I run swift build the error says: '.../MyPackage/.build/arm64-apple-macosx/debug/external-package.build/external-package-Swift.h' not found and surely, when I go to directory: .../MyPackage/.build/arm64-apple-macosx/debug/external-package.build/ there are only 2 files in there: module.modulemap & output-file-map.json All source files from external-package a
1
0
982
Aug ’24
Unable to create a simple installable package
Hi, I am a newcomer in macOS development, and I am struggling to create a package with the XCode command line tools that is installable on other computers. In its minimal version, the package shall install a simple program to usr/local/: hello.c: #include int main(void) { printf(Hello Worldn); return 0; } distribution.plist: Hello World h1.pkg build.sh: #!/bin/sh cc -o hello hello.c mkdir -p local/bin cp hello local/bin/ codesign -s - -i net.world.hello local/bin/hello pkgbuild --identifier net.world.hello --root local --install-location /usr/local h1.pkg productbuild --distribution distribution.plist --resources . hello.pkg The build scrips produces a package hello.pkg. However, when I try to install it, I get : Product archive /Users/foo/hello.pkg trustLevel=100 : PKInstallRequest: failed to initialize. Error: Error Domain=PKInstallRequestErrorDomain Code=2 Specifier Description:: { URL = file:///Users/foo/h1.pkg; identifier = net.wo
2
0
1.1k
Mar ’24
String catalogs in packages
We have separated much of our UI into different packages to reduce complexity and compile time. When we recently tested using new .xcstrings string catalogs, we hit an unexpected problem. Strings extracted from SwiftUI components like Text or Button are extracted into the Localizable.xcstrings in the same package, but the default behaviour of Text(_ key:tableName:bundle:comment:) is to use Bundle.main. When the default behaviour of the string extraction isn't to extract to the main app target, this introduces a very fragile system where it's easy to add code that looks localised, but ends up failing lookup at runtime. I don't feel comfortable that we will always remember to define the correct module every time we create a Text. Also, other components like Button doesn't have an init that takes a Bundle, so we would also have to remember that Button(_ titleKey:action:) can now only be used in a package if we make sure that the main bundle contains a matching key. Is there a way for u
4
0
2.7k
Sep ’23
Error Missing required module 'RxCocoaRuntime' in xcframeworks
Hi. I have a xcframework that has a dependency on 'RxSwift' and 'RxCocoa'. I deployed it using SPM by embedding it in a Swift Package. However when I import swift package into another project, I keep getting the following error: Missing required module 'RxCocoaRuntime How can I fix this? Below are the steps to reproduce the error. Steps Create Xcode proejct, make a dependency on 'RxSwift' and 'RxCocoa' (no matter doing it through tuist or cocoapods) Create XCFramework from that proejct. (I used commands below) xcodebuild archive -workspace SimpleFramework.xcworkspace -scheme SimpleFramework -destination generic/platform=iOS -archivePath ./SimpleFramework-iphoneos.xcarchive -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive -workspace SimpleFramework.xcworkspace -scheme SimpleFramework -archivePath ./SimpleFramework-iphonesimulator.xcarchive -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild -create-xcframe
0
0
523
Mar ’25
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.6k
Jun ’23
Building XCFrameworks from a hierarchy of Swift Packages
This post is meant to provide useful information on how to build a set of xcframeworks from a hierarchy of Swift Packages containing a mix of ObjC and Swift. If you only want to build a single xcframework from a Swift Package, as this is not obvious either, you should find some useful info too. Stuff that needs to be done for building an XCFramework from a Swift Package through xcodebuild set library type to .dynamic in Package.swift set SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_SWIFT_FLAGS=-no-verify-emitted-module-interface in xcodebuild command no need to use 'archive' xcodebuild command, xcodebuild alone is enough In generated framework : copy public headers (in case of ObjC package) copy (or create) module.modulemap file, or copy .swiftmodule file copy umbrella header FooPackage-Swift.h from derived data (use -derivedDataPath xcodebuild option to retrieve it) in case of Swift Package, otherwise won't be useable from ObjC copy resource bundle (if
3
0
3.8k
Nov ’23
Swift Packages + Module Stability
Hi! Support for binary dependencies in Xcode 12.0 is really a great addition to the whole ecosystem built around Swift Package Manager. Last year we learned that the non-binarySwift Packages don't work well with the module stable frameworks. Is there a plan to add a module stability to open-source Swift Packages, too? In a way that closed-source binaries could depend on open-source Swift Packages? Thanks!
0
0
651
Jun ’20
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
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.2k
Jul ’23
Consumable Product Refund Abuse
Hello, We are a mobile game company, We have encountered an issue concerning the refunds of consumable products purchased through our app. The issue arises when some Apple users request refunds after purchasing these products, and Apple approves these refund requests even if our users have already consumed it. This situation leads to financial losses and creates an unfair experience among users. We are using App Store Server Notifications V2. So how can we prevent Refunding if user used already our product
3
0
1.8k
Mar ’24
Swift Package Manager not building external dependencies correctly
I have created my own SPM through File -> New -> Package Package.swift looks like: // swift-tools-version: 5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: MyPackage, platforms: [.iOS(.v16), .macCatalyst(.v16), .macOS(.v14)], products: [.library(name: MyPackage, targets: [MyPackage]),], dependencies: [ .package(path: ../external-package) ], targets: [ .target(name: MyPackage, path: Sources), .testTarget(name: MyPackageTests, dependencies: [MyPackage]), ] ) When I run swift build the error says: '.../MyPackage/.build/arm64-apple-macosx/debug/external-package.build/external-package-Swift.h' not found and surely, when I go to directory: .../MyPackage/.build/arm64-apple-macosx/debug/external-package.build/ there are only 2 files in there: module.modulemap & output-file-map.json All source files from external-package a
Replies
1
Boosts
0
Views
982
Activity
Aug ’24
Unable to create a simple installable package
Hi, I am a newcomer in macOS development, and I am struggling to create a package with the XCode command line tools that is installable on other computers. In its minimal version, the package shall install a simple program to usr/local/: hello.c: #include int main(void) { printf(Hello Worldn); return 0; } distribution.plist: Hello World h1.pkg build.sh: #!/bin/sh cc -o hello hello.c mkdir -p local/bin cp hello local/bin/ codesign -s - -i net.world.hello local/bin/hello pkgbuild --identifier net.world.hello --root local --install-location /usr/local h1.pkg productbuild --distribution distribution.plist --resources . hello.pkg The build scrips produces a package hello.pkg. However, when I try to install it, I get : Product archive /Users/foo/hello.pkg trustLevel=100 : PKInstallRequest: failed to initialize. Error: Error Domain=PKInstallRequestErrorDomain Code=2 Specifier Description:: { URL = file:///Users/foo/h1.pkg; identifier = net.wo
Replies
2
Boosts
0
Views
1.1k
Activity
Mar ’24
String catalogs in packages
We have separated much of our UI into different packages to reduce complexity and compile time. When we recently tested using new .xcstrings string catalogs, we hit an unexpected problem. Strings extracted from SwiftUI components like Text or Button are extracted into the Localizable.xcstrings in the same package, but the default behaviour of Text(_ key:tableName:bundle:comment:) is to use Bundle.main. When the default behaviour of the string extraction isn't to extract to the main app target, this introduces a very fragile system where it's easy to add code that looks localised, but ends up failing lookup at runtime. I don't feel comfortable that we will always remember to define the correct module every time we create a Text. Also, other components like Button doesn't have an init that takes a Bundle, so we would also have to remember that Button(_ titleKey:action:) can now only be used in a package if we make sure that the main bundle contains a matching key. Is there a way for u
Replies
4
Boosts
0
Views
2.7k
Activity
Sep ’23
Error Missing required module 'RxCocoaRuntime' in xcframeworks
Hi. I have a xcframework that has a dependency on 'RxSwift' and 'RxCocoa'. I deployed it using SPM by embedding it in a Swift Package. However when I import swift package into another project, I keep getting the following error: Missing required module 'RxCocoaRuntime How can I fix this? Below are the steps to reproduce the error. Steps Create Xcode proejct, make a dependency on 'RxSwift' and 'RxCocoa' (no matter doing it through tuist or cocoapods) Create XCFramework from that proejct. (I used commands below) xcodebuild archive -workspace SimpleFramework.xcworkspace -scheme SimpleFramework -destination generic/platform=iOS -archivePath ./SimpleFramework-iphoneos.xcarchive -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive -workspace SimpleFramework.xcworkspace -scheme SimpleFramework -archivePath ./SimpleFramework-iphonesimulator.xcarchive -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild -create-xcframe
Replies
0
Boosts
0
Views
523
Activity
Mar ’25
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 🙂
Replies
6
Boosts
0
Views
2.6k
Activity
Jun ’23
Reply to 10.12.1 B3 "Could not be verified" error
Hi MacDoc...That is a good point..!!I have altered the timezone, and will redownload (again) and see what happens.I tried to install the three pkg files manually, but all I got were errors telling me things were missing, so that didn't work either.Thanks for your reply.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’16
Reply to Pre-approving network extension VPN permission with MDM
I missed the part where after loadAllFromPreferences you can check which one is connected, and re-connect to that.. This fixes my bug In pkg preinstall and postinstall we also now quit app and stray running tunnel if any + remove duplicate profiles
Replies
Boosts
Views
Activity
Oct ’24
Building XCFrameworks from a hierarchy of Swift Packages
This post is meant to provide useful information on how to build a set of xcframeworks from a hierarchy of Swift Packages containing a mix of ObjC and Swift. If you only want to build a single xcframework from a Swift Package, as this is not obvious either, you should find some useful info too. Stuff that needs to be done for building an XCFramework from a Swift Package through xcodebuild set library type to .dynamic in Package.swift set SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_SWIFT_FLAGS=-no-verify-emitted-module-interface in xcodebuild command no need to use 'archive' xcodebuild command, xcodebuild alone is enough In generated framework : copy public headers (in case of ObjC package) copy (or create) module.modulemap file, or copy .swiftmodule file copy umbrella header FooPackage-Swift.h from derived data (use -derivedDataPath xcodebuild option to retrieve it) in case of Swift Package, otherwise won't be useable from ObjC copy resource bundle (if
Replies
3
Boosts
0
Views
3.8k
Activity
Nov ’23
Reply to Missing "Products" folder when creating a framework
https://stackoverflow.com/questions/70635415/xcode-13-missing-products-folder-when-creating-a-framework It worked on me - the answer > Simple way
Replies
Boosts
Views
Activity
May ’22
Swift Packages + Module Stability
Hi! Support for binary dependencies in Xcode 12.0 is really a great addition to the whole ecosystem built around Swift Package Manager. Last year we learned that the non-binarySwift Packages don't work well with the module stable frameworks. Is there a plan to add a module stability to open-source Swift Packages, too? In a way that closed-source binaries could depend on open-source Swift Packages? Thanks!
Replies
0
Boosts
0
Views
651
Activity
Jun ’20
Package was signed with a cert that expired
With every package I install / deploy I get an error The package was signed with a certificate that has expired I view the cert, and it expires in 2020 (Office 2016 15.15.0 patchs). But it's with any .pkg file that i try on 10.11.1 (all betas). Allow from anywhere is selected in Security and Privacy.
Replies
1
Boosts
0
Views
1.3k
Activity
Oct ’15
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:
Replies
Boosts
Views
Activity
Mar ’25
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
Replies
1
Boosts
0
Views
1.2k
Activity
Jul ’23
Consumable Product Refund Abuse
Hello, We are a mobile game company, We have encountered an issue concerning the refunds of consumable products purchased through our app. The issue arises when some Apple users request refunds after purchasing these products, and Apple approves these refund requests even if our users have already consumed it. This situation leads to financial losses and creates an unfair experience among users. We are using App Store Server Notifications V2. So how can we prevent Refunding if user used already our product
Replies
3
Boosts
0
Views
1.8k
Activity
Mar ’24
Create .pkg with license
Hi, I have read the post https://developer.apple.com/forums/thread/128166 but how can I add the license agreements into the pkg? in the same way that SF Symbols installer Thanks
Replies
3
Boosts
0
Views
2.1k
Activity
Mar ’21