I'm getting an error running unit tests with swift test that succeed when I run them from Xcode. The units and my CoreData model are in a Swift Package. I'm loading the model using Bundle.module like so: Bundle.module.url(forResource: PersistenceController.modelName, withExtension: momd) The unit tests are able to load the CoreData model when run from Xcode and also using the xcodebuild test command line. When I run the tests with swift test I get the following error: error: cannot find type 'MyEntity' in scope Is there something more to be done to enable running CoreData unit tests from a Package using swift tests?
Search results for
missing package product
51,080 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am generating the pkg file using productbuild 3rd Party Mac Developer Installer: command. That is a Mac App Store signing identity. If you want to ship outside of the Mac App Store, you must sign your package with your Developer ID Installer signing identity. For more on this and many other hints, see my Signing a Mac Product For Distribution - https://forums.developer.apple.com/thread/128166 post. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @apple.com
Topic:
Code Signing
SubTopic:
General
Tags:
I have an app that uses SPM. One of my packages contains resources (.xib files). While trying to upload the app to TestFlight I get an error which is a known issue, pointed here: https://developer.apple.com/news/releases/?id=06232020a as a last bullet: Apps that use Swift packages containing resources are not successfully imported. As a workaround, manually remove the CFBundleExecutable keys from the Info.plist files of the embedded resource bundles. My question is how to use that workaround? My packages don't contain an Info.plist file.
While they share a lot of common architecture, which means you’ll be able to share a lot of code, there are significant differences between NE packet tunnel providers on macOS and iOS. Foremost is that macOS allows a packet tunnel provider to be packaged as either an app extension or a system extension, whereas iOS only supports appex packaging. Packaging as a sysex allows your product to be distributed outside of the Mac App Store. See TN3134 Network Extension provider deployment for all the details. If you stick with appex packaging then things are very similar to iOS. If you switch to sysex packaging there are significantly more changes: You need to activate your sysex with the System Extensions framework. Your provider then runs inside your sysex. Which runs as root, although still sandboxed. And that presents some exciting challenges for app-to-provider IPC. Oh, and with regards the iOS memory limits, those do not apply on macOS. Share and Enjoy — Qui
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I am having troubles notarizing an installer package. I created an installer package using the pkgbuild and productbuild, and then I tried to notarize it with notarytool, but I got an error message. The error message led me to Use a valid Developer ID certificate, which includes the statement Sign installer packages with a Developer ID Installer certificate The app is signed with the team Developer ID and is notarized (via Xcode). I signed both packages (during pkgbuild and productbuild) with a certificate created when I clicked Mac Installer Distribution in the developer portal, and it created a certificate named 3rd Party Mac Developer Installer: my company Is this the wrong certificate? If it is the wrong certificate, which one should I create in the developer portal? (I didn't see anything specified as Developer ID Installer) If it is the right certificate, any idea what I might have done wrong? Note: The reason I am trying to notarize the installer package is
Below is the screen-shot, did I miss any steps?This sounds kinda silly but did you scroll down on that page? Developer ID is a production certificate, and thus you should expect to find it at the end of the Production list.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I’m about to launch a fintech app with the app Name being a product of XHALESOLUTIONS LIMITED the app name is Suftkash. My question is will I be able to enroll for a developer program as XHALESOLUTIONS LIMITED because it’s registered then launch my product app under the organization XHALESOLUTIONS LIMITED
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Enterprise
Developer Program
App Store Connect
Hey guys,im trying to implement in-app purchases to my app and i cant seem to get any of products back as 'valid' from SKProductsRequest here is what i have triedI Have enabled In-App Purchases for my App IDI Have checked Cleared for Sale for my productMy project’s .plist Bundle ID matches my App IDI have generated and installed a new provisioning profile for the new App IDI Have configured my project to code sign using this new provisioning profileI am building for iPhone OS 3.0 or aboveI have tried both the full product ID and sort-hand when when making an SKProductRequestI used explicit ID like com.app.myapp (and com.app.myapp.product1 for my product id)I Have waited over a day since adding my product to iTunes ConnectMy bank details active on iTunes ConnectI Have tried deleting the app from your device and reinstallingMy IAP status is 'Waiting for Screenshot'i tried a Clean and rebuildI made a new product IDI used explicit app IDI did complete all the financial
I have been trying to compile and run an example App embedded in a Swift package, but failed. I have extracted the app and tried building it but it can't find the package and nothing I do fixes it. Can someone please let me into the secret.
I am trying to get a PKG installer through the Apple codesign and notarytool process. When I submit the PKG installer I get a status message of Invalid and when I review the log file it has 2 errors. For status summary it says: Archive contains critical validation errors, and for message it says The binary is not signed. The installer contains a flat file that is installed in the Users/Shared folder via the PKG installer. Here are the steps I've taken to get the installer through the codesign and notarytool process. codesign the file that's placed in the Users/Shared folder: codesign --options=runtime --sign 'Developer ID Application: XYZ' -v /Users/.../Documents/folder/flat file which I get a message saying signed generic. Create the PKG installer with the signed flat file. Sign the PKG installer containing the signed flat file: codesign --options=runtime --sign 'Developer ID Application: XYZ' -v /Users/.../Documents/folder/flat file which I get a message saying s
Hopefully this may help some of you. Im using Xcode 14.0 I had this same issue when building previews. I had added 2 swift packages via the built in spm in Xcode and was getting the error. Removing them from the target -> Frameworks & Libraries solved the issue for me and the preview showed as expected and the product also built successfully.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
So, here's the thing: I'm trying to use Lottie (a very nice Swift package) to render animations within my Swift Student Challenge submission playground. I'm not really sure if we're supposed to be turning our playgrounds into Xcode Workspaces, but I presume we aren't. Right? Another question is: would there be any way of adding an importable package to a playground? Adding the files to the project itself makes the folder structure very messy (and Xcode's compiler goes crazy, since the package doesn't really build itself), so that doesn't really work... Thanks in advance for helping me! ♥️
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Swift Packages
Swift Student Challenge
Xcode
I've created an installation package and it is failing to install on macOS 15.6. The package is, I believe, properly notarized, since it will install correctly on other macOS versions, including 15.5 The only clue I have is the output from installer: installer[8015] : Opened package is not the same at install time installer[8015] : Unable to use PK session due to incompatible packages. Terminating. installer[8015] : Install failed: The Installer could not install the software because there was no software found to install. The installer consists of a a single component package, and the outer product package. The component package is present, and I can successfully run installer manually to install it, so I don't think the component package is corrupt. Has anyone else encountered this? Are there any tools available to help me diagnose the issue? The logging is not helpful.
Topic:
Developer Tools & Services
SubTopic:
General
Let's say you're creating two packages on a local drive, package 'A' and package 'B'. Is it possible, in A's Package.swift file to read (from a JSON or XML file) the path to B, and then add it as a Package.Dependency? I've written my Package.swift script to do so (actually I'm resolving an alias file instead of getting the path from JSON). The problem is: although A's script definitely can read the correct relative path to B (I've logged it to the console and it's fine), no matter what I do, the build always errors out: the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try again This happens so reliably that I assume it's either the (1) script timing out, or (2) some kind of sand-boxing. Either way, the message is pretty useless. I've checked .swiftpm and I see no trace of any Package.resolved file. Deleting .swiftpm doesn't fix the issue. Can anyone shed some light? I'm out of ideas.
We are doing a Swift Package to manage our iap with storekit 2. This packages also contains the unit tests for the code. (as well as all the required files .storekit, certificate, ...) when calling SKTestSession.buyProduct(identifier: options:) we catch an error : Error Domain=SKErrorDomain Code=0 (null) Note when trying exactly the same code but in a project instead of a package that works perfectly. Any idea what could it be? The code is really simple : var testSession: SKTestSession! override func setUpWithError() throws { testSession = try SKTestSession(configurationFileNamed: Products) } func testExample() async throws { do { let productID = nonConsumable.crystal.tier1 try await testSession.buyProduct(identifier: productID) } catch { XCTFail(An error occured during purchase : (error)) } } }