popUpZendo / PopUpZendoTimer

0 stars 0 forks source link

Use Data Service class instead of db collection direct access #3

Closed cupnoodle closed 4 years ago

cupnoodle commented 4 years ago

Use Data Service class instead of db collection direct access

This should fix some nil error crashes due to nil value of uid in Data Service. Refering to #2

I suggest to use DataService.instance.bodhi_collection (or other collection name) when you want to read/write to the collection.

@ShinboJosephHall You can try switch to this branch using SourceTree and test it on your iPhone or Simulator, let me know if the crash issue still occurs when user sign up/ sign in / logout

ShinboJosephHall commented 4 years ago

You rock, Axel.

That seemed to fix the crashes, but I will have a question about this for you the next time we get a chance to meet online, since it sounds like you’re suggesting that I do the opposite of what I was trying to do. Really appreciate your work here, and that allowed me to share the app with a few people to gather feedback.

Perhaps this might be a good time to ask you to take a look at the way I am segueing between view controllers. Most of what I did were simple storybook segues, which seem to create a situation where every view controller continues running and often they don’t appear to refresh when data changes. Somehow, I don’t think this is the way to do it, and I expect this may be part of the reason why the app terminates when it goes to background. While I think it is good to be able to pull the timer down a bit to peek at the settings, should the rest of the controllers be properly dismissed? If so, what do you think the beast approach might be.

I will go create an issue for this in Git.

You are appreciated in California,

/\

Joe

On Jul 10, 2020, at 2:25 AM, Axel notifications@github.com wrote:

Use Data Service class instead of db collection direct access

This should fix some nil error crashes due to nil value of uid in Data Service. Refering to #2 https://github.com/popUpZendo/PopUpZendoTimer/issues/2 I suggest to use DataService.instance.bodhi_collection (or other collection name) when you want to read/write to the collection.

@ShinboJosephHall https://github.com/ShinboJosephHall You can try switch to this branch using SourceTree and test it on your iPhone or Simulator

You can view, comment on, or merge this pull request online at:

https://github.com/popUpZendo/PopUpZendoTimer/pull/3 https://github.com/popUpZendo/PopUpZendoTimer/pull/3 Commit Summary

Use Data Service class instead of db collection direct access File Changes

M PopUpZendoTimer/Controller/Groups/GroupsCreateVC.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-bfc63a535a683ebaaf4794d26fa0998e (2) M PopUpZendoTimer/Controller/Groups/GroupsEditVC.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-7fb27f6c1c41edf509b3416eb12249c1 (2) M PopUpZendoTimer/Controller/Groups/TableViewController.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-8a0693324f326ff5c006d75cf676047d (7) M PopUpZendoTimer/Controller/HomeViewController.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-e69150562556c5162d49494ad33bb19f (6) M PopUpZendoTimer/Controller/New Group/GroupsVCTest.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-e15dda20dc2f4464ac26ddc1df5c054c (6) M PopUpZendoTimer/Controller/ProfileVC.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-b58cde94ef65c1be604ed710c516d3ad (6) M PopUpZendoTimer/View/DemoCell.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-8a81f0e35d4fd07c01cf6f4de99e2eb0 (19) M Services/DataServices.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-d10491f0d5ee5b85fa2e1bb0b0b78cf5 (69) M Services/OneSignalService.swift https://github.com/popUpZendo/PopUpZendoTimer/pull/3/files#diff-8319243955acfed34c999c81c1f86a34 (7) Patch Links:

https://github.com/popUpZendo/PopUpZendoTimer/pull/3.patch https://github.com/popUpZendo/PopUpZendoTimer/pull/3.patch https://github.com/popUpZendo/PopUpZendoTimer/pull/3.diff https://github.com/popUpZendo/PopUpZendoTimer/pull/3.diff — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/popUpZendo/PopUpZendoTimer/pull/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO5NCJ4T7EJ4NKL3GJ6UTCLR23NB7ANCNFSM4OWNH6YQ.