Posts

Post not yet marked as solved
0 Replies
205 Views
Hello, I've successfully tested my macOS app's subscription purchases in Sandbox mode, but I'm unsure how to test in Production mode, as I read that "Developer ID" profiles don't allow testing subscription purchases. Since Mac can't use an Ad Hoc profile, is there a recommended method for testing in-app purchases in Production mode for macOS apps? I need to test by myself (preferring to avoid Test Flight, if that is even an option for this purpose). My app subscription processes work in the Sandbox environment, but an Apple reviewer could not retrieve the subscription details. (I'm using RevenueCat and see nothing that I need to change). Thank you for your assistance.
Posted
by PhillipW.
Last updated
.
Post not yet marked as solved
2 Replies
1.1k Views
Development Environment: Xcode Version: 14.3.1 macOS Ventura Version: 13.6.2 Architecture: Intel I am developing a macOS app with an accompanying XPC service and am encountering an issue where the XPC connection is immediately invalidated upon trying to establish it. The error message received is: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.appname.macos.app-name-xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.appname.macos.app-name-xpc was invalidated: failed at lookup with error 3 - No such process.} Here's what I have verified so far: The XPC service has the correct CFBundleIdentifier and is located within the Contents/XPCServices directory of my app's bundle. Info.plist for the XPC service has ServiceType set to Bundled. The XPC service target's Installation Directory is the default location for XPC services (@executable_path/../XPCServices). Code signing and entitlements have been verified for both the main app and the XPC service, and disabling the sandbox doesn't resolve the issue. The main app and XPC service are part of the same App Group, and both have the App Sandbox capability enabled. Here's a snippet of the Swift code that establishes the XPC connection: let xpcConnection = NSXPCConnection(serviceName: "com.appname.macos.app-name-xpc") xpcConnection.remoteObjectInterface = NSXPCInterface(with: ServiceProtocol.self) xpcConnection.resume() And here's the ServiceProtocol for reference: @objc public protocol ServiceProtocol: NSObjectProtocol { @objc func executeUnixExecutable(arguments: [String], completionHandler: @escaping (ResultType) -> Void) func interruptUnixExecutable() func closeUnixExecutablePipes() } When I run the app, the connection is invalidated without any further details as to why. I'm not sure if I'm missing a configuration step or if there's an issue with my XPC service setup. Has anyone experienced this issue or have suggestions on what else I can check to resolve this?
Posted
by PhillipW.
Last updated
.