Hello,
my app sometimes has this super weird issue with scroll in a horizontal section (see the GIF below). The thing is, I have ever spotted it only in this third section and not the two sections above it.
All have the same compositional collection view layout and are powered by the diffable data source. I reexamined the item definition and I don't think this could be a case of hash values being same and hence confusing the collection view.
It also seems to happen only to these first items. It is not frequent but on my own device I have seen it many times so far. The problem always seems to manifest in similar manner.
Anyone seen this? I am hoping that maybe someone will recognize the problem from the GIF.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,
I have collection view with context menu using contextMenuConfigurationForItemAt and I wanted to customize the preview, when user long presses and context menu is shown. Something maybe like in the Music app when you long press on an album it shows the album in bigger size...
I found some snippets online for highlightPreviewForItemAt and dismissalPreviewForItemAt but it just doesn't work. As soon as a implemented these delegate methods, nothing happens when I long press, not even the standard preview with context menu.
These two methods aren't being called at all. Do I need to do something else? Do I need the previewProvider when creating the context menu? It is my understanding that that is needed only when the item should also open further detail on tap - which is something I don't need and want.
Below is my relevant implementation:
private func shareMenuConfiguration(for itemAt: URL, indexPath: IndexPath) -> UIContextMenuConfiguration {
let share = UIAction(title: "Share".localized(), image: UIImage(systemName: "square.and.arrow.up")) { [unowned self] _ in
let shareVC = UIActivityViewController(activityItems: [itemAt], applicationActivities: nil)
if let cell = collectionView.cellForItem(at: indexPath) {
shareVC.popoverPresentationController?.sourceView = cell.contentView
shareVC.popoverPresentationController?.sourceRect = cell.contentView.bounds
}
self.present(shareVC, animated: true)
}
return UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { _ in
UIMenu(title: "", children: [share])
}
}
func collectionView(_ collectionView: UICollectionView, contextMenuConfiguration configuration: UIContextMenuConfiguration, highlightPreviewForItemAt indexPath: IndexPath) -> UITargetedPreview? {
guard let item = datasource.itemIdentifier(for: indexPath), let cell = collectionView.cellForItem(at: indexPath) as? GalleryImageCell else {
return nil
}
let parameters = UIPreviewParameters()
let visibleRect = cell.contentView.bounds.insetBy(dx: 1/3, dy: 1/3)
let visiblePath = UIBezierPath(roundedRect: visibleRect, cornerRadius: 4)
parameters.visiblePath = visiblePath
return UITargetedPreview(
view: cell.contentView,
parameters: parameters,
target: .init(container: collectionView, center: collectionView.convert(cell.contentView.center, from: cell.contentView))
)
}
func collectionView(_ collectionView: UICollectionView, contextMenuConfiguration configuration: UIContextMenuConfiguration, dismissalPreviewForItemAt indexPath: IndexPath) -> UITargetedPreview? {
guard let item = datasource.itemIdentifier(for: indexPath), let cell = collectionView.cellForItem(at: indexPath) as? GalleryImageCell else {
return nil
}
let parameters = UIPreviewParameters()
let visibleRect = cell.contentView.bounds.insetBy(dx: 1/3, dy: 1/3)
let visiblePath = UIBezierPath(roundedRect: visibleRect, cornerRadius: 4)
parameters.visiblePath = visiblePath
return UITargetedPreview(
view: cell.contentView,
parameters: parameters,
target: .init(container: collectionView, center: collectionView.convert(cell.contentView.center, from: cell.contentView))
)
}
Thanks!
Hello,
In a new app I am working on I noticed the FamilyActivityTitleView that displays "ApplicationToken" has wrong (black) color when phone is set to light mode but app is using dark mode via override.
We display user's selected apps and the labels are rendered correctly at first, but then when user updates selection with FamilyActivityPicker, then those newly added apps are rendered with black titles.
The problem goes away when I close the screen and open it again. It also doesn't happen when phone is set to dark theme.
I am currently noticing the issue on iOS 18.4.1.
I have tried various workarounds like forcing white text in the custom label style, forcing re-render with custom .id value but nothing helped.
Is there any way how to fix this?
Hello,
I initially started the discussion over at Swift Forums - https://forums.swift.org/t/issue-with-connect-proxy-some-connections-dont-work-probably-sockets/45575 because I am using SwiftNIO but it appears that it makes more sense here.
I have an app with NetworkExtension of the packet tunnel provider type. So I am using the NEPacketTunnelProvider. As part of the extension, I have SwiftNIO server with connect proxy which is used to route the traffic.
This works great in almost all cases, but apps like Signal or WhatsApp don't work. They don't display any kind of "no connection" indicator but the messages aren't send or received.
Over at Swift Forums I got an answer from Quinn “The Eskimo!” that I think points to the actual problem:
My experience is that a lot of these ‘chat’ apps explicitly bind their
connections to the WWAN interface, which means they don’t use the
default route and thus aren’t seen by the packet tunnel provider.
My packet tunnel provider is configured to use the default routes for IP4 and IP6.
So my concern is how to configure it, that it works also for the chat apps? There are couple of apps from the App Store that I tried which use this same approach and while they are active, Signal works fine.
Yes, I know this solution is not ideal and not the main intended usecase for packet tunnel, but it is the only option available on iOS..
Thanks for help! Happy to clarify further.
Hello,
in my usecase, I want to use the matchDomains property, so my VPN (NEPacketTunnelProvider) handles traffic for just some apps and not everything that happens on the device.
But settings matchDomains to anything other than [""] doesn't seem to work properly.
It works for websites in Safari but in my testing not for other apps. Let's use Instagram as an example:
let proxySettings: NEProxySettings = NEProxySettings()
proxySettings.matchDomains = ["instagram.com"]
With this settings, using the Instagram app doesn't send traffic to my VPN. However if I set something like "theverge.com" as the domain, it gets set to my app.
According to the docs, the matchDomains uses suffixes:
If the destination host name of a HTTP connection shares a suffix with one of these strings then the proxy settings will be used for the HTTP connection. Otherwise the proxy settings will not be used.
I also tried wildcards like *.instagram.com without much luck.
How would I go about this? Is there any internal limits on how many domains I can match like this?
Thanks
Hello,
I am trying to play around with the Live Text API according to this docs - https://developer.apple.com/documentation/visionkit/enabling_live_text_interactions_with_images?changes=latest_minor
But it always fails with [api] -[CIImage initWithCVPixelBuffer:options:] failed because the buffer is nil.
I am running this on a UIImage instance that I got from VNDocumentCameraViewController.
This is my current implementation that I run after the scanned image is displayed:
private func setupLiveText() {
guard let image = imageView.image else {
return
}
let interaction = ImageAnalysisInteraction()
imageView.addInteraction(interaction)
Task {
let configuration = ImageAnalyzer.Configuration([.text])
let analyzer = ImageAnalyzer()
do {
let analysis = try await analyzer.analyze(image, configuration: configuration)
DispatchQueue.main.async {
interaction.analysis = analysis
}
} catch {
print(error.localizedDescription)
}
}
}
It does not fail, it returns non-nil analysis object, but setting it to the interaction does nothing.
I am testing this on iPhone SE 2020 which has the A13 chip. This feature requires A12 and up.
Hello,
I am working on an app that scans documents and recognizes the text with help of Vision framework. This works great.
I would also like to "recognize" or detect individual images which are part of the document. Does Vision has any support for this or should I be looking into training my own ML model?
Below is an example document - I would like to extract the text (already done) and also the image of the building.
Hello,
I submitted new app update almost a week ago for review, it got rejected one time (I had to add links to privacy policy) and then the version was approved.
But my newly added subscription has some "Developer Action Needed" / "Rejected" issue - probably with the localization. I wasn't able to discover the root cause for the rejection so I updated the info to make it clear in my view and resubmitted.
However I did not get any confirmation email or something like that and my subscription is "Waiting for Review" for days now, which means I am not able to proceed with the launch of new version.
Is there anything I can do? I looked into requesting the expedited review - but I dont see any option to specify I need review of subscription.
If I have App Store product page in multiple languages - must the subscription localizations match?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Review
App Store Connect
Subscriptions
Hello,
we have rare case of AuthorizationCenter.shared.requestAuthorization(for: .individual) failing to autorize user on real device - iPhone XR (iOS 16.1.2).
It does not throw the standard FamilyControlsError which we are handling, but NSCocoaErrorDomain.
This is the entire po description:
Error Domain=NSCocoaErrorDomain Code=4864 "The given data was not a valid property list." UserInfo={NSCodingPath=(), NSDebugDescription=The given data was not a valid property list., NSUnderlyingError=0x283af4d80 {Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}}}
The localized one says:
"The data couldn’t be read because it isn’t in the correct format."
This sounds like some error deep in iOS. The testing device has Apple ID logged in and uses passcode.
Anything we can do on our end to solve this issue?
Hello,
I am looking into the newly announced Accessory Setup Kit and I'd like to replace my manual WiFi connection setup with it, but I cannot find a way how to specify WiFi password when configuring ASDiscoveryDescriptor, only ssid or ssidPrefix can be specified?
Is it really not possible to connect to WiFi with password with this new framework? That kind of makes it unusable for my use case :( Since the accessory has password.
Hello,
I submitted my trader information in March 2024 for the Digital Services Act. Last Friday I got App Store Connect email saying that my info couldn't be verified and that I need to resubmit otherwise my apps won't be available in the EU in 14 days.
This is quite scary, I don't want to have my apps removed but I cannot resubmit either. In ASC Business section I see "In Review" as the status for my Digital Services Act compliance so it seems there is nothing I can do.
Contacted developer support on Monday but haven't heard back.
Anyone with the similar situation who can offer any advice?
Hello,
I am developing Safari Content Blocker extension and discovered that it frequently fails to load with large amount of rules. Currently I have over 45k and most of the time when I reload the extension on iOS 18 (iPhone 12) it ends with error:
Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.SafariServices.ContentBlockerLoader" UserInfo={NSDebugDescription=connection to service named com.apple.SafariServices.ContentBlockerLoader} #0
And the simpler message is just:
Couldn’t communicate with a helper application.
From what I managed to find (for example here - https://developer.apple.com/forums/thread/756931) the limit for blocking rules should be 150k items.
It was previously 50k but got increased years ago.
Is there anything special I need to do to get the extension to work reliably with say 100k items?
I am usng the JSON format from the docs:
{
"trigger": {
...
},
"action": {
...
}
},
{
"trigger": {
...
},
"action": {
...
}
}
]
My trigger is url-filter and the action is type: block
I was thinking about providing multiple JSON files in attachments property of NSExtensionItem but apparently that is not supported.
Thanks for help!
Hello,
does anyone have any info/insight when we will be able to test app version that contains the Family Controls entitlement to TestFlight? iOS 16 is getting really close..
When we try to upload the build, Xcode shows the entitlements error and the Apple Developer portal shows that Family Controls is still available only for Development profile.
Thanks!
Hello,
we have been using the new Screen Time APIs for a long time. While the API is simple to work with, we have persistent issues with the FamilyActivityPicker component. I have filled many feedbacks but have yet to notice any changes/fixes in the point releases.
One issue we see frequently is that expanding categories does not work. Instead, the picker shows just a single row, and you need to scroll up or down to “refresh” it and make it expand correctly.
Another problem is that some apps are “hidden” in the “Other” category, and our users have trouble discovering them. I have been part of a few user interviews we did recently, and basically, every user had some issue with the FamilyActivityPicker.
For one user, it just disappeared, and they needed to re-open the app screen, which contains the picker, to fix it. Sometimes the picker shows apps that have already been uninstalled from the device.
The system picker from Screen Time works much better. For one, websites have dedicated category, which makes it much easier to navigate. I have seen instances where you would open the “Productivity” category and see like 50 websites - making it super hard to find apps.
The system picker also allows users to manually enter a website that FamilyActivityPicker does not provide.
Also, the system picker offers a search bar which is not possible with FamilyActivityPicker. Some users get frustrated with finding the specific apps in the picker if they have many apps installed.
Since FamilyActivityPicker is critical to user experience in our app, we would appreciate it if the FamilyActivityPicker would be on par with the Screen Time built-in picker.
Thanks 🙏
Hello,
my indie app has somewhat significant traction in China (both downloads and subscription purchases), but I also have high refund rate there, like multiples of other countries... Perhaps even as 80 % or more of my refunds are in China although the share of downloads and purchases is way lower.
I am curious if someone else also has this issue?
My app has the "Blinkist trial" onboarding which shows the timeline and has notification on day 5 (for weekly trial), that paid subscription starts soon. However even after stopping showing this onboarding in China for new users I still have most of my refunds from China.
I am trying to understand whether this may be broader "phenomenon" or maybe something super specific to my app. As far as I know Apple doesn't share the refund request reasons with developers and I did not get any support emails that would hint at why people are asking for refund.
Thanks!
Since Apple can terminate your developer account if you have "high" refund rate, I would like to get to the bottom of this.
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
App Store
Subscriptions
In-App Purchase