parse-community / Parse-Swift

The Swift SDK for Parse Platform (iOS, macOS, watchOS, tvOS, Linux, Android, Windows)
https://parseplatform.org
MIT License
308 stars 69 forks source link

Make backingStore optional rather than force unwrapped #445

Closed alessdiimperio closed 10 months ago

alessdiimperio commented 1 year ago

New Pull Request Checklist

Issue Description

While testing one perhaps doesn't want to initialize Parse or all other dependencies. however Installation.current is optional but it's backingStore is force unwrapped causing a crash when trying to get .current installation if Parse hasn't been initialized rather than just returning nil.

Closes: issue

Approach

removed ! added ? made it compile 🤷

TODOs before merging

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this pull request!