What I want to achieve now is that when the app is not running, upon receiving a notification, it displays an interface similar to CallKit with accept and decline buttons.
Here is part of my code:
@available(iOS 17.4, *)
class LiveCommunicationManager: NSObject, ConversationManagerDelegate {
static let shared = LiveCommunicationManager()
var isInvalidate:Bool = false
var configuration: ConversationManager!
override init() {
let config = ConversationManager.Configuration(
ringtoneName: "notes_of_the_optimistic",
iconTemplateImageData: UIImage(named: "AppIcon")?.pngData(), // 图标的 PNG 数据
maximumConversationGroups: 1, // 最大对话组数
maximumConversationsPerConversationGroup: 1, // 每个对话组内最大对话数
includesConversationInRecents: false, // 是否在通话记录中显示
supportsVideo: false, // 是否支持视频
supportedHandleTypes: [.generic,.phoneNumber,.emailAddress] // 支持的通话类型
)
configuration = ConversationManager.init(configuration: config)
}
func reportIncomingCall(uuid: UUID, callerName: String) {
configuration.delegate = self
let local = Handle(type: .generic, value: callerName, displayName: callerName)
let update = Conversation.Update(localMember: local,members: [local],activeRemoteMembers: [local])
Task{
do {
try await configuration.reportNewIncomingConversation(uuid: uuid, update: update)
print("成功报告新来电")
} catch {
print("报告新来电失败: \(error.localizedDescription)")
}
}
}
func conversationManager(_ manager: ConversationManager, conversationChanged conversation: Conversation) {
print("会话状态改变了")
}
func conversationManagerDidBegin(_ manager: ConversationManager) {
print("会话已经开始了")
manager.delegate = self
}
func conversationManagerDidReset(_ manager: ConversationManager) {
print("会话将要清除了")
}
func conversationManager(_ manager: ConversationManager, perform action: ConversationAction) {
print("会话接听了")
configuration.invalidate()
}
func conversationManager(_ manager: ConversationManager, timedOutPerforming action: ConversationAction) {
print("会话超时了")
}
func conversationManager(_ manager: ConversationManager, didActivate audioSession: AVAudioSession) {
print("会话激活了")
}
func conversationManager(_ manager: ConversationManager, didDeactivate audioSession: AVAudioSession) {
print("会话死亡了")
}
}
在Appdelegate里设置了这些:
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable: Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
// 在这里处理离线推送通知
completionHandler(.noData) // 返回后台任务完成
if let aps = userInfo["aps"] as? [String: Any],
let alert = aps["alert"] as? [String : Any]{
// 静默推送的处理逻辑
if #available(iOS 17.4, *) {
let manager = LiveCommunicationManager.shared
if manager.isInvalidate { return }
if let msgType = userInfo["msgType"] as? Int{
if msgType == 5{
manager.configuration.invalidate()
}else{
let callerName = alert["title"] as? String ?? "Fanvil"
manager.reportIncomingCall(uuid: UUID(), callerName: callerName)
}
}
}
}
}
Xcode has been configured with the necessary capabilities, such as Background Fetch, Voice over IP, Background Processing, and Push Notification.
The issue now is that sometimes the code works as expected, allowing the app to wake up when not running and displaying the system interface with accept and decline buttons. However, after a few successful attempts, the app stops waking up, and no notification appears. But when I manually open the app, the didReceiveRemoteNotification method gets triggered.
I’d like to know why this stops working after a few times.
General
RSS for tagDelve 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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,
"This issue is blocking App store approval"
I have tried pushing my application to Appstore. However it has been rejected on the following ground:
_"As we discussed, the app uses or references the following non-public or deprecated APIs:
Frameworks/CommonLibrary.framework/CommonLibrary
Symbols:
• _SecCertificateIsValid
The use of non-public or deprecated APIs is not permitted, as they can lead to a poor user experience should these APIs change and are otherwise not supported on Apple platforms."_
I have scanned the app using "strings" tool & "otool -ov" tool.
But they have come out clean. No Non-public or deprecated APIs detected.
Please advise which tool can be used to scan the CL to locate where the deprecated API or non-public API lies and also how to rectify the same.
Thanks
Saikat Bakshi.
Topic:
App & System Services
SubTopic:
General
We're building a parental control app using FamilyControls (.child authorization). Our architecture:
Parent sends pause command → Firestore + FCM
Child receives push → NotificationService Extension triggers main app
Main app sets ManagedSettings Shields
Problem: If child disables Notifications in Settings and force-quits the app, we cannot enforce Shields.
What we've tried:
Firestore Realtime Listener (works only when app is running)
DeviceActivityMonitor (intervalDidStart/End only triggers at schedule boundaries, eventDidReachThreshold requires explicit app selection via FamilyActivityPicker)
Question: Is there a recommended approach for parental control apps to reliably enforce Shields when the child has disabled notifications? Or is this a known limitation?
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
I want to start the mail application from the development application, but the mail application made by Apple starts. It doesn't work even if I change the default email application to Outlook.
When you delete the Apple Mail app, Outlook starts. I want to automatically attach the generated pdf file to the email, but that doesn't work either.
Please tell me how to code.
Topic:
App & System Services
SubTopic:
General
When a user enables an SMS filtering extension via iOS Settings → Messages → Text Message Filtering and selects an app, the following prompt appears:
"The developer of [App Name] will receive the text, attachments and sender information in text messages from senders not in your Contacts. Messages may include personal or sensitive information like bank verification codes."
This message cannot be modified by developers, and we're receiving complaints and negative reviews from users who are alarmed by it, despite our app not collecting any data.
iOS should allow developers to customize this message or reword this message to not make false claims about data collection.
We've opened a feedback assistant report here: FB21445903
I changed the AppIcon in Images.xcassets,and distribute a new version on appstore;The icon have changed on the desktop, but elsewhere, such as when switching between apps, the top left corner shows the old version of the icon.When I restart my phone,the top left corner show the new version of the icon;My phone is iPhone 13 Pro Max,iOS 18.4.1;Is there other ways to resolve the problem without restart the phone?
Topic:
App & System Services
SubTopic:
General
I've been exploring the Trails Sample App from this session at WWDC24.
The app has a TrailEntity of type AppEntity which is leveraged in multiple places throughout the app, including:
The GetTrailInfo App Intent with a trail parameter of type TrailEntity.
A parameterized App Shortcut which calls the GetTrailInfo intent.
The TrailDataManager's init calls updateSpotlightIndex(), which creates a CSSearchableItem for each Trail in the app, along with an associateAppEntity call linking the corresponding TrailEntity to each item that gets added to the CSSearchableIndex.
If you build the app and search "trails" in Spotlight, the Trails Sample App section includes instances of TrailEntity as search results. But if you comment out the App Shortcut that takes a TrailEntity as a parameter and rebuild, there are no instances of TrailEntity in the search results. In both cases, the console prints [Spotlight] Trails indexed by Spotlight.
Is this expected behavior? Why are the TrailEntity instances only appearing in Spotlight via the App Shortcut? Shouldn't the CSSearchableItem instances show up in Spotlight on their own regardless? If not, then what is the purpose of adopting Core Spotlight with App Entities? Does this add the app entities to the semantic index for "new Siri", even though they're not user facing in the Spotlight UI?
Topic:
App & System Services
SubTopic:
General
Tags:
Shortcuts
Core Spotlight
App Intents
Apple Intelligence
Hi,
I have a question about On-Demand Resources, I tried to put some bundles into the Initial Install Tags and Download Only On Demand, and I uploaded the build to TestFlight, then I tried to make 2 builds, and the sample is like this:
Build A:
Initial Install Tags have 100 Tags.
Download Only On Demand have 5 Tags.
Build B:
all contents of Initial Install Tags are the same as in Build A.
Download Only On Demand are the same as Build A but I added 5 more tags, so the total is 10 tags, 5 tags that are the same as Build A and 5 new tags.
Then I tried to download Build A for the first time which is in TestFlight, and it runs normally, Initial Install Tags are downloaded when the main app is downloaded and Download Only On Demand is downloaded when I request the tag.
However, when I tried to update to Build B which is in TestFlight, why are the Initial Install Tags deleted? and why should it be downloaded via request? not when the main app is downloaded? has anyone ever experienced something like this?
Thanks!
I've been trying to follow Apple's testing age assurance documentation here.
After following each step and setting my user as "Texas, child 16-17, significant change declined", the AgeRangeService consistently throws the notAvailable error:
do {
let response = try await AgeRangeService
.shared.requestAgeRange(ageGates: 18, in: self)
// ...
} catch AgeRangeService.Error.notAvailable {
// Always throws this error
}
I have a third-party app installed on my iPhone 16 Pro Max, and since yesterday I've been getting the following error: "An internet connection is required to verify developer trust. Apple Development: Created via API (3GJ3LH6NRW). This app will not be available until it has been verified." Can you help me fix this? I've been told it should work again on its own in 2 to 4 days. I have a Developer account to sign apps and avoid problems; it's never given me any trouble until now.
Hey there,
We are being incorrectly blocked by Time Limits since the iOS 26 update released earlier this year. We are receiving complaints from parents that set a screentime limit for "All apps", and then add an exception for us, that they are still getting blocked by the OS after a certain period of time. While we originally thought this was fixed in 26.1, we have recently been made aware it still occurs.
Has anyone else experienced this issue? Is there something we can do from our side to protect ourselves from this? Telling customers to remove their "All app" limit isn't really practical given our customer base, so we're looking to see if there's something on Apple's end or our end that can alleviate this.
Topic:
App & System Services
SubTopic:
General
How can I talk with a human being at Apple?
Thank you,
Bud Miller
Topic:
App & System Services
SubTopic:
General
Hello,
I am currently developing a call service using CallKit and VoIP push. Recently, I have encountered a very challenging issue. During testing, when a VoIP push is received, the incomingCall gets triggered continuously, but then it automatically terminates after about 1-2 seconds. I am checking this issue under the debug scheme, and even when switching to different commits, the same problem persists.
I suspect it might be an issue with the device, but I would like to confirm the cause and find a solution. Below are some characteristics I have noticed:
On this device, when a VoIP push is received, CallKit automatically terminates, but this does not occur when debugging.
The issue always occurs when not debugging.
Looking at the device console logs related to callservicesd, there are many logs with 'invalidate' appended.
For example:
Invalidating process assertion for bundle ID from timeout
All calls ended. Clearing system uplink muted cache
Invalidate callDurationUpdateTimer
InCallService has changed process state to 2
InCallService has been suspended; invalidating its XPC client connections.
[0x565544180] invalidated because the current process cancelled the connection by calling xpc_connection_cancel()
XPC connection invalidated from client
These logs appear although our server did not receive any incoming call request, so we did not terminate it on our end. I also checked if there was a crash, but there were no reports left on the device.
Could you please share any insights into the cause or solutions for this situation?
Thank you.
Problem Description:
After upgrading to iOS 26, I discovered that the ExtendedDistanceMeasurement feature in the Nearby Interaction framework is not working as expected. On the same device model, the issue did not occur on iOS 18, but it is present on iOS 26 (including the latest iOS 26.2), and it has started affecting the functionality of my app. I hope this issue can be resolved as soon as possible.
Problem Details:
On iOS 26 and later versions (including iOS 26.2), when using an iPhone and an Apple Watch both equipped with second-generation UWB chips, enabling isExtendedDistanceMeasurementEnabled initiates the distance measurement process successfully, but the distance information fails to update. The real-time distance between the devices does not display within the app.
Affected Devices and Versions:
iPhone Model: iPhone 15 Pro Max
iOS Version: iOS 26.2
Apple Watch Model: Apple Watch 10
watchOS Version: 26.2
Example Code:
The issue can be reproduced by adding the following code to the official sample code:
Nearby Interaction Framework Sample Code
private func didReceiveDiscoveryToken(_ token: NIDiscoveryToken) {
if session == nil { initializeNISession() }
if !didSendDiscoveryToken { sendDiscoveryToken() }
os_log("running NISession with peer token: \(token)")
let config = NINearbyPeerConfiguration(peerToken: token)
// The issue can be reproduced by adding the following code to the official sample code
// Enable extended distance measurement if both devices support it
if NISession.deviceCapabilities.supportsExtendedDistanceMeasurement && token.deviceCapabilities.supportsExtendedDistanceMeasurement {
config.isExtendedDistanceMeasurementEnabled = true
}
session?.run(config)
}
Problem Behavior:
When either the iPhone or the Apple Watch does not support the second-generation UWB chip (i.e., deviceCapabilities.supportsExtendedDistanceMeasurement = false), the code works as expected.
However, when both the iPhone and the Apple Watch support the second-generation UWB chip (i.e., deviceCapabilities.supportsExtendedDistanceMeasurement = true), the code fails to work, and the distance does not update — meaning the real-time distance between the devices is not displayed.
Expectation:
I hope this issue can be resolved soon, as it is impacting my app. The problem persists in the latest iOS 26.2, and has yet to be fixed.
Hi Devs,
I’ve created an app intent shortcut for our Best Buy app. This shortcut is visible on iOS 17.2 and later. However, I’ve marked it to support iOS 16+ as shown below:
import AppIntents
@available(iOS 16.0, *)
struct LaunchIntent: OpenIntent {
why we are not able to see shortcuts for iOS 16?
Hi all — I’m building a Wallet-style transaction details view using FinanceKit and I’m running into a gap around merchant location.
What I’m seeing
FinanceKit gives me great core fields (amount, currency, status, dates, MCC, merchantName, transactionDescription), but I’m not seeing any address or place/location metadata on a Transaction.
For example, a small/local merchant where I can plausibly infer a single place:
Fetched transaction:
Transaction(
id: 8D142B16-3E0E-40B8-945A-2E7C0CF65F1D,
accountID: 14939CF4-DBC3-4A9D-8292-5FEA495B8461,
transactionAmount: 47.24 USD,
creditDebitIndicator: .debit,
transactionDescription: "Local Dental Care",
originalTransactionDescription: "Local Dental Care",
merchantCategoryCode: 8021,
merchantName: "Local Dental Care",
transactionType: .pointOfSale,
status: .booked,
transactionDate: 2025-08-20 22:27:50 +0000,
postedDate: 2025-08-21 11:22:06 +0000
)
Because this appears to be a single-location practice, I can usually resolve it to a place using MapKit search heuristics.
But for big-box chains, I don’t get enough signal to determine which store:
Fetched transaction:
Transaction(
id: 3F8E9F74-7565-4D24-9038-8FD709184799,
accountID: 14939CF4-DBC3-4A9D-8292-5FEA495B8461,
transactionAmount: 441.77 USD,
creditDebitIndicator: .debit,
transactionDescription: "The Home Depot",
originalTransactionDescription: "The Home Depot",
merchantCategoryCode: 5200,
merchantName: "The Home Depot",
transactionType: .pointOfSale,
status: .booked,
transactionDate: 2023-12-27 23:07:02 +0000,
postedDate: 2023-12-29 03:09:41 +0000
)
There’s no store number, address, phone, or any stable identifier. With hundreds of locations, I can’t deterministically choose a map pin or fetch the right brand assets.
What I’m trying to achieve
I’d like to replicate the Apple Wallet experience: show a small map snapshot and merchant visuals (logo/name that match Apple Maps / the Place Card) on the transaction detail screen. Without a location hint, I have to either:
Ask users to pick a store manually, or
Make a guess based on a coarse, app-defined region
…neither of which feels great.
Questions
Is there any way in FinanceKit today to access merchant location or a resolvable identifier (e.g., address, city/state, store number, Apple Maps place identifier, network merchant ID/MID, terminal ID, etc.)?
If not, can FinanceKit expose additional merchant metadata (even opt-in / privacy-preserving) to enable Wallet-like enrichment? A few examples that would unblock this:
merchantAddress (or components: street/city/region/postalCode/country)
merchantPhone (often unique per store)
merchantIdentifier (stable per physical location, e.g., network merchant ID / store number)
mapsPlaceURL or mapsPlaceIdentifier (linkage to the Apple Maps Place Card)
brandAssetURL (logo/brand reference similar to what Wallet shows)
With even one of the above, I could reliably:
Render an accurate map snapshot,
Fetch the correct brand assets, and
Avoid prompting the user or inferring via fuzzy search.
Context / constraints
I do not want to (and shouldn’t need to) request or monitor the user’s device location to resolve a merchant’s store location.
For small merchants, MapKit text search is often enough. For large chains, I need a store-level identifier.
If there’s an existing field or recommended approach I’m missing, I’d love pointers. If not, please consider this a feature request for richer merchant metadata in FinanceKit so developers can build Wallet-quality transaction details.
Thanks!
Topic:
App & System Services
SubTopic:
General
When updating an existing advanced app clip experience, the change doesn't actually apply. It shows the correct image in the UI, but when you use the app clip it shows the old image. Looking into it more, the status has "UPDATE_SUBMITTED". Seems related to this issue (https://developer.apple.com/forums/thread/810544) and this issue (https://developer.apple.com/forums/thread/810351).
AgeRangeService is the burning topic right now. Needless to say, Everything is so unclear.
We got our app finally into the TestFlight for QA and the product to test. only to find out that AgeAssurance for sandbox testing does not work.
There is no document confirming or denying whether and when age assurance for the App with the release configuration in test flight would work.
There isn't any guidance from Apple on whether an app that sells physical goods, such as an e-commerce app, can continue doing business as usual.
Also, there is no clarity that the Age assurance options are off, 13, unverified, 13 verified, and so on.
How those should be used.
Topic:
App & System Services
SubTopic:
General
we have three problem when using the push notification on Live Activity.
1. What is the specific callback strategy for the activityUpdates property in ActivityKit?
We found that in actual user scenarios, there is a probability that we may not receive callbacks. From the community experience, there are some resource optimization strategies that do not perform callbacks. From this perspective, the explanation is kind of vague. Is there any clear feedback to understand why callbacks are performed/not performed?
2.what is the specific description of the wake-up strategy, when background app receive Live Activity offline start Push?
From community experience, we can see that the system may wake up for a duration of 0-30s due to resource optimization strategies, or not wake up/not deal with it. Is there an official description of the wake-up strategy? or we also have to follow this description:
Wake up of apps using content-available pushes are heavily throttled. You can expect 1-2 wakeup per hour as a best case scenario in the hands of your users. so this cannot be assumed to be a reliable wake-up on demand mechanism for an app.
3 How can we determine user have selected (allow or always allow) of the Live Activity permission?
When we use real-time activity offline push, there are two system prompts in iOS:
the first prompt : allow and disallow real-time activity
the second prompt : always allow and disallow
Is there an interface that can directly determine which permission the user has chosen (allow/always allow)? (By the way, we can get disallow status).
At present, we haven't seen any interface in the official documentation/interface that can determine (allow/always allow). The difference here will affect the generation of Update Token. Without Update Token, we can not update our activity instance.
I am trying to port my sandboxed macOS app completely over to iOS using a Catalyst target and SwiftUI.
There appears to be an issue when trying to drag to the Finder in Catalyst (and in SwiftUI in General). For some reason, the Finder will not accept multiple file drops, only a single file.
On my macOS (non-Catalyst AppKit target), I overcame this by dropping multiple files to a UTType of .folder, and the OS accepted the folder. This workaround is not available for iOS because .folder is a macOS-only option.
I have a test app to illustrate the issue. Hopefully someone can help.
Download Test App
Topic:
App & System Services
SubTopic:
General