Post

Replies

Boosts

Views

Activity

Location in the Background constant popups
We have a pair of apps that are used to monitor the location of a person and allow them to reach out for help when needed. The apps are designed to be used with persons with special needs. A large portion of our target audience is people that have cognitive disabilities. One app is used by people that monitor and help the person with needs, and the other is used by the person with needs who is not with them all the time. The issue we have is that our users have trouble understanding what to do when this verification popup appears. This popup continues to appear over and over and over. This is a severe health and safety issue for us. We find that the user is often times confused by the popup and is disabling the background location tracking preventing the needs provider from being able to track the location of the user. It would be great if there was a special Entitlement that could be granted that would prevent this 'feature' of iOS. Or possibly simply a setting that the user's provider can setup on their phone to stop the annoying and dangerous constant popups. If anybody knows of a way to prevent this popup, please let us know. Otherwise, if someone at Apple could suggest how we can make this happen in the future.
3
0
119
5d
Query Regarding Background Bluetooth Notification Handling in iOS
Hi, I am currently working on a mobile application for iOS that involves communication with a Bluetooth peripheral device, specifically a smart analog watch. I have some questions regarding the feasibility of certain aspects of the architecture and would appreciate your guidance. Project Overview: Functionality: The application connects to a Bluetooth peripheral (the analog smartwatch) and utilizes the Apple Notification Center Service (ANCS) to broadcast notifications to the peripheral. Notification Flow: When a notification arrives on the iPhone, and if the peripheral is connected via Bluetooth, ANCS broadcasts the notification to the peripheral. The peripheral sends the notification back to the mobile application via Bluetooth. The mobile application then sends a request to a server, which uses AI to determine if the notification needs to be displayed on the watch. If the server validates the notification, the mobile app triggers a vibration on the watch to indicate the notification. Current Status: I can receive notifications from my watch to the mobile application via Bluetooth when the app is in the foreground. Questions: I need this notification handling to work in the background or killed mode. My ideal solution involves a background service that, upon receiving a notification from the mobile app, sends a request to the server and, based on the server's response, sends a valid notification back to the watch via Bluetooth. Is it possible to implement such functionality in iOS? Specifically: Can an iOS application receive and handle Bluetooth notifications in the background or when the app is terminated? What are the best practices or recommended approaches for maintaining Bluetooth communication in background or killed mode? Are there any specific APIs or frameworks that can facilitate this kind of background operation? Thanks
1
0
83
5d
Call Blocking and Identification Not Working in iOS 18 Beta
We are experiencing an issue with the Call Blocking and Identification feature in iOS 18 Beta. This feature was functioning correctly in iOS 17, but after updating to the iOS 18 Beta, it no longer works as expected looks like iOS is blocking the number because we are getting notification but still we are getting the direct calls. We have attached the Kindly waiting for you replay. Thanks.
2
0
144
5d
SwiftData: externalStorage attribute on ios18
Hello, I'm experiencing an issue with iOS 18 Beta 3 and SwiftData. I have a model with some attributes marked as externalStorage because they are pretty large. In iOS 17 I could display a list of all my Models and it would not prefetch the externalStorage attributes. Now in iOS 18 it seems the attributes are fetched even though I don't use them in my list. It's an issue because the memory use of my app goes from 100mo on iOS 17 to more than 1gb on iOS 18 because of this. My app is configured to sync with iCloud. Anyone else experiencing the issue? Thanks Gil
1
1
103
5d
Multiple relationship variables of the the same type
Want to know if it's possible to have multiple variables of the same type? This code works but when the app loads the data again on relaunch, both variables have both the new cards and discarded cards. @Model class Player { let id = UUID() let name: String @Relationship(deleteRule: .cascade, inverse: \Card.player) var cards: [Card] = [] @Relationship(deleteRule: .cascade, inverse: \Card.player) var discardedCards: [Card] = [] init(name: String, cards: [Card]) { self.name = name self.cards = cards } } @Model class Card { let id = UUID() let name: String var player: Player? init(name: String) { self.name = name } }
0
0
67
5d
NetworkDriverKit sample app problem
Hi, I'm trying to test "https://developer.apple.com/documentation/networkingdriverkit/connecting_a_network_driver" on MacBook Pro M3 with 14.5 Sonoma, XCode 15.4, SIP is disabled. Build steps are succesful, after running App, "Install Dext" is succesful, there is no error in XCode; "systemextensionctl list" show a record for "com.apple.system_extension.driver_extension" with [ activated enabled ] tag. But, "ioreg" doesn't show any service for the dext; and no new interface with name "enXX" appears in System Settings in contrast to what the document describes. In addition, seldomly my device experiences crash when the dext remains installed where crash report points "IOReg" function. I tried also Driver Kit Sample ( https://developer.apple.com/documentation/driverkit/driverkit_sample_code ) and a github project based on this sample having last commits 9 months ago. However, Dext installation reveals similar behavior and "Communicate with Dext" step is unsuccessful with the message "Driver is not connected". Is there an updated version of Networking Driver Kit documentation to reach a running sample app for Sonoma 14.5? Thanks.
1
0
91
5d
SwiftData ModelConfiguration with GroupContainer shows Data Access alert on every launch
I'm building an app which has both iOS and macOS versions along with extensions on both platforms. I want the main app to be able to share data the extension using the group container and I want the app on both platforms sync data over CloudKit. CloudKit synchronization works like a dream. The data sharing between the app and extension on iOS works also exactly as intended. However on macOS every time the app is launched I get “MyApp” would like to access data from other apps. alert dialog. I tried initializing the ModelConfiguration both with an explicit and automatic app group container identifiers. Same results.
1
0
109
6d
MKMapview overlay renderding performance issue on iOS16
Hi , I have following scenario where I feel performance issue. Use-case: I have multiple Overlays(MKOverlay) rendered on MapView, and overlay needs to refresh on point Drag(MKPinAnnotation). I have custom logic to handle drag behaviour of annotation, on annotation drag I do update the overlay. As point update, I create new overlay with updated coordinate and re-render it. iT slow down the performance after few overlay added. Additional Notes: Performance was quite good on iOS16 but on iOS17, it lags the perforce on point drag. When I say it the performance, it point drag lags so it slow the overlay rendering. I am using MKMapView inside SwiftUI. I am sharing code-snippet where it re-render the overlay. Please help with issue in my code implementation. func renderSegments(mapView: MKMapView, segmentPoint: FencePointAnnotation, renderNeeded: Bool = true) { mapViewModel.updateFencePointOrder() guard let activeLayer = mapViewModel.activeLayer else { debugPrint("Invalid active layer.") return } let segments = mapViewModel.activeFence.connectedSegmentsOf(vertex: segmentPoint) // Remove existing overlay. for overlay in mapView.overlays { if let overlay = overlay as? FenceOverlay { if overlay.layerId == activeLayer.layerId { mapView.removeOverlay(overlay) } } else if let overlay = overlay as? FenceSegmentPolyline { if overlay.layerId == activeLayer.layerId { for segment in segments.values where segment.identifier == overlay.identifier { mapView.removeOverlay(overlay) } } } } // When vertex removed the no need to add segment if renderNeeded { if let segments = mapViewModel.updatedSegements(segment: segments.map({$0.key})) { let updatedSegments = mapView.updatedSegmentsWithOffset(segments: segments, layer: activeLayer) mapView.addOverlays(updatedSegments) } } }
2
1
86
6d
Network Connection on watchOS App
I am developing a watchOS-only app, and whenever I attempt to make a network request, it always fails and throws the following error: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." I noticed that when I turn off Wi-Fi and Bluetooth in the settings of the iPhone paired with the Apple Watch (thus disconnecting the Apple Watch from the iPhone), my app can successfully connect to the network. Additionally, when the app contains both an iOS app and a watchOS app, after granting network permissions on the iOS app, the watchOS app can access the network normally when connected to the iPhone. When opening some system apps on the Apple Watch (such as the "Workout" app), the app will display a network permission request similar to that on iOS, but this request does not automatically pop up when my watchOS app attempts to access the network. Is there a way to request network permissions in a watchOS-only app so that it can access the network while connected to the iPhone?
1
0
106
6d
NetworkingDriverKitSampleApp "driver is not connected".
Hi, I'm trying to test the NetworkingDriverKitSampleApp at https://developer.apple.com/documentation/networkingdriverkit/connecting_a_network_driver for a while but I couldn't reach the final steps described in the documentation. My setup: Xcode 15.4, MacBook Pro M3 with Sonoma 14.5, SIP is disabled. I prepared the required provisinning profiles with required entitelements. Dext and app builds successfully. Build path starts with "/Applications". "Install Dext" operation is successful without any error after allowing necessary permission. However, neither System Settings shows any new enXX interface, nor ioreg command shows a registered service while "systemextensionctl list" shows the expected result as a com.apple.system_extension.driver_extension record with [ activated enabled ]. I repeated the same steps for "Driver Kit Sample" at https://developer.apple.com/documentation/driverkit/driverkit_sample_code, "Install Dext" step succesful but "Communicate With Dext" results in "Driver is not connected" message. Similar to previous project, ioreg doesn't show any service for the dext while systemextensionctl lists [activeted enabled]. I also test an updated version of DriverKitSample at https://github.com/DanBurkhardt/DriverKitUserClientSample, which reproduced the same results. Finally, my device experiences seldom crashes after passing sleep state when the dext remains installed; where crash report points "IOReg". Is there any lacking steps on Apple documentation for Sonoma 14.5 or XCode 15.4 versions? Thanks.
1
0
74
6d
iOS 18: Detect iPhone Mirroring
Is there a way for an iOS app to detect if it is being mirrored to a Mac using a new iPhone Mirroring feature, introduced in iOS 18 and macOS 15 Sequoia? I believe there are a dozen use-cases an app developer may want to know such a thing. For example, imagine rewarding a user for performing some tasks. Performing a task using iPhone Mirroring would give some users advantage, which would have to be weighted in.
1
0
105
6d
macOS: Broadcast Wi-Fi Direct Hotspot - Host AP Mode
I want to make a program which configures my Mac to broadcast a Wi-Fi Direct hotspot: a peer-to-peer network without an internet connection which is joinable by other devices including non-Apple devices (e.g. Android devices). This connection would allow for low latency comunication between external devices and my Mac without the need for extra Wi-Fi router hardware. From my understanding, the Mac network interface must be configured to be in Host AP (Access Point) mode so that it can host other connections. How can I write a program which enables Host AP mode and broadcasts a Wi-Fi hotspot from my Mac? Note: I do not want to create an Ad-Hoc (IBSS) connection because Android devices do not support joining this kind of Wi-Fi connection. Many years ago, it was possible to set the Mac Wi-Fi interface to Host AP mode via a function in CoreWLAN: CWInterface.startHostAPModeWithSSID. You can see this function referenced in this gist. But sadly, this function is no longer accessible. At this point in time, I see no way in the CoreWLAN library to set a CWInterface to be in hostAP interface mode, although the CWInterfaceMode.hostAP enumeration suggests this is possible. It is possible to enable Host AP mode via the Settings app > Sharing > Internet Sharing settings. But this requires a legitimate internet connection to be present. For my use case, I do not want a connection to the internet. I simply want to allow devices to communicate with my Mac directly, peer-to-peer over Wi-Fi. Is there any alternative? Could I implement this functionality in a Network Extension or Kernel Extension? Thank you all for any help you can provide!
3
0
61
6d
On Demand Resources Not Working in Release Build for Real Device
I have implemented On Demand Resources (ODR) in my iOS app using Swift. The ODR feature works correctly when running the app directly from Xcode 15.3. However, when I archive the app and install the release build on a real device, the ODR feature fails to function as expected. I followed up this doc. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html#//apple_ref/doc/uid/TP40015083-CH2-SW1 I have read that adding specific entitlements for ODR might be necessary, but I'm unsure how to properly configure this.
0
0
48
6d
CoreBluetooth Advertising and Scanning Issue in iOS 18/iPadOS 18 Beta 3
Hello, Has anyone encountered issues with CoreBluetooth advertising and scanning between iOS 18/iPadOS 18 Beta 3 ? I'm want to know this is a bug or an intended change in behavior. Issue Summary: Central device on iOS 18/iPadOS 18 Beta 3 (foreground) and Peripheral device on iOS 17.5.1 (background) fail to communicate via BLE advertising. The reverse setup or using non-iOS 18 devices works as expected. Detailed Description: I am developing an iOS/iPadOS application using CoreBluetooth for advertising and scanning. Here are the specifics of my setup: The application uses a fixed BLE service UUID, and scanning is performed with the specified service UUID. Background Modes Uses Bluetooth LE accessories and Acts as a Bluetooth LE accessory are enabled to allow advertising and scanning even when the app is in the background. When the Central device is running iOS 18/iPadOS 18 Beta 3 and the app is in the foreground scanning, and the Peripheral device is running iOS 17.5.1 with the app in the background advertising, the Central device cannot receive the advertisements from the Peripheral device. ( CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:) don't work.) In the reverse scenario (Central on iOS 17.5.1 in the foreground scanning, and Peripheral on iOS 18/iPadOS 18 Beta 3 in the background advertising), the advertisements are received correctly. Additionally, advertisements are received correctly in cases where both devices are not on iOS 18/iPadOS 18. I am wondering if anyone else has encountered this issue or if there is any information available regarding whether this is a bug or an intended behavior change in iOS 18/iPadOS 18. Thank you.
1
1
209
6d
Connect a Mac and a Watch via Core Bluetooth
Hello! I currently have a pair of apps that can connect a Mac and an iPhone and communicate to each other. I've been trying to do the same between a Mac and a Watch. In my current implementation, the Mac is the central and the iPhone is a peripheral. But according to some internet search, it seems that Watch can only be the central. Is this true, and still the case now, please? If so, can I use the Watch as the central and the Mac as a peripheral? Thank you!
1
0
101
6d
Version 15.4 (15F31d) Xcode NSAppleScript of Safari broken
All attempts to script Safari in Xcode using NSAppleScript returns the following message. error: { NSAppleScriptErrorAppName = Safari; NSAppleScriptErrorBriefMessage = "Application isn\U2019t running."; NSAppleScriptErrorMessage = "Safari got an error: Application isn\U2019t running."; NSAppleScriptErrorNumber = "-600"; NSAppleScriptErrorRange = "NSRange: {32, 3}"; } Latest script attempt: func getHTML() -> String { let source = """ tell application "Safari" get URL of tab 1 of window 1 end tell """ //print(source) var a = "hello" var error: NSDictionary? if let scriptObject = NSAppleScript(source: source) { if let scriptResult = scriptObject.executeAndReturnError(&error).stringValue { a = scriptResult print(scriptResult) } else if (error != nil) { print("error: ",error!) } } return a }
3
0
146
6d
RFID connection between iPhones
Hi, I'm inquiring in regards to the feasibility or possibility of making a connection from iPhone to another, such that one iPhone uses Apple wallet, and another iPhone would detect for the signal within the app. Please let me know if this is feasible or if any more information would be necessary to assist. If this is possible, what documentation would be relevant? Thank you.
1
0
144
6d
Cannot connect to local network devices via TCP when the application is not in the Applications folder
It looks like that, with Sequoia, it is not possible to open an NSURLSession or any other TCP connection to a machine on the local network if the application is not in the "Applications" folder. That is pretty inconvenient when debugging or running via Xcode since the build folder is not within the Applications folder. And, yes, the NSLocalNetworkUsageDescription key and description strings are in the Info.plist file (and it asks for permission). How can we expect to debug applications like that ? Is anybody else experiencing this ?
2
1
131
6d
Request of CarPlay Navigation Entitlement when having the Driving Task one
I have the CarPlay Entitlement "Driving Task" and two of my apps use it. Now, in both apps, I have implemented Navigation. I requested the Navigation CarPlay Entitlement when the feature was mature and builds were available in Test Flight, since I wanted to release the new versions of the apps with navigation available both on the iPhone and in CarPlay. I got no answer to my request, so I decided to release the apps with only navigation in the iPhone and the Driving Task functionality in CarPlay, thinking that maybe being live with navigation in the App Store was a requirement. I have asked permission again, and so far, the request is being ignored again. What are the requirements to get the Navigation CarPlay Entitlement? If the app is approved for navigation, is there something else the app must do to get the entitlement? Requirements for CarPlay Entitlements seem quite obscure, are they listed anywhere? Is there a technical problem to move from an existing CarPlay Entitlement to another? Can that be the reason the entitlement has not been granted? Some of my competitors have the CarPlay Navigation entitlement. My use case is the same (in a better app in my opinion, of course). But I am only getting bad reviews because "the app does not include the map in CarPlay" after the big investment in implementing navigation in the apps. Any help or insight would be appreciated.
0
0
115
6d