Post

Replies

Boosts

Views

Activity

Reply to Running application on 17.4 Simulator from Xcode 16.0 beta is crashing due to missing SwiftUICore.framework
My team had this same issue. We had several modules that needed to be renamed in order to fix the runtime "library not found" error with Xcode 16. In my case we had 3 modules with the following names: UIKit_Core SwiftUI_Core UI_Charts Then we renamed these modules to: CoreUIKit CoreSwiftUI ChartsUI And now our app runs on iOS 17. 🤦‍♂️ @tbaigner thanks for the clues about underscores to help us get there.
Sep ’24
Reply to Cannot test debug/development version of Mac app from Xcode
This issue has been a head-scratcher. I have however found a workaround which I'm not sure is the appropriate thing to do, but at least lets me develop my app without issue. In my main.swift file I had code that would check for the existence of the Bundle.main.appStoreReceiptURL file, validate that the data was not empty, and if it was, exits the app with code 173 as described in the documentation here: https://developer.apple.com/documentation/appstorereceipts/validating_receipts_on_the_device?language=objc This has worked in the past when using debug configurations, and lately only intermittently. Eventually I would get hard-stuck with the "your app is damaged" message and be unable to continue running my debug configuration. Today I've modified my main.swift file to not perform this file check for debug configurations, and the app will load up just fine so I can continue working on it. I'm assuming this is safe to do since the receipt validation is still there for my release builds, but is confusing since this had worked in the past. Maybe Apple no longer supports this configuration and only validates release builds? It'd be great to hear from someone with an actual answer to this question, and verify if I had just setup my debug configuration incorrectly or if there's something wrong with Apple's validation service. Either way, I thought I'd log my experiences here in case this helps any other frustrated developer out there.
Jun ’22
Reply to CloudKit + NSPersistentCloudKitContainer: CKError "Service Unavailable" (6/2022); "Request failed with http status code 503"
Today I have different errors! CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1106): <NSCloudKitMirroringDelegate: 0x2803b9790>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x103c0d6c0> (URL: file:///var/mobile/Containers/Data/Application/7C41756B-0596-4010-B35D-3F98B27F83A7/Library/Application%20Support/com.grantdavisinteractive.Mimir/cloud-library.sqlite) Error Domain=NSCocoaErrorDomain Code=134060 "A Core Data error occurred." UserInfo={NSLocalizedFailureReason=The mirroring delegate could not initialize because it's store was removed from the coordinator.} CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2115): <NSCloudKitMirroringDelegate: 0x2803b9790> - Attempting recovery from error: Error Domain=NSCocoaErrorDomain Code=134060 "A Core Data error occurred." UserInfo={NSLocalizedFailureReason=The mirroring delegate could not initialize because it's store was removed from the coordinator.} CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:]_block_invoke(2134): The store was removed before the mirroring delegate could recover from an error: Error Domain=NSCocoaErrorDomain Code=134060 "A Core Data error occurred." UserInfo={NSLocalizedFailureReason=The mirroring delegate could not initialize because it's store was removed from the coordinator.}
May ’22
Reply to How to prevent automatic scrolling of UIScrollView during drag & drop?
I had a similar problem when I was using a UIScrollView within my collection view cells and performing a drag and drop operation. I was able to solve this by using a custom subclass for UIScrollView and overriding the following method: override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) { // NOTE: this fixes an issue where dragging within the collection view during a drag and drop // action would automatically scroll the view to try and "make room" for the dragged item. if let collectionView: UICollectionView = self.superviewOfType(), collectionView.hasActiveDrag { return } super.setContentOffset(contentOffset, animated: animated) } Which makes use of a helper method to find a superview of a given type: extension UIView { func superviewOfType<T: UIView>() -> T? { var currentView: UIView? = self while currentView?.superview != nil { if let typedView = currentView as? T { return typedView } currentView = currentView?.superview } return nil } } This essentially will prevent any automatic scrolling from happening any time a parent collection view is performing a drag. Hope this helps!
Mar ’22
Reply to Cannot test debug/development version of Mac app from Xcode
I found additional information in the Console app, which shows there is a failure getting the receipt for the sandboxed app: Log message 1: Fetching missing receipt for sandbox app /PathToBuiltProductsDir/Debug/MyApp.app Log message 2: <ReceiptRefreshRequest: 0x7fb683c079d0>: Error fetching receipt for [app bundle id] - Error Domain=com.apple.commerce.client Code=500 "(null)" Log message 3: StoreLegacy: Failed to perform in-line receipt renewal for application at path /PathToBuiltProductsDir/Debug/MyApp.app : 'Error Domain=com.apple.commerce.client Code=500 "(null)"' Additionally, running this app DOES work fine on my macbook, but not my desktop. What would cause this request to fail and how do I fix it?
Nov ’21
Reply to Xcode 13 "Missing package product" using local Swift Packages
I eventually got this resolved. What seemed to get it working was re-adding my local packages using the "Add Packages…" menu option on the project that has the framework targets using the local package. This created a new "Packages" group in the project, and eventually started compiling correctly. I also had been using the "Watchdog" app, which I have since disabled as I think it was causing issues when it would delete derived data.
Sep ’21