Skip to content

Custom ViewModel Causes App Crash #154

Closed Answered by cbaker6
gazishahi asked this question in Q&A
Discussion options

You must be logged in to vote

The Swift Playgrounds is runnable, what happens when you deploy a local server following: https://github.com/netreconlab/Parse-Swift?tab=readme-ov-file#test-drive-parse-swift

and run the actual Playground file which has an optional ParseError:

//: To create a custom view model that queries GameScore's.
class ViewModel: ObservableObject {
@Published var objects = [GameScore]()
@Published var error: ParseError?
private var subscriptions = Set<AnyCancellable>()
init() {
fetchScores()
}

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@gazishahi
Comment options

@jaysonng
Comment options

@gazishahi
Comment options

Comment options

You must be logged in to vote
3 replies
@gazishahi
Comment options

@cbaker6
Comment options

Answer selected by gazishahi
@gazishahi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants