Post

Replies

Boosts

Views

Activity

FamilyControls: FamilyActivityPicker needs bug fixes and parity with the system picker
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 🙏
3
1
1.6k
Jan ’23
Weird NSCocoaErrorDomain errow when trying to autorize Screen Time API
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?
3
0
1.6k
Jan ’23
New subscription stuck in "Waiting for Review"?
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?
3
0
1.7k
Jan ’23
SwiftUI StateObject crash: “failed to demangle witness for associated type 'Property’”
Hello, we have weird crash in our app that mostly seems to happen right after launch. It is quite rare and so far I haven’t been able to reproduce it (the info below comes from Crashlytics). The main error message I have is this: failed to demangle witness for associated type 'Property' in conformance 'SwiftUI.StateObject<AppBlock.QuickBlockActivityViewModel>.(unknown context at $18f34e5b8).Box: DynamicPropertyBox' from mangled name ' � ��yxG' - subject type x does not conform to protocol ObservableObject And here is the stack trace: Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x7200 __pthread_kill + 8 1 libsystem_pthread.dylib 0x71ac pthread_kill + 268 2 libsystem_c.dylib 0x20ca0 abort + 180 3 libswiftCore.dylib 0x3d7304 swift::fatalError(unsigned int, char const*, ...) + 134 4 libswiftCore.dylib 0x3d7324 swift::warningv(unsigned int, char const*, char*) + 30 5 libswiftCore.dylib 0x3ee678 swift_getAssociatedConformanceWitnessSlowImpl(swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 2078 6 libswiftCore.dylib 0x3ecb9c swift_getAssociatedTypeWitness + 236 7 SwiftUI 0x5b838 OUTLINED_FUNCTION_49 + 640 8 SwiftUI 0xa8d68 OUTLINED_FUNCTION_513 + 16260 9 SwiftUI 0x58244 OUTLINED_FUNCTION_177 + 10892 10 SwiftUI 0x95524 OUTLINED_FUNCTION_1160 + 6632 We are using the view model (QuickBlockActivityViewModel) in a SwiftUI view that is part of collection view using the new UIHostingConfiguration from iOS 16. Our view model is a subclass of view model for older iOS versions that conforms to ObservableObject and is marked as @MainActor. And the view model is used like this: @StateObject private var viewModel = QuickBlockActivityViewModel() Internally the view model uses Combine to monitor a couple of states from other parts of the app to modify its properties.
5
2
2k
Jan ’23
Scanning QR code with AVCaptureDevice issues on iPhone 14 Pro
Hello, I am using simple AVCaptureDevice setup to scan QR code from LCD screen, usually the distance is 5 to 15 centimeters. This has been working fine for a long time, with correct focus and everything. Today I noticed that my iPhone 14 Pro cannot focus on these smaller distances while my developer iPhone SE 2020 can easily detect the QR code in basically all cases. I have been using this code to create the capture device: AVCaptureDevice.default(for: .video) And then some settings: if videoCaptureDevice.isAutoFocusRangeRestrictionSupported { videoCaptureDevice.autoFocusRangeRestriction = .near } if videoCaptureDevice.isFocusModeSupported(.continuousAutoFocus) { videoCaptureDevice.focusMode = .continuousAutoFocus } As I said, this worked great prior to noticing the issue on iPhone 14 Pro. After some searching I found recommendations to use another device type like: builtInDualWideCamera and other available types. I tried all of them and they either behave like the default (meaning I cannot scan the code unless I move the phone way out) or they always seem to use the 0.5 Ultra-Wide camera which looks weird and the scanning experience is not ideal. What is the best approach to have QR scanning with these new phones?
3
1
3k
Dec ’22
Slow performance when using Screen Time API?
Hello, our app uses the frameworks FamilyControls, ManagedSettings and DeviceActivity. It runs smoothly in like 99% cases but we have some support requests that mention the app being incredibly slow - like seconds to register button presses. These reported incidents deal with calls to these APIs mentioned above. One of the frequent complaint is that code that manipulates with ManagedSettingsStore is slow and the whole app becomes unresponsive. Unfortunately I am not able to reproduce this on my devices so cannot run it through the Instruments. Anyone has experience with this? PS: These reports are frequently from new and fast devices - like iPhone 13 & iPhone 14 so that should not be the case.
0
1
1.1k
Nov ’22
Detect images in document scans with Vision?
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.
2
0
1k
Oct ’22
`NEPacketTunnelProvider` configuration rarely gets duplicated
Hello, with iOS 16 (multiple betas), I noticed that our VPN configuration created with NEPacketTunnelProvider appears twice in Settings -> General -> VPN & Device Management. I thought that this shouldn't be possible (even if I wanted to) because on iOS apps can provide just one configuration? All the basic configuration for your VPN is static. providerBundleIdentifier & serverAddress are contants in the source code. The only thing that gets changed is onDemandRules. When I inspected the configurations details in Settings, they were identical.
2
0
646
Sep ’22
How to shield categories with the ManagedSettingsStore?
Hello, I am not quite sure, how the shielding of entire categories of apps is supposed to work. The FamilyActivitySelection contains tokens for apps, websites and categories. But the shield property of ManagedSettingsStore has only attributes applications and webDomains where I can configure the tokens from the family activity selection. shield.applications = selection.applicationTokens shield.webDomains = selection.webDomainTokens I would expect there to be the property categories that expects Set<ActivityCategoryToken> and based on this shields apps in that category.
1
0
1.2k
Jul ’22
Trouble understanding the API limits for internal use
Hello, with new App Store Connect API I wanted to prototype a couple of ideas, but when I wanted to get a API key, this dialog made me question the validity: So this sounds like we are not supposed to create apps or web apps that would help other developers with App Store Connect tasks? For example if I wanted to create a web app that lets people manage their TestFlight, that is against the rules? Because it would presumably involve them getting an API key which my web app would use to talk to ASC API? On the other hand there are services like RevenueCat, Bitrise and similar, that presumably "access ASC on behalf of their users"? I would really appreciate if someone can explain this to me.
0
0
572
Jul ’22
Cannot get DeviceActivityReport to work
I am unable to make any progress regarding DeviceActivityReport. The session from WWDC 2022 covers it very briefly. What I (hopefully correctly) understood is that we need to create an extension of type Activity report and inside it implement the body which is DeviceActivityReportScene that will display the charts and what not. And then in the app, we need to use DeviceActivityReport with SwiftUI to show the report which will be run in sandbox from the extension. But I cannot get anything to show up on the screen. Even when my extension view is just a static text to verify something gets displayed. I am trying to create the device activity report without any filter which should give me all activity data per the docs. This is shown in the Xcode console for the view that uses DeviceActivityReport. 2022-06-17 18:08:47.219785+0200 DeviceActivityTest[9613:954204] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2022-06-17 18:08:47.219862+0200 DeviceActivityTest[9613:954204] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2022-06-17 18:08:47.219911+0200 DeviceActivityTest[9613:954204] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2022-06-17 18:08:47.290070+0200 DeviceActivityTest[9613:954204] [default] Remote viewcontroller request failed: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 9615 named com.apple.DeviceActivityUI.DeviceActivityReportService.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service with pid 9615 named com.apple.DeviceActivityUI.DeviceActivityReportService.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}
17
2
4.7k
Jun ’22
Live Text API fails: "failed because the buffer is nil"
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.
4
0
2.2k
Jun ’22
Starting `NEPacketTunnelProvider` very rarely gets stuck. How to debug?
Hello, I have successfully implemented NEPacketTunnelProvider network extension in iOS app which works fine most of the time. By working fine I mean it starts, stops (it is configured to disconnect on sleep) and handles network traffic as expected. However I have a few reports that sometimes it doesn't start correctly. It hangs on "Connecting..." when checking the Settings -> VPN. As far as I can tell even with waiting for minutes, it seems still stuck. Re-installing either the VPN provider extension or entire app fixes this problem. What could be causing such random and very rare issues? This doesn't seem to be connected to single iOS version for example.
5
0
1.1k
May ’22