Post

Replies

Boosts

Views

Activity

Is there a way to detect front camera location on the newest iPad Pro's and Air's?
With the newest iPad Pro and iPad Air's, the front facing camera sits on the long horizontal edge, which is different from the previous version which had the camera on the shorter top edge. We have an app that needs to put a UI item near the camera. Is there a way of detecting where the front facing camera is on iOS? I have tried doing simple resolution checks, i.e, if width == ipadProWidth || width == ipadAirWidth { do2024iPadProLayout() } else { doStandardiPadLayout() } But this doesn't feel like the nicest way to do this check, because it's liable to break moving forward, and theres the possibility Apple release more devices with the camera on the horizontal edge. Any help here is appreciated!
1
1
344
Sep ’24
UITabBarController as secondary controller in UISplitViewController is producing 2 navigation bars in compact view
This is a bit of an odd one, but when using UIKit (I've tried it in SwiftUI and the same result doesn't happen), and attempting to place a UITabViewController as the secondary item in a UISplitViewController, an extra UINavigationBar is presented on the secondary view controller, but only when viewed in its compact form. Selected another tab and revisiting that view fixes the problem. Here are some images - a direct screenshot and one from the view debugger: Here is my code, I've pulled it out of a larger project but it still is reproducible: import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = scene as? UIWindowScene else { return } let splitViewController = UISplitViewController(style: .doubleColumn) let primaryVc = UINavigationController(rootViewController: PrimaryTestUIViewController()) let tabBar = UITabBarController() tabBar.viewControllers = [UINavigationController(rootViewController: SecondaryTestUIViewController()), UINavigationController(rootViewController: SecondaryTestUIViewController()), UINavigationController(rootViewController: SecondaryTestUIViewController())] let secondaryVC = tabBar splitViewController.viewControllers = [primaryVc, secondaryVC] let window = UIWindow(windowScene: windowScene) window.rootViewController = splitViewController self.window = window window.makeKeyAndVisible() } } class PrimaryTestUIViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() title = "Primary view" } } class SecondaryTestUIViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() title = "Secondary view" } }
1
0
442
Oct ’23
Subscription Summary not appearing in App Store Connect
This week I released an app with an IAP and subscription in. Whilst I'd be stunned if anyone had subscribed, I'd like to at least confirm that. However, in App Store Connect, apparently I should have a "Subscription Summary" according to this article here: https://developer.apple.com/help/app-store-connect/view-sales-and-trends/view-subscription-data But I don't have one: Is there any criteria you have to hit to see the subscriptions?
3
1
667
Oct ’23
Background download - file not moving when completed
Hi, I've got a background download being completed when the app isn't in memory. The app has been killed using exit so the URLSession delegates are still able to be hit. I have logging in place confirming that acts as expected. What doesn't work as expected, is when the method didFinishDownloadingTo is called from the background on the URLSession delegate, and I attempt to move the file (a largish file ~400mb), the temp file isn't moved and is deleted once the method returns. When I user smaller file I have had successes but not every time. Moving the file produces no error in the try/catch. Any suggestions? Code below: func urlSession(_: URLSession, downloadTask task: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {         Logging.error("Background - did finish downloading \(task.taskDescription)")         do {             let appSuportUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!             let locationUrl = appSuportUrl.appendingPathComponent(location.lastPathComponent)             Logging.error("Background - file \(locationUrl)")             try? FileManager.default.moveItem(atPath: location.path, toPath: locationUrl.path)             Logging.error("Background - wrote file \(locationUrl)") // This is excuted but it isn't correct as the file is never moved         } catch (let writeError) {             Logging.error("Background - File save failed: \(writeError.localizedDescription)") // This is never hit, indicating there is no error         }     }
0
0
760
Feb ’23
CIDetectorAccuracyHigh not working on simulator
Hey all, Would anyone happen to know why CIDetectorAccuracyHigh won't work on a simulator? It always can't find a face in any image. Can't find anything to suggest it shouldn't work online. The same code below is able to find a face on sim if I use CIDetectorAccuracyLow: public func retrieveFacesFrom(_ image: CIImage, completion: @escaping ([Feature]?) -> ()) {         let ciDetector = CIDetector(ofType: CIDetectorTypeFace,                                     context: nil,                                     options: [CIDetectorAccuracy : CIDetectorAccuracyHigh])         let features = ciDetector?.features(in: image) as? [CIFeature]         completion(features?.map { Feature(bounds: $0.bounds) }) } Thanks in advance.
2
1
987
Jan ’23
Pending Agreement - no agreements to approve in either App Store Connect nor the membership page?
Hey all, contacting Apple about this but responses haven't really helped as of yet (wait 24 hours etc). I've just had an app approved, however its status is "Pending Agreement". I have no agreements to accept though - my membership page and App Store Connect look like the screenshots here: https://imgur.com/a/zocrmYe Anyone have any advice? Thanks!
3
0
755
Dec ’22