PDFKit’s characterIndex(at:) method consistently returns the incorrect character index on iOS 17. It seems to get worse the further down the page you get. This breaks critical functionality that my app relies on. Prior to iOS 17, it would be wrong sometimes but not as consistently.
This is the method in question:
https://developer.apple.com/documentation/pdfkit/pdfpage/1503775-characterindex
I've filed feedback FB12951475 with a sample project attached.
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.
Post
Replies
Boosts
Views
Activity
Hi folks,
there's currently a known issue in TipKit due to which it won't show popover tips on buttons that are inside a SwiftUI ToolbarItem. For example, if you try this code, the popover tip will not appear:
ToolbarItem {
Button(action: {...}) {
Label("Tap here", systemImage: "gear")
}
.popoverTip(sampleTip)
}
There's an easy workaround for this issue. Just apply a style to the button. It can be any style. Some examples are bordered, borderless, plain and borderedProminent. Here's a fixed version of the above code:
ToolbarItem {
Button(action: {...}) {
Label("Tap here", systemImage: "gear")
}
.buttonStyle(.plain) // Adding this line fixes the issue.
.popoverTip(sampleTip)
}
Hope this helps anyone running into this issue.
I'm looking to migrate my users ClockKit complications to WidgetKit in my next app update. I can only do this for WatchOS 10 users because the APIs are too limited for WatchOS 9 (eg. Widget corner round text not available). But I do need to do this for WatchOS 10 users in order to get in the Smart Stack.
When I tried to mark my getWidgetConfiguration method in my ComplicationController.swift with:
@available(watchOS 10.0, *)
it complains and says: Protocol 'CLKComplicationWidgetMigrator' requires 'getWidgetConfiguration(from:completionHandler:)' to be available in watchOS 9.0 and newer
I then tried modifying my WidgetKit extension to only support WatchOS 10. This seems to work for a while but at some point WatchOS 9 devices still try the migration and crash with symbolNotFound DYLD issues for the WidgetKit extension which shouldn't even be embedded in the WatchOS 9 builds! (all visible in iPhone Analytics data crashes)
So I'm not sure what else to try. I've researched a lot in docs etc... but can find no official way to achieve this.
Our application already supports an iMessage Extension, allowing users to create and send custom or trending stickers.
On iOS 17.0, a popup menu replaces the old tab in iMessage with a "Stickers" option, and iMessage extensions are put in the "More" option.
The "Stickers" page only shows the Sticker Pack Extension. However, an application can only support Sticker Pack Extension or iMessage Extension. Get this error: "Multiple message payload provider extensions found in app but only one is allowed".
Is there any workaround here? We want our application to keep the iMessage extension but also provide sticker packs.
Scenario: We have a museum where each exhibit has a UWB BLE accessory. A user moves around the museum with their phone application in the background. Once a user enters an exhibit area (Determined by UWB distances) a background task is initiated (audio/notification/widget).
The Question: In our current understanding of the protocol, the user must pair to each exhibit anchor beforehand, significantly impairing the user experience and bloating their Bluetooth-paired device list. Is it possible now or potentially in the future to not require pairing for pre-approved devices? Alternatively, pairing to a hub that acts as an intermediary between the phone and accessories also seems like an appropriate compromise.
Was watching this latest WWDC 2023 video and had a question. I see about 17:20 in, they mention you can now put the shortcut provider in an app intent extension.
https://developer.apple.com/videos/play/wwdc2023/10103/
This works fine by itself and I can see all my shortcuts and use siri, but as soon as I try to call into the extension from the main app in order to trigger updateAppShortcutParameters() or any other code, I get a linker error. Am I doing something obvious wrong? Note, I called it a framework, but it Is just an extension. Cant figure out how I am supposed to be calling this method.
Any help is greatly appreciated!
https://developer.apple.com/documentation/appintents/appshortcutsprovider/updateappshortcutparameters()?changes=_4_8
https://imgur.com/a/yDygSVJ
Running my app in iOS 17 has a weird bug. I can draw as usual on my canvas, but only when I open the color picker from the toolPicker a bunch of weird errors and warnings are posted to the console (I am assuming they are related to it.) Closing the color picker and leaving the screen would normally dismiss the toolbar, but now it stays forever and on every screen. Interestingly the canvas, the tool picker and the viewController are all getting deinitialized, which means there is a second/new toolPicker on screen and I have no reference to it.
Here are the mentioned warnings and errors:
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)}>
Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}
elapsedCPUTimeForFrontBoard couldn't generate a task port
Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}
elapsedCPUTimeForFrontBoard couldn't generate a task port
Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}
elapsedCPUTimeForFrontBoard couldn't generate a task port
No setting found for property named "_UISceneHostingClientSettingsExtension"
No setting found for property named "_UISceneHostingClientSettingsExtension"
No setting found for property named "_UISceneHostingClientSettingsExtension"
A code snippet, but nothing fancy:
private var imageCanvasView = ImageCanvasView()
private var toolPicker = ToolPicker()
override func viewDidLoad() {
super.viewDidLoad()
self.toolPicker.setVisible(true, forFirstResponder: self.imageCanvasView)
self.toolPicker.addObserver(self.imageCanvasView)
self.imageCanvasView.becomeFirstResponder()
}
Any ideas on how to prevent that or at least access/hide the permanent tool picker?
Hello everyone 👋
I wanted to discuss an issue that has always been somewhat present, but seems to have become more frequent since the latest iOS 17 versions.
When scheduling an activity that includes an event, the eventDidReachThreshold method does not trigger consistently within the device activity monitor extension.
The issue is intermittent. However, repeating the following procedure increases the likelihood of encountering the problem:
Schedule a simple activity with an event: Set the start time to the beginning of the current day and the end time to the end of the current day. Include an application token and a threshold (that you've already met for today 🙂).
Once the activity is scheduled, monitor whether eventDidReachThreshold triggers in the device activity monitor extension.
Workarounds I've discovered:
Restart the activity: Not very reliable.
Force restart the phone: A more drastic measure, but sometimes effective.
Just wait: Wait for an undetermined amount of time, ranging from a few minutes to several hours, after which eventDidReachThreshold will start triggering just fine again.
I've filed a bug report (FB13188666) concerning this specific issue. I'm curious to know if anyone else is experiencing it and what workarounds you've found!
Returning false from NSTextContentManagerDelegate.textContentManager(_:shouldEnumerate:options:) produces huge gaps in my layout instead of showing a continuous block of text.
Instead of omiting the layout of the hidden element, there is a blank space that shows that appears to have the same size in layout as the omitted text element.
Why is this happening and how can I prevent this?
Example:
Hi,
Since iOS 16, when we present a keyboard in the sms/call reporting extension, the app will crash with error:
failure in NSXPCConnectionWithEndpoint:configurator: of BSServiceConnection:0x1efcd9a78 (BSServiceConnection+NSXPCConnection.m:20) : Invalid condition not satisfying: endpoint
In ideas?
Furthermore, when reporting mms message with image, the sender phone is empty. And we are unable to determine what the number is that needs reporting.
Hello Apple Developer Community,
We're experiencing a critical issue with the Screen Time frameworks, and it's affecting one of our users severely. I'm hoping someone here can provide guidance or a potential solution.
Details:
Our app offers a feature using the ManagedSettings shield that lets users block all apps based on a set schedule.
After the scheduled block ends, the apps are expected to become accessible again.
In one case, a user reported that the apps did not unblock after the schedule ended.
Upon trying to manually end the session from within our app, the app only displays a blank white screen.
The user attempted to disable Screen Time access for our app via the iOS settings, but the apps remained blocked.
Even after completely disabling Screen Time from the settings or restarting the phone, the apps stayed blocked.
Interestingly, I attempted to replicate the issue on my end by toggling Screen Time settings and restarting, but everything worked as expected and I could not reproduce the problem.
This issue, though seemingly isolated, has rendered a user's phone virtually unusable, and highlights a potential high-impact bug within the Screen Time framework. It feels necessary for there to be a "master off-switch" or a fail-safe mechanism in these scenarios.
Any insights, solutions, or workarounds would be deeply appreciated. It's crucial for us to support our user and resolve this promptly.
Thank you in advance!
Hi, I am facing a problem related to the API in the title.
When the API is executed with EKAuthorizationStatus notDetermined, the dialog is not displayed and (false, nil) is passed to completion.
// Create an event store
let store = EKEventStore()
store.requestWriteOnlyAccessToEvents { granted, error in
if let error {
print("error occurred")
} else if granted {
print("allowed")
} else {
print("denied")
}
}
// "denied"
That is why I am not sure what is causing the dialog not to appear.
Is this a bug in the API?
note
This is not a problem in the simulator. It is a problem **only on the actual device.
development environment
Xcode Version 15.0 (15A240d)
iPhone SE(3rd) iOS 17.0.2 (21A351)
I'm trying to display an Int in Hebrew. so for example 123 should display אבג
1 = א
2 = ב
3 = ג
I have tried specifying the locale based on a the answer to a different post of mine where the solution was to specify the numbering system in the locale Locale(identifier: "he-IL@numbers=hebr")
print(123.formatted(.number.locale(Locale(identifier: "en@numbers=hebr"))))
// Output: 123
When setting the same locale for dates it formats properly with Hebrew numbers.
However if I do Arabic instead of Hebrew the numbers display properly in arabic the result for this is ``
print(123.formatted(.number.locale(Locale(identifier: "en@numbers=Arab"))))
// Output: ١٢٣
Below is the code I've tried running in a playground:
This is the code I ran in the playground
I've run into a really weird bug with a macOS screen saver I've been developing using the ScreenSaver framework. It works fine on Ventura, but on Sonoma, when the user dismisses the screensaver, it continues to animate invisibly in the background using up CPU and GPU cycles. Even worse, when the user activates the screensaver a second time, yet another copy appears to be created, and so on. The call to stop animating is also never sent to the view, as far as I can tell.
I logged this as FB13041503 already, but I'm trying to come up with a workaround now, since this is still happening in the release version of macOS 14.0.
Any ideas how I can detect that the screensaver has been dismissed, so I can minimise my resource usage? I've even tried watching for things like NSWindowDidChangeOcclusionStateNotification but nothing seems to get called that I can use.
I have an app group to share settings between a main app and a helper. This is accessed using [[NSUserDefaults alloc] initWithSuiteName: @"FDHC2KMZ6V.com.jwwalker.autopairs.suite"]. What's puzzling me is that if I go to Terminal and enter
defaults read FDHC2KMZ6V.com.jwwalker.autopairs.suite
it tells me that the domain does not exist. Is this a bug in the defaults tool, or is there some trick I'm missing?
Hi,
I'm trying to create a macOS widget for my application. I'm following the official Apple documentation.
When trying to run the widget, I get the following error: The operation could not be completed. (CHSErrorDomain error 1103.)
Is there a list somewhere that explains the error codes? I thought we were past error codes in modern software development...
I use setTitle() to display a custom text on the top left corner (aligned to the clock) of a controller. But after upgrading to watchOS 10, the title is displayed on the right, under the clock, pushing all the design down.
Is there a workaround to make the title behave as it did on older versions?
Hi, with the release of iOS 17 App Clips are supposed to support sizes of 50 MB if you're targeting iOS 16.4 or later. However, when I submit such a build to the App Store I receive an "Invalid Build" email, saying that my app "exceeds the maximum allowable size of 15 MB after app thinning."
My app is 32 MB and targets iOS 16.4, yet App Store Connect appears to still be hewing to the old 15 MB limit. Any ideas on how to solve this? Is there a setting I'm missing? Thanks!
Since XCode 15, we can't get our app in the app store no more. While uploading, we get the message: "Entitlement com.apple.developer.playable-content is missing".
The entitlement is for CarPlay and it worked for years -we did not change anything.Now with XCode 15, we had to remove CarPlay completely, otherwise we wouldn't get the app in the App Store no more.
I have experienced a strange issue on my iphone test device. (iPhone Xr running iOS 17.0.3)
In my app I ask a user for calendar full access. Once I gave the access permission, the app works as expected. Then somehow the status changed from .fullAccess to .denied. This happens without my interaction in iPhone's Settings. I have doubled checked in Settings app and the permission is still granted. But somehow the status is denied when calling EKEventStore.authorizationStatus(for: .reminder)
Regardless of how bad my code is, the app should not be able to change status from .fullAccess to .denied. Correct?
I have never had this problem until lately. But it happens to both my iOS app and my mac Catalyst app. Which is really strange. (iOS 17.0.3 and Sonoma 14.0)
This problem doesn't happen all the time though. Most of the time my app works fine. But it can happen few times per day. And even more strange, it tends to happen at the same time for iOS and macOS.
I don't know if this problem happens to me because of the fact that I install/uninstall the app many times but currently it just causes me a headache.
I have attached 2 images. These 2 images happen at the same time. The only fix is that I have to turn off then turn on the Full Access again in Settings app. Something for Reminder.
Any advice is much appreciated. Thank you.