Closed iDefault09 closed 1 year ago
DataBuilder.swift isn't meant to be used, even if you did update it, it's not called anywhere (I should just delete this file).
The data model is defined in https://github.com/rrnarayan1/omni-crosswords/blob/master/crosswords/crosswords.xcdatamodeld/crosswords.xcdatamodel/contents
See https://github.com/rrnarayan1/omni-crosswords/blob/master/crosswords/Firebase/JsonToCrossword.swift for how JSON document from Firebase is transformed to the Crossword model.
I believe the app isn't working for you right now because it won't contain the needed permissions to call the Firebase backend (GoogleService-Info.plist is in the .gitignore), so no crosswords will be fetched. I cannot share this file publicly.
Give me a while to see how I can support others wanting to work on this / add instructions to the readme.
I thought I could use DataBuilder.swift to generate a mock crossword instead of Firebase online DB.
What I think would be best to make the app work locally: is to take one random crossword and use it instead of the full online Firestore (full DB of crosswords isn't needed for code improvements by other people).
So instead of DocumentSnapshot
use a hardcoded json string? And ask people to remove Firebase manually, it's not big of a deal.
PS and yes the credentials to Firebase should be in .gitignore, that is expected.
Yep, I agree with your thinking, and that was what I was planning.
Hi @iDefault09 - I have included instructions for how to enable local development in the README. This will enable you to build the app without the Google-Services file, and it will automatically show one crossword in the list that pulls from a local json file. Let me know if you have other questions!
Hi, I love Omni Crosswords app, thank you for working on it! I wanted to read the code and try the app, but unfortunately, right now it's impossible to run the app. There is no data model and the DataBuilder.swift file (which I suppose should generate a sample crossword) was updated two years ago.
Could you paste any crossword in JSON format here, and I will figure out the fields and update DataBuilder.swift?