Post

Replies

Boosts

Views

Activity

Reply to CoreData/CloudKit 0xdead10cc
@DTS Engineer this doesn't actually answer my questions though. I understand that the app is crashing because of a deadlock in CoreData, but as I mentioned I’m not doing any long running tasks. There have been instances where I’m not doing any work, other than just opening the application and then it crashes in the background. The "long running task" you reference has to be coming from the CloudKit integration with CoreData. Thats what I’m asking for a solution to. How do I prevent that from crashing the application, as CloudKit is internally managed.
Jan ’25
Reply to Persistent CloudKit Internal Error
I tried a few days later and although it first appeared to give me the same issues, after a few browser refreshes the environment was able to be reset. After that I was able to push the schema was able to production after a few more refreshes. Seems like it was just something on the CloudKit backend. I don't believe it was schema related as I only had two basic objects. It was also happening with a new CloudKit Container.
Jan ’25
Reply to GKGameCenterViewController Is Blank On iOS 18
I’m using SwiftUI to present the view. Below is the relevant code. When I change it to presenting modally in SwiftUI using sheet or fullScreenCover, it does present. I didn't even know that was tappable, but when I do it does open GameCenter in app. public var body: some View { ZStack { switch gameKitManager.status { case .authenticated: Color.accentColor .edgesIgnoringSafeArea(sizeClass == .compact ? .top : .all) .opacity(0.6) ProgressView() .scaleEffect(1.5) GKGameCenterView(dismiss: dismiss) .edgesIgnoringSafeArea(sizeClass == .compact ? .top : .all) .opacity(showGameKitCenterView ? 1 : 0) .onAppear { withAnimation(.linear(duration: 0.75)){ showGameKitCenterView = true } } case .notAuthenticated(let vc): GKAuthenticationView(vc: vc) case .error(let error): createErrorView(error) case .none: authenticateButton() } } .navigationBarHidden(true) .navigationTitle("Achievements") } public struct GKGameCenterView: UIViewControllerRepresentable { let viewController = GKGameCenterViewController() let dismiss: ()->Void public func makeUIViewController(context: Context) -> GKGameCenterViewController { viewController.gameCenterDelegate = context.coordinator return viewController } public func updateUIViewController(_ uiViewController: GKGameCenterViewController, context: Context) { } public func makeCoordinator() -> Coordinator { return Coordinator(self) } @MainActor public final class Coordinator: NSObject, @preconcurrency GKGameCenterControllerDelegate { let parent: GKGameCenterView // MARK: - Initializer init(_ parent: GKGameCenterView) { self.parent = parent } // MARK: - GKGameCenterControllerDelegate public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) { gameCenterViewController.dismiss(animated: true, completion: nil) parent.dismiss() } } }
Nov ’24
Reply to GKGameCenterViewController Is Blank On iOS 18
After digging in a bit more, it appears that the view controller has to be presented via a sheet or full screen modal. Previously I was using a switch statement to show the view and that is no longer working. However, this workaround still has some bugs revolving around the view controller so it still doesn't not work for my needs.
Nov ’24
Reply to How to ignore the safe area when using keyboardLayoutGuide
usesBottomSafeArea is a new property introduced in iOS 17 to address this. Watch Keep up with the keyboard for more info. view.keyboardLayoutGuide.usesBottomSafeArea = false NSLayoutConstraint.activate([ collectionView.topAnchor.constraint(equalTo: view.topAnchor), collectionView.bottomAnchor.constraint(equalTo: view.keyboardLayoutGuide.topAnchor), collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor) ])
Aug ’23