Posts under App & System Services topic

Post

Replies

Boosts

Views

Activity

New features for APNs token authentication now available
Team-scoped keys introduce the ability to restrict your token authentication keys to either development or production environments. Topic-specific keys in addition to environment isolation allow you to associate each key with a specific Bundle ID streamlining key management. For detailed instructions on accessing these features, read our updated documentation on establishing a token-based connection to APNs.
0
0
1.3k
Feb ’25
NSManagedObjectContext save leads to _thereIsNoSadnessLikeTheDeathOfOptimism
I have been investigating a crash where saving a context leads to a crash triggered internally by Core Data. Is there any information on what exception or fatal error it is? Or any hint of any kind which leads to NSManagedObjectContext.m:1475 (seems like this line calls abort or some sort of fatal error). Seems like this happens when the app is in background. Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x000000019266a3f8 Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Terminating Process: exc handler [38173] Triggered by Thread: 9 … Thread 9 Crashed: 0 CoreData 0x000000019266a3f8 -[NSManagedObjectContext _thereIsNoSadnessLikeTheDeathOfOptimism] + 36 (NSManagedObjectContext.m:1475) 1 CoreData 0x00000001925c8fa0 -[NSManagedObjectContext save:] + 1844 (NSManagedObjectContext.m:1688) 2 MyApp 0x0000000102cc747c closure #1 in DatabaseContainer.write(_:completion:) (in MyApp) (DatabaseContainer.swift:233) + 7861372 3 MyApp 0x0000000102baab14 thunk for @escaping @callee_guaranteed () -> () (in MyApp) (<compiler-generated>:0) + 6695700 4 CoreData 0x000000019252dfe8 developerSubmittedBlockToNSManagedObjectContextPerform + 156 (NSManagedObjectContext.m:3985) 5 libdispatch.dylib 0x00000001922e2dd4 _dispatch_client_callout + 20 (object.m:576) 6 libdispatch.dylib 0x00000001922ea400 _dispatch_lane_serial_drain + 748 (queue.c:3900) 7 libdispatch.dylib 0x00000001922eaf30 _dispatch_lane_invoke + 380 (queue.c:3991) 8 libdispatch.dylib 0x00000001922f5cb4 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6998) 9 libdispatch.dylib 0x00000001922f5528 _dispatch_workloop_worker_thread + 404 (queue.c:6592) 10 libsystem_pthread.dylib 0x00000001e6e8c934 _pthread_wqthread + 288 (pthread.c:2696) 11 libsystem_pthread.dylib 0x00000001e6e890cc start_wqthread + 8 (:-1)
3
0
956
Sep ’24
unable to see apple ai responses as they are always blurred out
i’m on an iphone 15 pro max 18.1 beta. I have apple ai and no matter what i ask it i am unable to see the apple ai response as it is always blurred out? if i click copy and paste into a text or notepad the answer shows up so the ai is working and answering my commands it just doesnt show on the screen… if i put that i want the answers read to me it’ll read it but the response will still be blurred ? please someone help
0
0
345
Sep ’24
getaddrinfo AF_INET6 lasts 5 seconds on macOS Sonoma
Hello; we observe slow behavior on some macOS systems which were upgraded from macOS Ventura to macOS Sonoma. , when they are connected to the company networks. Investigation learns that the getaddrinfo call querying ipv6 is taking 5 seconds before returning. Querying information for ipv4 (ai_famlly AF_UNSPEC) returns in few mSec correct. For ipv6, I tried struct addrinfo ai_family AF_INET6 and ai_flags AI_DEFAULT , as well as AI_ALL but no help. Querying for ipv6 lasts 5 seconds. Is there a fix or workaround for this? When switching off Wi-Fi , the getaddrinfo returns in few mSec ( similar to the ipv4 check ). The version is macOS Sonoma 14.6.1 , but also observed on other Sonoma 14.x versions and other sites/companies worldwide.
5
0
396
Sep ’24
error sharing url on cloudkit share
I'm studying sharing through this link. I followed the first steps by changing the bundle identifier of the project, the tests and placing my own container in the config and in the info.plist. https://github.com/apple/sample-cloudkit-zonesharing The app appears and in the log it appears that it has managed to access my iCloud, but when I click on share and share something, the following message appears in the console, on the simulator and on the iPhone: "No options were found, providing default value for access type" "No options were found, providing default values ​​for permissions" "connection invalidated" And finally, when I click on the shared link, the following message appears: "Item unavailable The owner stopped sharing, or you don't have permission to open it."
0
0
565
Sep ’24
Bonjour not working with UI Test Target
I am trying to browse an SSH Service from UI Test Target using NWBrowser let descriptor = NWBrowser.Descriptor.bonjour(type: "_superapp._tcp", domain: "local.") let browser = NWBrowser(for: descriptor, using: .tcp) browser.stateUpdateHandler = { newState in print("browser.stateUpdateHandler \(newState)") } I get failed(-65555: NoAuth) error nw_browser_fail_on_dns_error_locked [B1] DNSServiceBrowse failed: NoAuth(-65555) I have added _superapp._tcp in Bonjour Services for UI Test Target Info.plist. I have also added Local Network Permission in UI Test Target Info.plist. Everything works fine, when I call this Bonjour service from App Target. Doesn't work when I call this from UI Test Target.
3
0
695
Oct ’24
Issues with Apple Nearby Interaction app not detecting DWM3001CDK accessory
Hi everyone, I’m having trouble getting my iPhone 11 to detect a DWM3001CDK as an accessory using the Apple Nearby Interaction app. Here’s the background: Two years ago, I successfully tested UWB ranging between the same devices (iPhone 11 and DWM3001CDK, which is based on the Qorvo DW3110 IC and an nRF52833 SoC with Bluetooth 5.2). At that time, the Nearby Interaction app was in beta and worked well for my tests. Now, with the stable version of the app, I’m encountering an issue. Here’s what I’ve done so far: I erased the DWM3001C and flashed it with the Qorvo Nearby Interaction firmware (v3.2.0, "DWM3001CDK-QANI-FreeRTOS_full_QNI_3_0_0.hex") using J-Flash Lite V7.86g on Windows. With this configuration, I can connect the iPhone 11 to the accessory using the Qorvo NI apps, both in the foreground and background. However, when I compile and run the project "ImplementingSpatialInteractionsWithThirdPartyAccessories" (available on the Apple Developer website) on my iPhone 11 (running iOS 17.7), the app remains stuck on the "Scanning for accessory" screen and doesn’t find the device, even though I’ve given the app permission to use Bluetooth. Could this be due to an issue with the firmware I flashed on the DWM3001CDK, or might there be something else causing the problem? Any help or insights would be appreciated! Thanks in advance.
0
0
575
Oct ’24
Routing packets using Packet Tunnel Provider
Hi! I am new to Apple app development so please bear with me. I am trying to design an app that can mimic some of the functionality of iptables routing. The crux of it is I would like to redirect local traffic bound for a specific port to a different port and then redirect any outgoing traffic on that port back to the original port: outgoing packet bound for IP:1234 -> 127.0.0.1:2345 outgoing packet bound for IP:2345 -> IP:1234 I tried to implement this behavior with a packet tunnel but have not made any substantial progress. Is this the right approach? Here is my implementation: private func handleConnection(_ connection: NWConnection) { connection.receive(minimumIncompleteLength: 1, maximumLength: 65536) { [weak self] data, context, isComplete, error in if let data = data, !data.isEmpty { self?.processData(data, from: connection) } if let error = error { print("Connection error: \(error)") } if isComplete { connection.cancel() } else { self?.handleConnection(connection) // Continue to receive data } } connection.start(queue: .main) } private func processData(_ data: Data, from connection: NWConnection) { switch connection.endpoint { case .hostPort(let host, let port): let portNumber = port.rawValue let hostDescription = host.debugDescription print("Received data from host: \(hostDescription) on port: \(portNumber)") if portNumber == 1234 { // Rule 1: Redirect traffic from port 1234 to 127.0.0.1:2345 redirectTraffic(data, to: "127.0.0.1", port: 2345) print("Redirecting traffic from 1234 to 2345") } else if portNumber == 2345 { // Rule 2: Redirect traffic from port 2345 to the original IP address but port 1234 redirectTraffic(data, to: hostDescription, port: 1234) print("Redirecting traffic from 2345 back to 1234") } case .service(name: _, type: _, domain: _, interface: _): print("Received bonjour service") case .unix(path: _): print("Received unix domain path") case .url(_): print("Received url") case .opaque(_): print("Opaque?") @unknown default: fatalError("Unknown endpoint type") } }
1
0
313
Sep ’24
NetworkMonitor.isConnected is always false on the watchOS
I tried building some app logic around NetworkMonitor.isConnected in my watch app (I want to trigger an update when the user opens the app and isConnected == true, otherwise observe NetworkMonitor.isConnected until it changes to true), and I found out that on a real device, NetworkMonitor.isConnected is always false. This does not seem to be documented anywhere. Am I right in assuming NetworkMonitor is not to be trusted on the watch? watchOS version is 18. I found an old post where eskimo argues that NWPathMonitor is not useful on the watch (which is also not documented), is it the same for NetworkMonitor? https://forums.developer.apple.com/forums/thread/127080
1
0
366
Sep ’24
IOS 18: How to create a custom App 'Control' that could be display in Control List?
in ios 18, we can custom two bottom button on Lock Screen, in past, they are Flash and Camera. So I want my app's function could be display in here, and I custom it, and will show a Controls List, But I can not found my app's icon. How to make a myself Control item and add it to Control List? any guideline or tutorials are welcome :D
0
0
403
Sep ’24
ControlWidget jump deep link and custom icon error
When i use Xcode16 Beta4, I finish some code for example @available(iOS 18.0, *) struct Test001ControlWidget: ControlWidget { let kind: String = "Test001ControlWidgetKind" var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: kind, content: { ControlWidgetButton(action: Test001ControlAppIntent(), label: { HStack { Image("controlcenter_point") Text("Test001") } }) }) .displayName("Test001") } } @available(iOS 18.0, *) struct Test001ControlAppIntent: AppIntent { static let title: LocalizedStringResource = "Open Demo Some Page" static var isDiscoverable: Bool = false static var openAppWhenRun: Bool = true func perform() async throws -> some IntentResult & OpensIntent { let defaultIntent = OpenURLIntent() guard let url = URL(string: Test001JumpType.sohuWatchPoint.jumpLink()) else { return .result(opensIntent: defaultIntent) } return .result(opensIntent: OpenURLIntent(url)) } } The icon can be displayed normally and icon type is png. And deep link also jump normally.(Note: The control widget file target membership are main app and widgetExtension) But iOS18 RC code is no working and icon show "?" How do I deal with these issues? I hope to hear from you soon. Tks a lot...
1
0
568
Sep ’24
促销优惠一直拉起不成功
<SKPaymentQueue: 0x30217e480>: Payment completed with error: Error Domain=ASDServerErrorDomain Code=3904 "优惠已不再提供" UserInfo={storefront-country-code=CHN, AMSServerErrorCode=3904, client-environment-type=Sandbox, NSLocalizedFailureReason=优惠已不再提供}
1
0
289
Oct ’24
CloudKit Integration Issue: Record Type Not Found
Hello everyone, I'm working on an iOS app that uses CloudKit for data synchronization. I'm encountering an issue where my app can't find the "JournalPrompt" record type in the public database. Here's the relevant code and error messages (I'm using placeholders like [APP_NAME] or [CONTAINER_IDENTIFIER]): private func fetchPromptsFromiCloud() { let container = CKContainer(identifier: "[CONTAINER_IDENTIFIER]") let publicDatabase = container.publicCloudDatabase // Create a predicate to query for the specific record let predicate = NSPredicate(format: "recordID.recordName == %@", "B6663053-FC2E-4645-938B-9FA528D59663") let query = CKQuery(recordType: "JournalPrompt", predicate: predicate) publicDatabase.perform(query, inZoneWith: nil) { [weak self] (records, error) in if let error = error as? CKError { if error.code == .unknownItem { print("JournalPrompt record type does not exist or the specific record was not found in the public database.") } else { print("Error fetching record from iCloud public database: \(error)") } return } guard let record = records?.first else { print("No record found with the specified ID in the public database.") return } print("Found record in public database:") print("Record ID: \(record.recordID.recordName)") print("Text: \(record["text"] as? String ?? "No text")") print("Creation Date: \(record.creationDate ?? Date())") print("Used Count: \(record["usedCount"] as? Int ?? 0)") print("Is Default: \(record["isDefault"] as? Bool ?? false)") } } Error When I run this code, I get the following error: Error fetching record from iCloud public database: <CKError 0x600000c072a0: "Invalid Arguments" (12/1009); "Invalid predicate: recordKey (recordID.recordName) contains invalid characters"> I've also implemented a function to check the CloudKit schema: func checkCloudKitSchema() { checkDatabase(scope: .private) checkDatabase(scope: .public) } private func checkDatabase(scope: CKDatabase.Scope) { let container = CKContainer(identifier: "[CONTAINER_IDENTIFIER]") let database = scope == .private ? container.privateCloudDatabase : container.publicCloudDatabase print("Checking \(scope == .private ? "private" : "public") database") database.fetchAllRecordZones { (zones, error) in if let error = error { print("Error fetching record zones: \(error)") return } print("Available record zones in \(scope == .private ? "private" : "public") database:") zones?.forEach { zone in print("- \(zone.zoneID.zoneName)") } let query = CKQuery(recordType: "JournalPrompt", predicate: NSPredicate(value: true)) database.perform(query, inZoneWith: nil) { (records, error) in if let error = error as? CKError, error.code == .unknownItem { print("JournalPrompt record type does not exist in the \(scope == .private ? "private" : "public") database.") } else if let error = error { print("Error fetching records from \(scope == .private ? "private" : "public") database: \(error)") } else if let records = records, !records.isEmpty { print("JournalPrompt record type exists in the \(scope == .private ? "private" : "public") database.") print("Fetched \(records.count) JournalPrompt records:") for record in records { print("Record ID: \(record.recordID.recordName)") print("Fields:") record.allKeys().forEach { key in print(" - \(key): \(type(of: record[key]))") } print("---") } } else { print("JournalPrompt record type exists in the \(scope == .private ? "private" : "public") database, but no records found.") } } } } When I run this, I get: Checking public database Available record zones in public database: _defaultZone JournalPrompt record type does not exist in the public database. CloudKit Database Setup I've set up my CloudKit Database as follows: And my data model is as follows: Despite this setup, my app can't seem to find or interact with the JournalPrompt record type. I've double-checked that my app's identifier matches the one in the CloudKit dashboard, and I've verified that the record type name is spelled correctly. Questions: Why might my app be unable to find the JournalPrompt record type, even though it's defined in the CloudKit dashboard? Is there anything wrong with my query or error handling that could be causing this issue? Are there any common pitfalls or setup steps I might have missed when integrating CloudKit? Any insights or suggestions would be greatly appreciated. I really appreciate any help you can provide.
2
0
716
Sep ’24
AccessorySetupKit - Bluetooth peripheral connects but doesn't start SMP Pairing procedure
Previously working! Now Broken. I developed a test application to establish a connection with a BLE peripheral. The application successfully connected to the peripheral, but it did not establish SMP Pairing procedure. Previously, I was able to successfully pair with the devices during the Beta phase. However, currently, I am not receiving the OS prompt to grant Bluetooth permissions. I understand that this may be a newly introduced feature in the recent releases. Could you please provide guidance on whether there is a specific flag that needs to be enabled or added elsewhere, or if this is a bug with the ASK? PLEASE HELP!!!
0
0
545
Oct ’24
iOS 18 didFinishLaunchingWithOptions called during prewaming
Hi, I have seen a lot of answers in different threads Thread 1, Thread 2 that if an app doesn't support scenes, didFinishLaunchingWithOptions shouldn't be called during prewarming. Additionally, DTS Engineer on this Thread 3 mentioned that starting from late iOS 15, didFinishLaunchingWithOptions definitely won't be called during prewarming. However, we are still seeing in our logs, that didFinishLaunchingWithOptions is called during prewarming, for some users, even on iOS 18. Our app doesn't support scenes, and our AppDelegate is completely Objective-C. The problem is that in didFinishLaunchingWithOptions we set up our CoreData and Networking stack then we make a network request to fetch data and store it in database. When the app is launching in a prewarming state, CoreData stack can't load the persistent stores because the protected data isn't accessible during prewarming. We are setting the FileProtectionType to completeUnlessOpen for NSPersistentStoreDescription, which means the Core Data files are considered protected data. When user eventually launches app, network request resumes and crashes when trying to store data in database because Persistent Stores not loaded. What would you recommend to resolve this issue? Rewriting the Core Data stack for lazy initialization is quite challenging since we're using an old library (RestKit) for networking and Core Data caching. Thanks.
1
0
533
Sep ’24
Submitting in-app purchases
I have got from App Review Team this same feedback during several months: Guideline 2.1 - Performance - App Completeness We are unable to complete the review of your app because one or more of your in-app purchase products have not been submitted for review. Next Steps To resolve this issue, please be sure to take action and submit your in-app purchases and upload a new binary in App Store Connect so we can proceed with our review. I am unable to understand and implement what is meant by the feedback: … take action … What "action" to take? … submit your in-app purchases … How to "submit in-app purchases"? I know how to submit my app but how "submitting in-app purchases”? My app contains no separate in-app purchases but several pathways through the app. The app's code contains three flags that act as signposts on user’s way through the app (Basic, Standard, Premium). The signposts are not extra content and features distributed on the App Store. They are existing parts in the app from the very beginning. They are activated according to the model user chooses (Basic, Standard, Premium) and loads down from the App Store. I try to solve the problem since several months - without success. Links offer no solution. Links say what one can do but not how to do it. What is missing are a couple of lines of code I can adapt and integrate into my app's Objective-C code. Best regards gefa
1
0
653
Oct ’24
system crash on ios and freeze
Feedback ID: FB15148112 Hello, I have submitted a feedback on feedback assistant. I am using iphone 14 pro ios 17.5.1. Since yesterday, I can not enter settings app. and on some screens my phone crashes. While deleting an app, also system crashes. Can you look at the logs at sysdiagnose_2024.09.16_23-52-06+0300_iPhone-OS_iPhone_21F90.tar.gz ? Thank you I want to share my ticket here due to current issue is very crucial for me. Ticket: Which of the following did you encounter on-screen when the system crash occurred? Gray Loading Spinner appeared over black screen What were you doing on the device just before the crash occurred? whatever i do Please describe the issue and what steps we can take to reproduce it: when i open settings, it is not opening and also when i switch between screens it freezes and shutdown with spinner. i am very sad :( i can not use my phone. it began today morning i am software engineer, i try to find log details via xcode but i could not catch it. only localization text missings error exist on logs. but i could not find the solution. please help me thank you
1
0
354
Sep ’24