Post

Replies

Boosts

Views

Activity

Simulator Error due to Python3
Sure, here's the translation: Hello, I am at a beginner-intermediate level in Swift coding. Lately, I have been trying to improve my skills. When I run the simulator, I get the following error: "The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log." I wrote this feedback, and they responded: "That looks like you are adding some Python modules to lldb, but have a cycle in the import." I don’t know how I did this. Whenever I open a new project, I always encounter the same error. Can someone please help? Diagnostic Text
0
0
501
Aug ’24
Question about UserDefaults saving.
Hello, I am trying to build a flashCard app. I am a beginner. I have 2 structs. One for my cards and one for my deck. and one class that includes both. struct KnowledgeItem: Identifiable, Codable {     var id = UUID()     let name: String     let knowledge: String } struct Deck: Identifiable, Codable {     var id = UUID()     let Deckname: String     let Decksubject: String } class Decks: ObservableObject {     @Published var decks = [Deck](){         didSet {               if let encoded1 = try? JSONEncoder().encode(decks) {                   UserDefaults.standard.set(encoded1, forKey: "Decks")               }           } @Published var itemsInDeck = [KnowledgeItem]() init() {         if let savedDecks = UserDefaults.standard.data(forKey: "Decks") {             if let decodedItemss = try? JSONDecoder().decode([Deck].self, from: savedDecks) {                 decks = decodedItemss                 return             }         }  decks = []       } } I can save my decks. But, I don't know how to save its cards.
0
0
1.1k
Nov ’21
Simulator Error due to Python3
Sure, here's the translation: Hello, I am at a beginner-intermediate level in Swift coding. Lately, I have been trying to improve my skills. When I run the simulator, I get the following error: "The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log." I wrote this feedback, and they responded: "That looks like you are adding some Python modules to lldb, but have a cycle in the import." I don’t know how I did this. Whenever I open a new project, I always encounter the same error. Can someone please help? Diagnostic Text
Replies
0
Boosts
0
Views
501
Activity
Aug ’24
Question about UserDefaults saving.
Hello, I am trying to build a flashCard app. I am a beginner. I have 2 structs. One for my cards and one for my deck. and one class that includes both. struct KnowledgeItem: Identifiable, Codable {     var id = UUID()     let name: String     let knowledge: String } struct Deck: Identifiable, Codable {     var id = UUID()     let Deckname: String     let Decksubject: String } class Decks: ObservableObject {     @Published var decks = [Deck](){         didSet {               if let encoded1 = try? JSONEncoder().encode(decks) {                   UserDefaults.standard.set(encoded1, forKey: "Decks")               }           } @Published var itemsInDeck = [KnowledgeItem]() init() {         if let savedDecks = UserDefaults.standard.data(forKey: "Decks") {             if let decodedItemss = try? JSONDecoder().decode([Deck].self, from: savedDecks) {                 decks = decodedItemss                 return             }         }  decks = []       } } I can save my decks. But, I don't know how to save its cards.
Replies
0
Boosts
0
Views
1.1k
Activity
Nov ’21