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.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error: returning NSURLRelationshipSame for Different Directories
I'll try to ask a question that makes sense this time :) . I'm using the following method on NSFileManager: (BOOL) getRelationship:(NSURLRelationship *) outRelationship ofDirectoryAtURL:(NSURL *) directoryURL toItemAtURL:(NSURL *) otherURL error:(NSError * *) error; Sets 'outRelationship' to NSURLRelationshipContains if the directory at 'directoryURL' directly or indirectly contains the item at 'otherURL', meaning 'directoryURL' is found while enumerating parent URLs starting from 'otherURL'. Sets 'outRelationship' to NSURLRelationshipSame if 'directoryURL' and 'otherURL' locate the same item, meaning they have the same NSURLFileResourceIdentifierKey value. If 'directoryURL' is not a directory, or does not contain 'otherURL' and they do not locate the same file, then sets 'outRelationship' to NSURLRelationshipOther. If an error occurs, returns NO and sets 'error'. So this method falsely returns NSURLRelationshipSame for different directories. One is empty, one is not. Really weird behavior. Two file path urls pointing to two different file paths have the same NSURLFileResourceIdentifierKey? Could it be related to https://developer.apple.com/forums/thread/813641 ? One url in the check lived at the same file path as the other url at one time (but no longer does). No symlinks or anything going on. Just plain directory urls. And YES calling -removeCachedResourceValueForKey: with NSURLFileResourceIdentifierKey causes proper result of NSURLRelationshipOther to be returned. And I'm doing the check on a background queue.
6
0
158
3h
unifiedContacts identifier vs contactRelations identifier
The documentation specifies that when Contacts framework returns unified contacts that each fetched unified contact object (CNContact) has its own unique identifier that’s different from any individual contact’s identifier in the set of linked contacts and that when refetching a unified contact, that this identifier should be used. There is also an analogous identifier within the list of contactRelations, but each of these don't seem to corespondent to the unified contacts. For example, is a new contact (Sheryl Zakroff) is created in the simulator Contacts and their spouse is set to Hank Zakroff. However, the GUID created for the contactRelations identifier does not correlate to the original Hank Zakroff GUID and cannot be searched. Is this a bug or what is the indent of the contactRelations identifier? Here's a debug output of walking the unifiedContacts: Name: Hank Zakroff 2E73EE73-C03F-4D5F-B1E8-44E85A70F170 - Other : (555) 766-4823 - Other : (707) 555-1854 Name: David Taylor E94CD15C-7964-4A9B-8AC4-10D7CFB791FD - Other : 555-610-6679 Name: Sheryl Zakroff DE783BC8-7917-4138-93F6-3AF0FD4CE083 - Other : (707) 555-1854 - Spouse: <CNContactRelation: 0x60000000dd60: name=Hank M. Zakroff> - 534B467D-CA00-46D3-897C-16EEA782C9CF - Looking for ["534B467D-CA00-46D3-897C-16EEA782C9CF"] []
10
0
498
10h
App review delay
I have submitted a new update on February 9th and it's still waiting for review. I will go crazy. There is no way to reach developer support as well. Can someone suggest me what should I do? I emailed, I applied for expedit review but there is no follow up.
0
1
19
10h
App Store Connect – No verification or response for production release
Hi everyone, I’m having an issue with App Store Connect regarding the production release of my app. I submitted my app and contacted App Store Connect support because I haven’t received any verification or confirmation to proceed with the production release, but I still haven’t received any response. It has been over two weeks since I first contacted them. According to Apple’s documentation, support responses usually take around 48 hours, so I’m a bit concerned. My app is currently not moving forward to production, and I don’t see any clear indication of what is missing or if additional action is required from my side. I’ve checked App Store Connect notifications and my email (including spam), but there’s nothing. Has anyone experienced a similar situation recently? Is there a recommended way to escalate this issue (specific support category, phone call, or another process)? Any help or advice would be greatly appreciated. Thank you!
0
0
9
10h
TabularData doesn't respect Double type when values match Int
Hello, I'm trying to figure out why an Int is being inferred over my explicit Double I'm parsing a CSV that contains 2 tables. I don't own the data so I'm not able to change it. The first row contains one cell that's used as a title for the document The second row is empty The third row contains one cell that's used as the header for the first table There is a header row for the table There's a dynamic number of rows for this table The an empty spacer row There is a row that's used as a title for the second table There is a header row for the table There's a dynamic number of rows for this table Im able to separate and create two DataFrame's from the data without issue. And this is the initializer I'm using. DataFrame( csvData: csvData, rows: rows, types: types, options: options ) Column names and their CSV types looks like this var types: [String: CSVType] { [ // ... "Column 38": .double, // ... ] } The data in the CSV is 0 nil nil nil 2 And this is what the one of the columns in question looks like when printed ▿ 38 : ┏━━━━━━━━━━━┓ ┃ Column 38 ┃ ┃ <Int> ┃ ┡━━━━━━━━━━━┩ │ 0 │ │ nil │ │ nil │ │ nil │ │ 2 │ └───────────┘ - name : "Column 38" - count : 5 ▿ contents : PackedOptionalsArray<Int> ▿ storage : <PackedOptionalsStorage<Int>: 0x600000206360> The docs state /// - types: A dictionary of column names and their CSV types. /// The data frame infers the types for column names that aren't in the dictionary. Since types contains the column name and it's still being inferred, my assumption is that the issue involves the renaming of the header row when it has empty cells occurs after the types are checked. Edit: After setting hasHeaderRow: false from true and adjusting my row offset, the types are now being assigned correctly. I'd recommend opening a feedback enhancement where renaming columns occurs before type assignment.
1
0
21
13h
iOS 26.2 RC DeviceActivityMonitor.eventDidReachThreshold regression?
Hi there, Starting with iOS 26.2 RC, all my DeviceActivityMonitor.eventDidReachThreshold get activated immediately as I pick up my iPhone for the first time, two nights in a row. Feedback: FB21267341 There's always a chance something odd is happening to my device in particular (although I can't recall making any changes here and the debug logs point to the issue), but just getting this out there ASAP in case others are seeing this (or haven't tried!), and it's critical as this is the RC. DeviceActivityMonitor.eventDidReachThreshold issues also mentioned here: https://developer.apple.com/forums/thread/793747; but I believe they are different and were potentially fixed in iOS 26.1, but it points to this part of the technology having issues and maybe someone from Apple has been tweaking it.
16
6
1.8k
17h
Family Controls Entitlement - Code Level Support?
Hi, Submitted Family Controls entitlement request a month ago for my main focus app, got approved within a day. Submitted 3 more requests for my extensions, and it has been 16 days without any word. Saw advice to file a code-level support with DTS in this similar forum: https://developer.apple.com/forums/thread/812934 Is there anything else I can do before filing a code-level support? Any extra info to provide? If not, can a DTS engineer please refer me for the code-level support? Thanks!
2
0
121
1d
Family Controls Entitlement Request Pending Over 2 Weeks
Hello, Our team submitted a request for Family Controls entitlements for our main app and four related extensions. It has now been a little over two weeks since submission, and the request is still pending review. We wanted to check if there are any recommended steps we can take on our end to help move the process forward. Any guidance or tips from anyone who have recently gone through this process would be greatly appreciated. Thank you.
2
0
88
1d
IsEligibleForAgeFeatures behavior in Brazil
From the Feb 24 news, I understand that for all Apple users in Brazil with iOS26.2 and newer, isEligibleForAgeFeatures will eventually return true. Brazil is a "nonregulated region", and developers will need to handle all three situations of ask first/always share/never share. Please correct me if I'm wrong above. A few questions follow on the eligibility check: What's the return value of IsEligibleForAgeFeatures for a Brazilian user who has NOT touched the age range feature at all, thus hasn't picked one of the three options? How can we test these cases? From the updated sandbox doc, there's more information on declined/approved, will those the same behaviors as a future Brazilian user? The doc used to say Texas, now it doesn't say any region. On which date will Apple START to return true for IsEligibleForAgeFeatures for Brazilian users? I cannot find the exact date anywhere. Will ALL of Brazil return true overnight, or is there some ramp up that developers need to be aware of? Thanks a lot for sharing the guidance, and thanks in advance for more guidance to come!
1
0
61
1d
DeviceActivityReportExtension: NSExtensionPrincipalClass required by App Store but rejected at runtime
I'm experiencing a contradictory validation issue with DeviceActivityReportExtension that creates an impossible situation: The Problem: Without NSExtensionPrincipalClass in Info.plist → App Store Connect rejects upload with: "Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found" With NSExtensionPrincipalClass → Local install fails with: "defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.deviceactivityui.report-extension" Setup: Extension point: com.apple.deviceactivityui.report-extension Using SwiftUI with @main attribute and DeviceActivityReportExtension protocol Xcode 16.2, iOS 17.6 deployment target Code structure: @main struct SpoolReport: DeviceActivityReportExtension { var body: some DeviceActivityReportScene { // Report scenes here } } The extension builds and runs perfectly without NSExtensionPrincipalClass, but cannot be uploaded to App Store Connect. Adding the key allows upload but breaks local installation. Is this a known issue? Is there a workaround or correct Info.plist configuration for DeviceActivityReportExtension? Thank you!
9
2
544
1d
Screen time API can be disabled easily
We have developed a Parental/Self control app using Screen time API. We have used individual authentication to authorize the app, using the instructions here: https://developer.apple.com/documentation/familycontrols/authorizationcenter The problem is , that individual auth can be disabled easily , by the following steps: enter Settings app. in Settings app, click on the Parental/Self control app. click to disable screen time restriction. show the device owner's face/fingerprint. (or pin code) Why is that a problem: Parental control apps, or self-control apps, are about giving control to the software, To make it hard for the user to disable the restrictions. So using the flow I have introduced above, it's super-easy for a user to disable his Parental control restrictions, which misses the entire point of Parental/Self control idea. Furthermore, not only the user have the means to unlock his screen time restrictions, he also MUST have the means to unlock it. This makes Screen time (with individual auth) useless: I have a code ready to make a great parental control app for my clients, with amazing ideas, but I can't use the Screen time API unless this problem is fixed. Why child-parent auth is not enough: My clients are grownups people between ages of 15-40, that are interested in self-control, so they don't have iCloud child accounts. also, the child-parent auth solution forces my clients to give some control to other person, and my clients prefer their privacy. Some of them prefer self-control and not parental-control. What I suggest as a solution: 1: Give more options to users how to disable the Screen time restrictions. including: a second faceID / FingerPrint (that isn't the same as the one used to unlock the device) a second pin password. a string password 2: Give the users the option to choose to not have the device's owner Face/Finger/Pincode ID , as a method to disable the Screen time restrictions.
16
3
6.4k
1d
Creating a Temporary Directory with NSFileManager - NSItemReplacementDirectory creates folder in user-facing location?
So I'm reworking couple things in my app. And I noticed I had this old code that does the following: Creates a temporary directory. Writes a file in the temporary directory. After the file is written moves the file out of the temporary location and places it in its final destination. Okay so I was not creating the temporary directory using the recommended API. I was simply doing something like this: NSURL *tempDirectory = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:[NSProcessInfo processInfo].globallyUniqueString]]; // Create tempDirectory and write files inside it. Now I just changed the code to use the recommended API which takes the the volume of the target destination into account: -URLForDirectory:inDomain:appropriateForURL:create:error:) and I pass in NSItemReplacementDirectory and a url to appropriateForURL so the destination volume is taken into account. Now I have external storage mounted and I use the recommended approach. I discovered NSFileManager simply writes a directory right in a user facing location titled: **(A Document Being Saved By App Name) ** and the folder is not hidden. Is this intended behavior for this API? Are temporary files supposed to be user facing? I know it is good practice to clean up temporary stuff when you are done but in crashes or just forgetting to clean up will leave these behind which isn't the behavior I expect for "temporary files." Also if the user is viewing the folder in Finder they'll see these A Document Being Saved By App Name folders appear and disappear in the window as my app does this work.
3
0
83
4d
User-initiated sharing of Screen Time metrics (FamilyControls / DeviceActivity)
Hi, We’re building an iOS app that uses the Screen Time APIs (FamilyControls and DeviceActivity) to display a user’s own usage metrics inside the app. With the appropriate permissions granted, we are successfully reading and presenting metrics such as: Total screen time Device pickups These metrics are already visible to the user inside our app. We would now like to introduce a user-initiated “Share” feature. The idea is to: Render selected Screen Time metrics into a shareable image card generated locally on device. Present the standard iOS share sheet (UIActivityViewController). Allow the user to share that image to Messages, social apps, etc., if they choose. Important clarifications: This is fully user-initiated. The app does not automatically transmit Screen Time data. The metrics are already displayed in-app with user permission. The share asset would be generated locally. No background export or server-side posting would occur unless explicitly triggered by the user via the share sheet. We are seeking clarification on whether there are any policy or API restrictions around: Rendering Screen Time-derived metrics into a user-facing share card Allowing user-initiated export of those metrics via the standard iOS share flow Are there any additional privacy requirements, entitlement constraints, or App Review considerations we should be aware of when implementing this? Thanks in advance for any guidance.
0
0
58
4d
WeatherKit Limits and Sharing
I work on an open source app called Meteorologist (https://sourceforge.net/projects/heat-meteo/). One of the sources the users are allowed to use is Apple's WeatherKit. The app is compiled by me and free to download by anybody. My developer account has the free level of WeatherKit so 500,000 calls/month and every once in a while the app actually hits that limit, shutting that weather source/service down for the app. Is there any way to ask users of the app to somehow get their own account (or already have a developer account) and can register their license so it doesn't all bump up against the one (my) "license"? If so, how would that be passed to WeatherKit? The only thought I have is that they would need to compile the code on their own and sign their own copy. Thanks for any and all feedback and thoughts. Ed
2
0
46
4d
iOS 26 beta 8 – AlarmKit – Custom sounds in Library/Sounds do not play
I put a test.mp3 (30 sec) file into the App Bundle. I scheduled an AlarmKit alarm with the file name test.mp3. The custom sound plays ✅ I copied the file from the App Bundle to Library/Sounds/test2.mp3. I scheduled an AlarmKit alarm with the file name test2.mp3. Instead of playing the custom sound, it falls back to the default sound ❌ According to the documentation, sounds placed in Library/Sounds should be playable: I filed report FB19779004 on August 20, but haven’t received any response yet. This functionality is critical for our use case, so could you please let me know whether this is expected to be fixed soon, or if I’m misunderstanding the intended behavior?
3
2
246
5d
"EVENT_TIMESTAMP" for the SensorKit phone usage report
Hello, Recently we got a question about the event_timestamps for the phone usage report in our research project: Does the event_timestamp correspond to the start point or end point of a period of interest? For example, say the event_timestamp is 2024-07-01 23:59:59 with a duration of 86400. The user is noted to have made 2 phone calls during that event_timestamp. Did those phone calls occur in the 86400 seconds prior to that timestamp (i.e., on 2024-07-01) or in the 86400 seconds after that timestamp (i.e., on 2024-07-02)? Thanks!
1
0
93
1w
Car Play Entitlement
Hi, I’m working on a proof of concept for a CarPlay application where I need to display multiple Points of Interest, such as EV charging stations and fuel stations. The app will also allow users to book a selected Point of Interest (for example, an EV charging slot). I understand that the app can be registered under the Navigation (turn‑by‑turn) category, but I wanted to check whether it is also possible to register it under the Driving Task category. I also want to know if i can Register for multiple Categories for my car play application.
0
0
72
1w
Extract raw Screen Time data? Security says it's 'expected'
Hi everyone, I have a question regarding the intended privacy limits of the DeviceActivityReportExtension. According to the documentation and the WWDC21 session "Meet the Screen Time API", this extension was created specifically to prevent the host application from accessing the user's underlying activity data (websites visited, app usage, screen time, etc). But I have found that my host app is actually able to reconstruct this raw activity data from the activity report. I am able to extract specific visited websites and app usage durations back into the main app. I reported this to Apple Security (Case ID: OE1100504480881 ), assuming it was a sandbox bypass. However, they closed the ticket stating that this is "expected behavior" and requires no fix. My question for Screen Time Engineers: Is the documentation incorrect? If my host app is expected to be able to read this data, is there a formal API we should be using instead of extracting it from the report extension? The current behavior contradicts the privacy limits described in the documentation, so I am confused if I should rely on this data access for my app features or if it will be patched later. Thanks.
1
0
301
1w