Post

Replies

Boosts

Views

Activity

Xcode 15 - Preview Crashes with error log but works when parent view is Pinned
Hello I am in need of help to try and understand what is going on with XCode and Previews when using Swift Data. I have the following path: View 1 (Calandar Screen) -> Passes Model -> View 2 (Details Screen) I have a situation where when working on View 2 it will not run in Preview mode when the Pin is not selected. However if I pin View 1 and then go to work on View 2 preview works fine. Now I am guessing that this might have something to do with Swift Data and by having View 1 open it generates the Model to be passed but I might be wrong? I am also struggling to understand and read the error log that excode generates. I have Preview setup in View 2 as follows #Preview { DiaryReadView(diaryModel: DiaryModel()) .environmentObject(NavigationStateManager()) .modelContainer(for: [DiaryModel.self], inMemory: true) } Error Log ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Incident Identifier: 5C8FAD15-959E-4E0A-AFF4-55A739D54110 CrashReporter Key: CC891733-97EE-34E0-EDB7-394B181A2623 Hardware Model: iMac20,1 Process: Diary [36381] Path: /Users/USER/Library/Developer/Xcode/UserData/Previews/Simulator Devices/78258A6C-0145-4E82-ACCD-1F0539F2148A/data/Containers/Bundle/Application/970BD3F5-925F-47BD-A214-7F7B0226A04F/Diary.app/Diary Identifier: OR-1 Version: 1.0 (1) Code Type: X86-64 (Native) Role: Foreground Parent Process: launchd_sim [29471] Coalition: com.apple.CoreSimulator.SimDevice.78258A6C-0145-4E82-ACCD-1F0539F2148A [78195] Responsible Process: SimulatorTrampoline [48509] Date/Time: 2023-10-24 10:55:15.3444 +0100 Launch Time: 2023-10-24 10:55:14.7909 +0100 OS Version: macOS 14.0 (23A344) Release Type: User Report Version: 104 Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: SIGNAL 4 Illegal instruction: 4 Terminating Process: exc handler [36381] Triggered by Thread: 0 Thread 0 Crashed: 0 libswiftCore.dylib 0x7ff814aa36f2 0x7ff814a76000 + 186098 1 SwiftData 0x7ff84952f7dd 0x7ff849514000 + 112605 2 SwiftData 0x7ff8495b1746 0x7ff849514000 + 644934 3 SwiftData 0x7ff8495b64c9 0x7ff849514000 + 664777 4 SwiftData 0x7ff84956f726 0x7ff849514000 + 374566 5 Diary 0x10a4e9635 DiaryModel.init() + 357 (@__swiftmacro_5Diary0A5Model0B0fMm_.swift:2) 6 Diary 0x10a4e94c2 DiaryModel.__allocating_init() + 34 7 DiaryReadView.1.preview-thunk.dylib 0x10bf15533 closure #1 in static $s025Diary_PreviewReplacement_A10ReadView_133_E76E9AE78936AC4C16C3EA33E995B161Ll0B0fMf_15PreviewRegistryfMu_.makePreview() + 51 (@__swiftmacro_025Diary_PreviewReplacement_A10ReadView_133_E76E9AE78936AC4C16C3EA33E995B161Ll0B0fMf_.swift:9) 8 PreviewsInjection 0x10ac7f386 0x10ac41000 + 254854 9 PreviewsInjection 0x10ac8025d 0x10ac41000 + 258653 10 libswift_Concurrency.dylib 0x7ff85b04c76c 0x7ff85b03b000 + 71532 11 PreviewsInjection 0x10ac7f0e5 0x10ac41000 + 254181 12 PreviewsInjection 0x10ac83108 0x10ac41000 + 270600 13 PreviewsInjection 0x10ac83c1c 0x10ac41000 + 273436 14 PreviewsInjection 0x10ac70a0d 0x10ac41000 + 195085 15 PreviewsInjection 0x10ac7387a 0x10ac41000 + 206970 16 PreviewsInjection 0x10ac5a630 0x10ac41000 + 103984 17 PreviewsInjection 0x10ac5aaf4 0x10ac41000 + 105204 18 PreviewsInjection 0x10ac753f0 0x10ac41000 + 214000 19 PreviewsInjection 0x10ac493f3 0x10ac41000 + 33779 20 PreviewsInjection 0x10ac48a85 0x10ac41000 + 31365 21 PreviewsFoundation 0x10b741df9 0x10b6a1000 + 658937 22 libdispatch.dylib 0x7ff800156a90 0x7ff800155000 + 6800 23 libdispatch.dylib 0x7ff800157d3a 0x7ff800155000 + 11578 24 libdispatch.dylib 0x7ff800166ac0 0x7ff800155000 + 72384 25 libdispatch.dylib 0x7ff800166526 0x7ff800155000 + 70950 26 CoreFoundation 0x7ff8003f5850 0x7ff800368000 + 579664 27 CoreFoundation 0x7ff8003f018b 0x7ff800368000 + 557451 28 CoreFoundation 0x7ff8003ef409 0x7ff800368000 + 553993 29 GraphicsServices 0x7ff80fcdd187 0x7ff80fcda000 + 12679 30 UIKitCore 0x7ff805b703a2 0x7ff804b95000 + 16626594 31 UIKitCore 0x7ff805b74e10 0x7ff804b95000 + 16645648 32 SwiftUI 0x7ff84a61077e 0x7ff8495ce000 + 17049470 33 SwiftUI 0x7ff84a610637 0x7ff8495ce000 + 17049143 34 SwiftUI 0x7ff84a2bcaa5 0x7ff8495ce000 + 13560485 35 Diary 0x10a4ffade static DiaryApp.$main() + 30 36 Diary 0x10a500099 main + 9 (DiaryApp.swift:12) 37 dyld_sim 0x10ab023ee start_sim + 10 38 dyld 0x10cd9c3a6 0x10cd96000 + 25510
1
0
869
Oct ’23
Updating Production Records In Public CloudKit Database From Console
Simple question I think, I am looking at using CloudKit instead of setting up my own server for my next app. I want to use the public database to store a list of articles that I create and the users can read. Can these articles be created/managed/edited from within the Cloudkit Console? I have seen on the video that CloudKit development records can be accessed but can I also access the records that are in production? I want to be able to login to console and add a new record to the production database but not sure if this is possible. Thanks
1
0
1.3k
Aug ’22
Keywords - Importance of multi word keyword against single keywords
A keyword list consists the following keywords word one, two, word three According to Apple I can repeat keywords in the keyword field. If this is the case does that mean the Apple will not add as much weight to or even combine a word in a 2 word phrase with a 1 word phrase? Example: I search for word one and Apple finds because it is in my keyword list. What happens if I want to look for word two? Will Apple combine the keywords and locate word two and if so will Apple add as much weight to it? I am guessing it won't because it isn't exact. I am wondering if it is better to add single keywords i.e word,one,two and let Apple combine them.
0
0
504
Sep ’21
Create ML - Image Into Multiple Classes?
I am new to ML and I am a little confused about how to go about training the model with images that contain multiple objects. Lets say for example I have an image of a lake and it contains water, mountains, sky. I would like the model to recognise each of these objects in the photo so do I simply copy the same image into classes for water, mountains etc?I have tried this with around 30-50 images and the accuracy is down around the 20-30% range.I am trying to expand a photo editing app I already have to include detection of nightime, daytime etc.Any help/guidance on this would be great thanks.
0
0
557
Feb ’20