Post

Replies

Boosts

Views

Activity

Reply to Xcode 12.x Build Service Error: Integration results could not be uploaded.
I wondering how you run the fix-permissions scripts from a bot. So far Xcode Server is having a 100% failure rate for me. Different errors at different times. Gotta say I love the 1" maximum feedback area in the bot results too. Best you can do is make it smaller. So much vertical whitespace. It's like being on Stack Overflow and having to constantly scroll left and right to read something while you see huge margins on the left and right. I'm thinking that that alone shows the amount of love this isn't getting, so I'm going to give up on it.
Jul ’21
Reply to Xcode server bot can't clone from github/bitbucket
More on that post-integration trigger. Without the direct clone I noticed that the directory has a partially cloned repository in it. Seems to have either given up part way through the clone or was shutoff by GitHub partially through. Here's the source control log: Jun 24 23:41:34  [26422] : Will attempt to update checkout cache for bot Jun 24 23:41:34  [26422] : Xcode Source Control Blueprint was valid. Jun 24 23:41:34  [26422] : About to update/checkout: https://github.com/endresjd/NewListFeatures (null) into (null)  Jun 24 23:41:34  [26422] : Could not load cached workspace: Error Domain=XCSIntegrationService Code=2 "The repositories have changed since the last integration. Falling back to a clean checkout." UserInfo={NSLocalizedDescription=The repositories have changed since the last integration. Falling back to a clean checkout.} Jun 24 23:41:34  [26422] : An error occurred updating existing checkout: Error Domain=XCSIntegrationService Code=2 "The repositories have changed since the last integration. Falling back to a clean checkout." UserInfo={NSLocalizedDescription=The repositories have changed since the last integration. Falling back to a clean checkout.} Jun 24 23:41:35  [26422] : 10.00% Compressing objects: 100% done Jun 24 23:41:35  [26422] : Error occurred loading revisioned blueprint from workspace: Error Domain=com.apple.dt.SourceControlErrorDomain Code=-300 "The remote repository could not be accessed." UserInfo={com.apple.dt.sourcecontrol.UnderlyingErrorString=, NSLocalizedDescription=The remote repository could not be accessed., NSLocalizedRecoverySuggestion=Make sure a valid repository exists at the specified location and that the correct credentials have been supplied.}
Jun ’21
Reply to SwiftUI Previews in Swift Packages
With Xcode 12b6 the previews will only work if there is exactly one product and one target for that product. Test targets give link errors, another block in those sections cause failure. Any more targets, even if unused, cause failures in finding the host for the preview.
Sep ’20
Reply to SwiftUI Previews in Swift Packages
With beta 6 my package previews stopped with "Could not find host for previews", very annoying. I created a sample project using that template with a view that just has a text field in it, and that will only work if the testTarget part of Package.swift is commented out. If that is in there then Xcode won't build the test target with the proper architecture.
Sep ’20
Reply to CoreData in Swift Packages
I just looked at it. Bundle.main is generated. It essentially boils down to Bundle(for: BundleFinder.self) where BundleFinder.self is the name of the generated file. That's really close to what I had in there before all this. It looks for the resources in three places so you have flexibility on where to put your resources:         let candidates = [             // Bundle should be present here when the package is linked into an App.             Bundle.main.resourceURL,             // Bundle should be present here when the package is linked into a framework.             Bundle(for: BundleFinder.self).resourceURL,             // For command-line tools.             Bundle.main.bundleURL,         ]
Jun ’20
Reply to CoreData in Swift Packages
My code is a little older, but the principles should be the same. Here's how I created an NSManagedObjectModel: lazy var managedObjectModel: NSManagedObjectModel = {     // The managed object model for the application. This property is not optional.     // It is a fatal error for the application not to be able to find and load its model.     let bundle = Bundle.module     let modelURL = bundle.url(forResource: self.managedModelRootName, withExtension: self.managedModelExtension)!     return NSManagedObjectModel(contentsOf: modelURL)! }() The key is I had to find the reference to it myself using the bundle that contains the module. To find the bundle I used Bundle.module which may be new to things this year. I found out about it from Insert link text here - https://developer.apple.com/wwdc20/10169. For your code, which looks like it is based off of newer template code, you'll have to find the proper load point. The key is to use the right bundle, though.
Jun ’20