Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.

Post

Replies

Boosts

Views

Activity

How to force update data from child phone ? FamilyControls / Screen Time Api / DeviceActivity
The data displayed about a child’s apps can be outdated (DeviceActivityReport), leading to misinformation for the user. When I access the “Screen Time” section (for child in the parent device) in the iPhone settings, I see there is an update functionality to force load the actual data. I have tried various workarounds, such as attempting to force an update on the child’s device to call DeviceActivityReport and opening system settings, but none of these have been successful :( How can I implement something similar? Is there a way to force update this data ?
0
2
164
2w
How to add a Sticker App Extension to an existing app with an iMessage Extension?
I have a working iMessage app in the app store that does NOT have a companion app. iMessage app only. I now want to add stickers to it. I cannot get this to work; stickers do not show up in the stickers section, nor in the "Manage Sticker Apps" section. Problem exists on Xcode 16, latest OS, on all simulators and devices. I tried adding a new "Sticker App Extension" target to the project. I tried adding just the Stickers.xcassets file to the exsisting iMessage extension and the app itself. I tried googling but all examples and tutorials show how to create a complete stickers app, which works correctly. But I do not want the app. Notable mention: If I create a new "Stickers app" project it works, but if I then try to add an iMessage app extension, THAT does not work so I then have a reverse situation in which the stickers extension DOES work but the iMessage app doesn't. I somehow have the feeling that an app cannot have both an iMessage Extension and a Stickers App Extension but the documentation is, of course, in true Apple style, lacking. So how to add a Sticker App Extension to an existing app with an iMessage Extension?
1
0
254
Oct ’24
Family Controls Entitlement Request: How Long for Approval?
A few weeks ago, I submitted a request for the Family Controls & Personal Device Usage Entitlement to enable my app to access the Managed Settings and Device Activity frameworks in the Screen Time API. The app is nearly complete, with the only remaining component being the Family Controls capability. As of now, I haven’t received a response regarding the request. I’m wondering if anyone else has experienced a similar situation or can provide insight into the following: • How long does it typically take to receive feedback on this type of entitlement request? • Is there a way to check if a request is still active and under review? • Is a finished website required for the entitlement to be granted? Any information or guidance would be greatly appreciated!
2
1
267
Sep ’24
Screentime Apps - get notified when etabled or disabled
Quibr question for Apple - Context: We are developing an app that via screentime access blocks restricted sites for gamblers. However our blocking can be bypassed by going into settings→screentime->Apps With Screen time access" and toggling off access to screentime with device’s FaceID (and not the screentime passcode.) Then they can browse whatever blocked site and delete our app if they wish. Question: We would like to know if there is a way to get the information when and how many times the toggle of our app under the “Apps with screen time access” has been pressed, or its current status. 3rd waay: Alternatively is there a way to monitor if the app is still installed on the device?
1
1
242
Aug ’24
Mock Screen Time for Testing
Hi everyone, I'm trying to find out if there's a way to mock Screen Time for a specific app (either on a real device or in a simulator). Specifically, I need to set the usage time of an app to something like 15 minutes. I'm not looking to alter the total Screen Time, just the usage time for a single app. Currently, I'm manually keeping the app open for 15 minutes before I can start testing to see if the desired behavior occurs, but this process is slow and frustrating. Unfortunately, I can't reduce the 15-minute threshold, as Apple doesn't allow it for this particular use case. Any advice or solutions would be greatly appreciated!
1
0
272
Aug ’24
Schedule a Screenlock for a time in the future? (ScreenTime API))
Hello! I'm currently making an app that requires the ability to activate a screenlock for a point in the future. I currently have my project setup so that I can set a screenlock through a DeviceActivityMonitorExtension (DAM) but regardless of the time interval I use for intervalDidStart and intervalDidEnd the screenlock just seems to apply instantly. I'm under the impression that I'm missing something outside of just passing the interval to the DAM functions. Has anyone accomplished this? Thank you!
1
0
317
Aug ’24
iPhone mirroring screen switching (request & question)
iPhone mirroring is available from macOS 15. When running an app with iPhone mirroring Can I know whether the app currently being mirrored is running at the top of the Mac app or screen? Or is there a way to know whether it is hidden by another app on the Mac or re-displayed? If not, I hope it will be added in a future update. And I hope there is an API that can tell whether the current app is connected to iPhone mirroring or not.
0
0
134
3w
iPhone Mirroring UITextView Selectable
iPhone mirroring function has been added to this macOS. I am also currently using the iPhone mirroring function. However, when isSelectable is set to true in UITextView and isEditable is set to false (isScrollEnabled is also set to false.) Editing is not possible, but selection is possible. (In non-mirroring mode) But in iPhone mirroring mode, selection is not possible Is there an option for UITextView that allows text selection or a separate setting in macOS? Or can this be fixed in the iPhone mirroring app when macOS is updated in the future? (If it is a bug or error?) It seems to work normally in cases where UITextView is used but Edit is possible, such as in the memo app.
0
0
111
3w
While screen after publishing
I recently published a new version of my app (I'm fairly new to this) once it was marked ready for distribution I can see it updated in App Store and it allowed me to update. but when I open the app my previous launch screen is present then the screen gos white and stalls. what did I do wrong
1
0
113
3w
App Clip Invocation -- Apple Pass
I'd like to be able to invoke an App Clip from an Apple Pass notification. I've been using an Apple Pass store card successfully. Ideally, I'd like to be able to tap the notification to open the App Clip. I haven't seen support for this in the documentation, but I wanted to see if anyone had any creative use cases for something like this?
0
0
93
3w
widget center and control center widgets can't reload if the app is not running in background
Hi devs, my app has control center widgets and interactive widgets, both are using the same app intent to update sharing status (App Group's UserDefault). When the app is running in the background, control center widget and interactive widgets can be reloaded with correct status. However, if the app is not running in the background, I tap the interactive widget and the interactive widget can reload with correct status but the control center widget can't. Vice versa, the control center widgets can reload with correct status but the interactive widgets can't. struct ChangeAppStatusIntent: AudioRecordingIntent, CustomIntentMigratedAppIntent, PredictableIntent, LiveActivityIntent, SetValueIntent { ... // data and setup @MainActor func perform() async throws -> some IntentResult { // change the AppGroup data for app status WidgetCenter.shared.reloadAllTimelines() ControlCenter.shared.reloadAllControls() } } does any way to fix this issue?
0
0
132
3w
Issues with Multicast Operations using NWConnectionGroup and NWMulticastGroup
Hello, I've been encountering some challenges while working with NWConnectionGroup and NWMulticastGroup for multicast operations on iOS. I have a few doubts and issues that I would like to address: 1. NWMulticastGroup Initialization It seems that when initializing NWMulticastGroup, only one NWEndpoint can be passed, and attempting to pass multiple endpoints results in failure. Can someone confirm if this behavior is correct? 2. Interface Level Control Upon initializing NWConnectionGroup, it appears that packets are received on all interfaces without the ability to control this at the interface level. Is this correct? If not is there a way to configure NWConnectionGroup to receive packets on all interfaces? 3. Sending Behavior During the send operation, it appears that the data is sent through any one of the available interfaces, and there doesn't seem to be an option to configure it to send through all available endpoints. Is there a way to enable sending data through all available endpoints? Any insights, guidance, or solutions to these issues would be greatly appreciated. Has anyone else encountered similar problems or found workarounds for these limitations? Thank you for your assistance and support. Thanks, Harshal
1
0
438
May ’24
Live Activity is starting app in the background while device is locked
Our team has recently added support to our app for Live Activities where the source of the data is driven from the app itself (not push notifications). We've noticed a crash happening in our core data code caused by the following error thrown by the addPersistentStore function where it would attempt to recover and eventually crash. Here's an error we created to help us debug that contains the error details: Domain: CoreData Code: 1 NSLocalizedDescription: Error performing migration for databaseName=mydb.sqlite. Error details=The file couldn’t be saved because you don’t have permission. - userinfo: ["reason": No permissions to create file; code = 1] After some trouble shooting, we managed to reproduce the issue by doing a hard reboot while we're running a live activity. It appears that when the device starts back up, the Live Activity starts which triggers the app to hit didFinishLaunchingWithOptions which is where we get our Core Data store initialized. The problem is that our app uses Data Protection using NSFileProtectionCompleteUntilFirstUserAuthentication and we'd prefer to keep it that way. The Core Data db is present in the app sandbox and we're also seeing logs to suggest a failure trying to access NSUserDefaults as well. Is there an accepted solution for this? Is it expected that a Live Activity would cause an application to launch prior to the device being unlocked for the first time? Is there a way to change that?
5
1
636
Jul ’24
Standalone watch app design/approach for kids/family/shared watches paired with parents' phones
Hi, so, we grabbed a couple of nice new watches the other week (Ultra for dad, SE for teenage son). Mostly cool and working together (calls, messages, maps, walkie talkies, etc, etc). All good. But then son said, "Dad, why can't I see my sleep stuff like you can..?". He was right, it wasn't working. Looking around a bit, it turns out that there are a bunch of things that are turned off or not available when pairing a kids watch with dad's phone. From the Apple page: "The following features and apps are not available: Medications, respiratory rate, irregular heart rhythm notifications, ECG, AF History, Cycle Tracking, Sleep, Wrist Temperature, Blood Oxygen, Walking Steadiness, Audiobooks, Remote, News, Shortcuts and the double-tap gesture". Now dev-me reacts to this situation with: "Ok, so let's just build a little standalone sleep app for son's watch. There must be lots of parents out there who would like the same thing". And there are also a bunch of other "family sharing" enabled apps that when you try and use them on kid's phone, say "iPhone requireed", i.e, they don't apparently work with just a watch hooked up to mum or dad's phone. So before I dive into that kind of project, which seems like an obvious fix path from a dev and a parents' point of view: does anybody know if this from Apple's point of view is a hardware, a software or a legal/age limitation? What's the basic framework/dev/design issue here? Is it something on the device(s) that prevents sleep data from even being collected on family/kids paired watches? (Therefore don't bother trying to build an app); I assume not becauses it's just a normal SE used by a kid; or Is it "just" that Apple hasn't wanted to make that available without a kids iPhone too (Therefore you could certainly build a standalone app to do what Apple hasn't wanted to do); or Netiher 1 nor 2, but Apple won't even allow Sleep data collection for kids for some legal/health data reason (Therefore don't bother trying to build the app).
0
1
160
3w
Swift MacOS crash at start when using it on a Mac which is set to french language
A Swift MacOS works with no problem on Intel or ARM Macs (from 11, BigSur to 15, Sequoia) but recently I learned that is crashes when launched on a Mac which language is set to French. I'm not saying this setting is causing the issue, but is the most obvious difference observed compared to many other Macs where the App runs with no problem. The crash occurred in a MacOS intel. See excerpts from crash report below: Process: MySwiftAPP [626] Path: /Volumes/VOLUME/*/MySwiftAPP.app/Contents/MacOS/MySwiftAPP Identifier: Myinfo.MYSwiftAPP Version: X.Y.01 (1) Code Type: X86-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2021-01-05 01:47:12.0578 +0100 OS Version: macOS 12.2.1 (21D62) Report Version: 12 Bridge OS Version: 3.0 (14Y910) Anonymous UUID: 3579800E-84CC-15C4-2981-320ECF2E1400 Time Awake Since Boot: 62 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [626] Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 MySwiftAPP 0x10c6df5bb 0x10c61d000 + 796091 1 MySwiftAPP 0x10c6be4dc 0x10c61d000 + 660700 2 SwiftUI 0x7ff919a8ff0e closure #1 in AppearanceActionModifier.MergedBox.update() + 72 3 SwiftUI 0x7ff9193d2047 thunk for @escaping @callee_guaranteed () -> () + 12 4 SwiftUI 0x7ff919a91012 partial apply for thunk for @escaping @callee_guaranteed () -> () + 17 5 SwiftUI 0x7ff919bbc028 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 2414 6 SwiftUI 0x7ff919ba9fbe ViewRendererHost.render(interval:updateDisplayList:) + 359 7 SwiftUI 0x7ff919c04d56 closure #1 in NSHostingView.layout() + 126 8 SwiftUI 0x7ff919c0dce7 partial apply for thunk for @callee_guaranteed (@guaranteed NSAnimationContext) -> () + 17 9 SwiftUI 0x7ff919c023fd thunk for @escaping @callee_guaranteed (@guaranteed NSAnimationContext) -> () + 36 10 AppKit 0x7ff8113fa152 +[NSAnimationContext runAnimationGroup:] + 55 11 SwiftUI 0x7ff919c04c8a NSHostingView.layout() + 287 12 SwiftUI 0x7ff919c0508a @objc NSHostingView.layout() + 21 13 AppKit 0x7ff811435d7f NSViewLayout + 564 14 AppKit 0x7ff811435851 -[NSView layoutSubtreeWithOldSize:] + 352 15 AppKit 0x7ff811434d68 -[NSView layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 1041 16 AppKit 0x7ff811677f22 +[NSWindow windowWithContentViewController:] + 57 17 SwiftUI 0x7ff9199cd634 specialized WindowStyle.makeWindow(:) + 42 18 SwiftUI 0x7ff919b6c724 AnyWindowStyleStorage.makeWindow(:) + 26 19 SwiftUI 0x7ff91974a736 AppWindowsController.makeWindowController(:restorationID:environment:) + 2314 20 SwiftUI 0x7ff91974887d AppWindowsController.makeMainWindow(info:) + 66 21 SwiftUI 0x7ff9197487c7 AppWindowsController.makeMainWindow() + 424 22 SwiftUI 0x7ff919748067 AppWindowsController.showInitialMainWindow() + 82 23 SwiftUI 0x7ff9194e0c3e AppDelegate.applicationDidFinishLaunching(:) + 85 24 SwiftUI 0x7ff9194e0dd6 @objc AppDelegate.applicationWillFinishLaunching(_:) + 114 25 CoreFoundation 0x7ff80e9a6f23 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12 26 CoreFoundation 0x7ff80ea443f9 ___CFXRegistrationPost_block_invoke + 49 27 CoreFoundation 0x7ff80ea44376 _CFXRegistrationPost + 496 28 CoreFoundation 0x7ff80e978836 _CFXNotificationPost + 733 29 Foundation 0x7ff80f7c01be -[NSNotificationCenter postNotificationName:object:userInfo:] + 82 30 AppKit 0x7ff8113e761b -[NSApplication _postDidFinishNotification] + 305 31 AppKit 0x7ff8113e736d -[NSApplication _sendFinishLaunchingNotification] + 208 32 AppKit 0x7ff8113e4f40 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 541 33 AppKit 0x7ff8113e4b97 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 665 34 Foundation 0x7ff80f7eb194 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308 35 Foundation 0x7ff80f7eb006 _NSAppleEventManagerGenericHandler + 80 36 AE 0x7ff815043d28 0x7ff815038000 + 48424 37 AE 0x7ff815043592 0x7ff815038000 + 46482 38 AE 0x7ff81503c9c7 aeProcessAppleEvent + 419 39 HIToolbox 0x7ff8175fdc42 AEProcessAppleEvent + 54 40 AppKit 0x7ff8113df222 DPSNextEvent + 2064 41 AppKit 0x7ff8113dd3f4 -[NSApplication(NSEvent) nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1411 42 AppKit 0x7ff8113cf919 -[NSApplication run] + 586 43 AppKit 0x7ff8113a37b7 NSApplicationMain + 816 44 SwiftUI 0x7ff9191dad3f specialized runApp(:) + 161 45 SwiftUI 0x7ff919bf9c84 runApp(:) + 164 46 SwiftUI 0x7ff91970191f static App.main() + 63 47 MySwiftAPP 0x10c6be9ae 0x10c61d000 + 661934 48 dyld 0x1134d64fe start + 462 Thread 1: 0 libsystem_pthread.dylib 0x7ff80e8e5fec start_wqthread + 0 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000200000003 rbx: 0x00007f8db5915210 rcx: 0xfffffffe00000000 rdx: 0x0000000000000003 rdi: 0x00007f8db586b178 rsi: 0x00007ff8518bbf58 rbp: 0x00007ff7b38e0080 rsp: 0x00007ff7b38e0000 r8: 0x0000000000000002 r9: 0x80000000ffffffff r10: 0xfffffffe00000000 r11: 0x0000000000000001 r12: 0x00007f8db586b170 r13: 0x00007f8db586bb40 r14: 0x00007f8db586b290 r15: 0xe800000000000000 rip: 0x000000010c6df5bb rfl: 0x0000000000010297 cr2: 0x00007ff8510288e8 Logical CPU: 0 Error Code: 0x00000000 Trap Number: 6
2
0
157
4w
MusicKit Artwork url
Hi, I'm trying out the beta for music kit. In the current version of my app, my widget can show multiple albums. I preload the images of the album covers. In the beta's the url that is returned for the artwork starts with: "musickit://", which does not work with URLSession. How can I preload the data using the new url scheme? Current code:     func fetchArtworkFor (musicID: MusicItemID, url : URL?) async throws -> UIImage? {         guard let url = url else {             return nil         }         let urlRequest = URLRequest (url: url)         let data = try await URLSession.shared.data(for: urlRequest)         let image = UIImage(data: data.0)         return image     } // Some other function         for album in albumsToShow {             if let url = album.artwork?.url(width: context.family.imageHeight, height: context.family.imageHeight), let image = try? await fetchArtworkFor(musicID: album.id, url:url) {                 images[album] = image             }         }
2
1
1.4k
Jun ’22
Xcode 16 beta 6 - Widget gallery doesn't show app in iOS 15
We have minimum deployments set to iOS 15 in one of the app for both application and widget target. When install app in simulator or real device using Xcode 15.4, it works fine in iOS15, iOS16, iOS17 and iOS18 beta. When install app in simulator or real device, using Xcode 16 beta 6, it works fine in iOS16, iOS17 and iOS18 beta but in iOS 15, our app doesn't show in widget gallery.
14
10
1.3k
Sep ’24