Search results for

NSCocoaErrorDomain Error Code 4

170,013 results found

Post

Replies

Boosts

Views

Activity

Reply to Facing issue with fairplay Streaming server SDK 26.0.0
This looks like a problem with your curl command. Can you try the following? curl -d @Test_Inputs/iOS/spc_ios_hd_lease_2048.json localhost:8080/fps The @ symbol is needed to send the contents of the file. Otherwise, curl just sends the filename as a string in the body of the request, and the server will respond with that error. Also, it looks like you are running from the Key_Server_Module directory, so the relative path is probably Test_Inputs instead of ../Test_Inputs.
Topic: Media Technologies SubTopic: Streaming Tags:
2h
Reply to How to remove "Developer ID Application" certificate?
Then Xcode shouldn't just add dupes of these certs. What happens is signing fails, Xcode gives no guidance. And so the Xcode UI has the option to add a new one. Then end up with dupe certs that cannot be cleaned out. Then the profiles fail if not the correct out of the 3 dupes, and signing still fails if the cert private key isn't in the keychain. Again no guidance from Xcode on any of these signing failures. Here's one error. Xcode shows Ineligible for the profile: Provisioning profile KramViewerProvision doesn't include signing certificate Developer ID Application: ... (hash...) Here's an error when the private key isn't in the Keychain. C6BA06....: no identity found Command CodeSign failed with a nonzero exit code
Topic: Code Signing SubTopic: General Tags:
3h
Reply to Create a new GitHub Remote Repository - Unknown Error
Thank you for the post. It appears that the issue is related to GitHub rather than Xcode. However, the error message could be more descriptive. Experiencing issues when trying to create a new remote GitHub repository from Xcode can be frustrating, especially when other functionalities are working fine. Can you go to the GitHub website and create the repository manually on their website? Ensure that your GitHub account has the appropriate permissions to create new repositories. You might want to try logging into GitHub via a web browser to verify your account status or as previously wrote, try to create the repo on their website and then just reference the link on Xcode. Manually Create on GitHub Website: Create the new repository directly through the GitHub website. Afterward, in Xcode, add this remote repository by going to or using the Terminal commands shown in advanced diagnostics to push your existing local project to the newly created remote. Hope this helps. Albert Pascual
  Worldwide Develop
4h
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
4h
Sharing: How I Built an IPv4/IPv6 Dual-Stack Network Diagnostic Tool for iOS
Hi everyone 👋 As a network engineer and indie iOS developer, I couldn’t find a lightweight mobile tool that fully supports IPv4/IPv6 dual-stack diagnostics — so I built NetToolbox -All-In-One Utility for engineers, DevOps, and developers. Here are its core features that solve real mobile networking pain points: One-Click Full Diagnostics: Integrates ping, traceroute, and multi-type DNS queries (A/AAAA/CNAME) — no need to switch between apps IPv4/IPv6 Dual-Stack Support: Seamlessly works in IPv6-only networks, with the ability to test connectivity differences between dual-stack environments LAN Device Scanning: Quickly identifies all devices on the same network segment and checks port availability Offline Functionality: Diagnostic logic is stored locally, enabling LAN troubleshooting without an internet connection Lightweight Design: 5MB install size, no storage bloat, and low power consumption during operation Dark Mode Support: Tailored for developers who work late at night During development, I leveraged A
1
0
23
5h
Reply to Stumped by URLSession behaviour I don't understand...
What Kevin said plus… It’s reasonable to use different approaches for different subsystems in your app. For example: If you’re fetching an audio file to play immediately, a standard session is probably best. Critically, it results in the least latency, which is important because you’re actively playing that audio. And while this requires your app to not suspend, that’s OK because you’re playing audio. If you’re downloading a large file that the user isn’t actively playing, a background session makes sense. If you’re scanning for updates, you could use a background processing task. This typically runs overnight, which is fine because the user isn’t expecting the results immediately. Unless they bring your app to the foreground and tap the refresh button, in which case you might run the same code immediately. And you can then use a continued processing task to complete the refresh. But that’s just one way to slice this. You have lots of options and it’s kinda up to you to decide which one makes sense b
6h
Stumped by URLSession behaviour I don't understand...
I have an app that has been using the following code to down load audio files: if let url = URL(string: episode.fetchPath()) { var request = URLRequest(url: url) request.httpMethod = get let task = session.downloadTask(with: request) And then the following completionHandler code: func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { try FileManager.default.moveItem(at: location, to: localUrl) In the spirit of modernization, I'm trying to update this code to use async await: var request = URLRequest(url: url) request.httpMethod = get let (data, response) = try await URLSession.shared.data(for: request) try data.write(to: localUrl, options: [.atomicWrite, .completeFileProtection]) Both these code paths use the same url value. Both return the same Data blobs (they return the same hash value) Unfortunately the second code path (using await) introduces a problem. When the audio is playing and the iPhone goes
6
0
223
6h
Provisioning profile missing entitlement
My iOS app uses CloudKit key-value storage. I have not updated the app in a few years but it works fine. Since it was last updated, I transferred the app from an old organization to my personal developer account. Now that I'm working on the app again I get an error: Provisioning profile iOS Team Provisioning Profile: com.company.app doesn't match the entitlements file's value for the com.apple.developer.ubiquity-kvstore-identifier entitlement. In the entitlement file, it has $(TeamIdentifierPrefix)$(CFBundleIdentifier) as the value for iCloud Key-Value Store. I've verified the variables resolve as expected. When I parse the provisioning profile there is no entitlement value for key-value storage. What am I getting wrong?
13
0
822
7h
Get identities from a smart card in an authorization plugin
Hello, I’m working on an authorization plugin which allows users to login and unlock their computer with various methods like a FIDO key. I need to add smart cards support to it. If I understand correctly, I need to construct a URLCredential object with the identity from the smart card and pass it to the completion handler of URLSessionDelegate.urlSession(_:didReceive:completionHandler:) method. I’ve read the documentation at Using Cryptographic Assets Stored on a Smart Card, TN3137: On Mac keychain APIs and implementations, and SecItem: Pitfalls and Best Practices and created a simple code that reads the identities from the keychain: CFArrayRef identities = nil; OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)@{ (id)kSecClass: (id)kSecClassIdentity, (id)kSecMatchLimit: (id)kSecMatchLimitAll, (id)kSecReturnRef: @YES, }, (CFTypeRef *)&identities); if (status == errSecSuccess && identities) { os_log(OS_LOG_DEFAULT, Found identities: %{public}ldn, CFArrayGetCount(identities))
10
0
1k
7h
evaluatedPolicyDomainState
Hi Apple Developers, I'm having a problem with evaluatedPolicyDomainState: on the same device, its value keeps changing and then switching back to the original. My current iOS version is 26.1. I upgraded my iOS from version 18.6.2 to 26.1. What could be the potential reasons for this issue? { NSError *error; BOOL success = YES; char *eds = nil; int edslen = 0; LAContext *context = [[LAContext alloc] init]; // test if we can evaluate the policy, this test will tell us if Touch ID is available and enrolled // success = [context canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]; if (SystemVersion > 9.3) { // test if we can evaluate the policy, this test will tell us if Touch ID is available and enrolled success = [context canEvaluatePolicy: LAPolicyDeviceOwnerAuthentication error:&error]; } else{ // test if we can evaluate the policy, this test will tell us if Touch ID is available and enrolled success = [context canEvaluatePo
4
0
706
7h
Free trial for one-time purchase: Is the $0 IAP workaround still recommended in 2026?
I have a $4 USD, one-time-purchase app (Dash Calc) and sales have been rough. In a crowded category, an paid-upfront app feels like a tough sell without a way to try it first. I’d like to offer a simple 7-day free trial followed by a single lifetime purchase, but App Store Connect still doesn’t officially support trials for paid apps. In Jan 2023, an App Store Commerce Engineer recommended the $0 non-consumable IAP + paid non-consumable IAP workaround: https://developer.apple.com/forums/thread/722874 I haven’t implemented it yet, but the subsequent discussion suggests the approach is overly complex. Handling refunds, reinstalls, activation timing, and purchase history requires non-obvious logic, and some developers report customer confusion and drop-off when presented with a $0 trial IAP. Has anything improved since 2023? Any new StoreKit APIs or App Store Connect changes that make this simpler or less error-prone? Is the $0 non-consumable IAP still the recommended approach in 2026? Any upda
2
0
158
7h
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:
7h