Posts

Post not yet marked as solved
0 Replies
588 Views
I am trying to display a simple list of text based on an NSManagedObject subclass. In this class, I am not doing any fetch requests, I am simply passing in a list that was already fetched. When trying to preview this view, the preview keeps crashing and I can't figure out why. It does not crash when this view is created as a subview in another preview. Swift import SwiftUI struct TracksView: View {     var songs: [Song] = []        var body : some View {         List(songs.map{$0.title!}, id:                 \.self){(song:String) in             Text(song)         }     } } struct TracksView_Previews: PreviewProvider {     static var context = PersistenceController.preview.container.viewContext     static var songs: [Song] = {         let req = NSFetchRequestNSFetchRequestResult(entityName: Song.className())         var s:[Song]?         do {             let data = try context.fetch(req)             if data.first! is Song{                 s = data as? [Song]             }         } catch {             print(error.localizedDescription)         } return s ?? []     }()     static let env = Global()     static var previews: some View {         TracksView(songs: songs)             .environment(\.managedObjectContext, context)             .environmentObject(env)     } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
545 Views
I am trying to set up Continuous integration on Xcode Server. I have created the bot just fine, but when I hit integrate it says Bot Issue for MusicOrganizer Bot (error) Integration #6 of Bot on iMac Open Integration in Xcode: xcbot://iMac/botID/cddc6cb9148521dbd01a76d14e017e11/integrationID/1ad3ee063ef41b3dcfb96c5f9001c38c Error: Signing certificate is invalid. Signing certificate "Apple Development: [email]", serial number "DVTSigningCertificateSerialNumber: 0x7fef40c0f1c0", is not valid for code signing. It may have been revoked or expired. Do I need to install MacOS Server? Is there any way to manage this manually?
Posted Last updated
.