Search results for

NSCocoaErrorDomain Error Code 4

170,013 results found

Post

Replies

Boosts

Views

Activity

Reply to NSKeyedArchiving issue
Hey Quinn, thanks for all the material. I realize that I have a basic issue in my code. data is not loaded. In the previous version, archiver had a connection to data let archiver = NSKeyedArchiver(forWritingWith: data) That's no more the case, so data is empty, hence the problems. let data = NSMutableData() let archiver = NSKeyedArchiver(requiringSecureCoding: true) archiver.encode(myObject, forKey: theKey) archiver.encode(myObject2, forKey: theKey2) archiver.finishEncoding() do { try data.write(to: an uRL, options: []) // data is empty of course ! } catch { } So should I replace: archiver.encode(myObject, forKey: theKey) archiver.encode(myObject2, forKey: theKey2) archiver.finishEncoding() do { try data.write(to: anURL, options: []) // So object and object2 are on file with let data = try! NSKeyedArchiver.archivedData(withRootObject: myObject, requiringSecureCoding: true) let data2 = try! NSKeyedArchiver.archivedData(withRootObject: myObject2, requiringSecureCoding: true) archiver.finishEncoding()
Topic: App & System Services SubTopic: General Tags:
8h
Have developer registrations been suspended?
I purchased a developer account approximately 4 days ago, on Saturday. The payment was successfully charged to my card and I have the receipt, but I have not received any approval. The status is still PENDING, and we are about to enter the 5th day without approval. How can this issue be resolved? We are also not receiving any responses to our support tickets.
0
0
76
8h
Program Purchase and Renewal
I purchased a developer account approximately 4 days ago, on Saturday. The payment was successfully charged to my card and I have the receipt, but I have not received any approval. The status is still PENDING, and we are about to enter the 5th day without approval. How can this issue be resolved? We are also not receiving any responses to our support tickets.
0
0
49
8h
Reply to DNS Proxy system extension – OSSystemExtensionErrorDomain error 9 “validationFailed” on clean macOS machine
Thanks for the clarification about Developer ID vs Apple Development and for the links. Previously I started with Developer ID and the dns-proxy-systemextension entitlement, but per your advice I’ve now switched both the host app and the DNS Proxy system extension to Apple Development signing and the legacy dns-proxy value. Current Apple Development setup macOS: 15.7.3 (24G419) Xcode: 26.2 (17C52) Host: com.example.agent.MyMacProxy DNS Proxy system extension: com.example.agent.MyMacProxy.dnsProxy System extension entitlement: xml com.apple.developer.networking.networkextension dns-proxy System extension Info.plist (built .systemextension inside the host app): xml NSExtension NSExtensionPointIdentifier com.apple.system_extension.network_extension NSExtensionPrincipalClass MyMacProxy.DNSProxyProvider There is no NetworkExtension key in this plist (confirmed with plutil -p on the built .systemextension in both DerivedData and /Applications). The system extension is embedded at: MyMacProxy.app/Contents/Library/Sy
8h
TestFlight on Mac
I’m having an issue installing my TestFlight build on a Mac. The build (v1.0 build 1) uploads successfully and shows as “Complete” in App Store Connect. I can also open the build details page, and my Apple ID / tester access / group setup looks correct. However, on TestFlight (macOS), when I tap Install/Load, I get this error: Unable to install. The requested app isn’t available or can’t be found. Notes: The app is an iOS app (iPhone + iPad), and I enabled availability for Mac (Designed for iPad) in App Store Connect. The Mac is Apple Silicon, running macOS Tahoe 26.1. Could you help me understand why TestFlight shows this message on Mac, and what I should change in Xcode/App Store Connect to make the build compatible?
1
0
40
8h
Reply to Reduce dyld overhead
OK. I don’t think you can optimise beyond that. Rather, I think you should use that as a baseline for performance work as you evolve your program. Speaking of that, An Apple Library Primer has links to various WWDC talks where the linker team discusses various topics. Most notably, the 2022 talk discusses launch times. It’s well worth a watch. Finally, just for context, the libSystem initialiser does a bunch of really critical stuff. For example, it has the code that sets up the App Sandbox, if the executable enables it. If you want to see this initialiser in action, open your true clone project, set a symbolic breakpoint on libSystem_initializer, and run it from Xcode. When you stop at the breakpoint, Xcode will show a page of disassembled code, but that’s not too hard to understand. And most of the symbols are present, so you can look up the source code in Darwin. IMPORTANT The Darwin open source isn’t guaranteed to match the source used to build the OS, but it’s usually close eno
Topic: App & System Services SubTopic: Core OS Tags:
8h
Reply to NSKeyedArchiving issue
Hey Claude31, it’s nice for me to be helping you for a change (-: It’s hard to tell exactly what’s going wrong here without know more about the objects in play. However, in general, when you decode something from a secure keyed archive, you have to tell the system what type you’re expecting. That’s the key factor is what makes it secure. Over the years I’ve helped a bunch of folks with problems like this. All of these threads have code snippets from me that you should find useful: Question about including all project classes in ofClasses parameter when using NSKeyedUnarchiver.unarchivedObject(ofClasses:from:) Fragment large size data sent and received using NSKeyedArchiver.archivedData in GameCenter Unarchiving an object with custom classes XPC, Swift, ObjC, and arrays NSKeyedUnarchiver decodeObjectOfClasses failed NSKeyedUnarchiver decodeObjectOfClasses failed 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead NSkeyedArchiver fails when trying to archive sub
Topic: App & System Services SubTopic: General Tags:
9h
State loss and sheets dismiss on backgrounding app
I've been hitting a weird SwiftUI bug with navigation and state loss and I've managed to reproduce in a very tiny sample project. I've submitted a Feedback FB21681608 but thought it was worth posting here incase any SwiftUI experts can see something obviously wrong. The bug With deeper levels of navigation hierarchy SwiftUI will dismiss views when backgrounding the app. Any work around would be appreciated. This happens in a real app where we have to navigate to a settings screen modally and then a complex flow with other sheets. Sample code Happens in the simulator and on device. import SwiftUI struct ContentView: View { @State private var isPresented = false var body: some View { Button(Show first sheet) { isPresented = true } .sheet(isPresented: $isPresented) { SheetView(count: 1) } } } struct SheetView: View { private enum Path: Hashable { case somePath } @State private var isPresented = false var count: Int var body: some View { NavigationStack { VStack { Text(Sheet (count)) .font(.largeTitle) /
Topic: UI Frameworks SubTopic: SwiftUI
1
0
66
9h
App Store Connect rejects screenshot upload: “incorrect size” (subscription purchase flow) — tried all documented sizes
Hello Apple Developer Forums, I’m preparing to submit an app update that includes an in-app subscription. As part of the submission, I need to provide screenshots showing where the user initiates and completes the subscription purchase flow. The issue is that App Store Connect keeps rejecting my screenshot upload with an “incorrect size” (or size invalid) error. I have already tried exporting the screenshot in all sizes and resolutions described in Apple’s documentation, but none of them are being accepted so far. Could you please advise: What exact pixel dimensions / format requirements App Store Connect currently enforces for these screenshots (including file type and color profile, if relevant)? Whether there are any known issues or common causes for this error (e.g., metadata, alpha channel, scaling, or export settings)? Any recommended workflow/tools to generate a compliant screenshot that reliably uploads? Thank you in advance for your help.
3
0
64
9h
using com.apple.CommCenter.fine-grained entitlement in app clip
Hi, I am using a carrier account and have been able to use com.apple.CommCenter.fine-grained entitlement successfully for the past few years. Currently I am trying to use this entitlement in an app clip. but recieving the following error: Validation failed (409) Invalid entitlement. App clip 'xyz.app/AppClips/appClip.app' contains a code signing entitlement 'com.apple.coretelephony.SimAuthentication.allow' that is not supported. Remove the 'com.apple.coretelephony.SimAuthentication.allow' entitlement. (ID: 87f67652-0e22-441d-b7ec-ea4baacab39e) NSUnderlyingError : Validation failed (-19241) Invalid entitlement. App clip 'xyz.app/AppClips/appClip.app' contains a code signing entitlement 'com.apple.coretelephony.SimAuthentication.allow' that is not supported. Remove the 'com.apple.coretelephony.SimAuthentication.allow' entitlement. status : 409 Is it possible to use com.apple.CommCenter.fine-grained entitlement in an app clip? if so do you have any suggestion how to resolve this error
2
0
76
12h
NSKeyedArchiving issue
I have a large code that I try to update to change deprecated APIs. In the former version, I used forWritingWith and forReadingWith let data = NSMutableData() let archiver = NSKeyedArchiver(forWritingWith: data) archiver.encode(myObject, forKey: theKey) if let data = NSMutableData(contentsOf: anURL) { let unarchiver = NSKeyedUnarchiver(forReadingWith: data as Data) let myObject = unarchiver.decodeObject(forKey: theKey) as! TheObjectType // <<-- returns the object That I changed to let data = NSMutableData() let archiver = NSKeyedArchiver(requiringSecureCoding: true) archiver.encode(myObject, forKey: theKey) if let data = NSMutableData(contentsOf: anURL) { do { let unarchiver = try NSKeyedUnarchiver(forReadingFrom: data as Data) let myObject = unarchiver.decodeObject(forKey: theKey) as? TheObjectType // <<-- This returns nil This builds correctly. But on execution, unarchiver.decodeObject now returns nil. I have searched extensively to find the cause to no avail. I may probably change the
2
0
66
12h
Need clarify the behavior of QR Code button on `Tap to Pay on iPhone` Figma design
Hi Apple team, We're planning to integrate Tap to Pay on iPhone feature in our product, and found there's a QR code button on the your Figma design: https://www.figma.com/design/2SOXmeLvimllvT67MTMLOy/Tap-to-Pay-on-iPhone--Community-?node-id=0-1&t=E3XskpsLctTuZvg5-1 Questions: is there any official documentation about the QR code button on this screen? What happens when user clicks on QR button? What're the suggestions to show/hide that button, and can we customize it? Thanks.
0
0
42
13h
How to add matter device to my own Fabric,Use Matter Support SDK
I want to add matter device to my own fabric,not same as to homeKit in Home APP I implemented a demo which add a matter support extension, and it can success, but I use MTRDeviceController to commission,it go wrong, blow is the log Couldn't read values in CFPrefsPlistSource<0x1062ec100> (Domain: group.wxx.MatterTest, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd <<5 [E:46634i S:0 M:188511265] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4) PASESession timed out while waiting for a response from the peer. Expected message type was 33 controller(:commissioningSessionEstablishmentDone:) error = nil Error on commissioning step 'AttestationVerification': 'src/controller/CHIPDeviceController.cpp:1288: CHIP Error 0x000000AC: Internal error' Failed verifying attestation information. Now chec
0
0
9
13h
PHImageManager.requestImageDataAndOrientation callback is never called
I occasionally receive reports from users that photo import from the Photos library gets stuck and the progress appears to stop indefinitely. I’m using the following APIs: func fetchAsset(_ asset: PHAsset) { let options = PHImageRequestOptions() options.deliveryMode = .highQualityFormat options.resizeMode = .exact options.isSynchronous = false options.isNetworkAccessAllowed = true options.progressHandler = { (progress, error, stop, info) in // 🚨 never called } let requestId = PHImageManager.default().requestImageDataAndOrientation( for: asset, options: options ) { data, _, _, info in // 🚨 never called } } Due to repeated reports, I added detailed logs inside the callback closures. Based on the logs, it looks like the request keeps waiting without any callbacks being invoked — neither the progressHandler nor the completion block of requestImageDataAndOrientation is called. This happens not only with the PHImageManager approach, but also when using PHAsset with PHContentEditingInputRequestOptions — t
2
0
53
13h