improve native android cache clearing #947
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors and extends the cache-clearing logic in
Main.csfor the Maze Runner Unity app. The main focus is on improving platform-specific cache clearing, especially for Android and iOS, and making the code more modular and maintainable.Cache clearing improvements:
ClearUnityCachemethod into a newClearCachemethod that delegates to platform-specific cache clearing functions (ClearUnityCache,ClearAndroidCache,ClearIOSCache), improving clarity and maintainability. ([features/fixtures/maze_runner/Assets/Scripts/Main.csL156-R330](https://github.com/bugsnag/bugsnag-unity/pull/947/files#diff-de9904b5ccc03c4a50ec009435ca97d7ec0aa87d63812badfa9a0d27659e77d1L156-R330))[features/fixtures/maze_runner/Assets/Scripts/Main.csL156-R330](https://github.com/bugsnag/bugsnag-unity/pull/947/files#diff-de9904b5ccc03c4a50ec009435ca97d7ec0aa87d63812badfa9a0d27659e77d1L156-R330))ClearIOSDatatoClearIOSCachefor consistency with other platform-specific methods. ([features/fixtures/maze_runner/Assets/Scripts/Main.csL156-R330](https://github.com/bugsnag/bugsnag-unity/pull/947/files#diff-de9904b5ccc03c4a50ec009435ca97d7ec0aa87d63812badfa9a0d27659e77d1L156-R330))Codebase cleanup and consistency:
ClearCachemethod instead of the oldClearUnityCachemethod, ensuring that platform-specific logic is used. ([features/fixtures/maze_runner/Assets/Scripts/Main.csL135-R133](https://github.com/bugsnag/bugsnag-unity/pull/947/files#diff-de9904b5ccc03c4a50ec009435ca97d7ec0aa87d63812badfa9a0d27659e77d1L135-R133))[features/fixtures/maze_runner/Assets/Scripts/Main.csL46-L48](https://github.com/bugsnag/bugsnag-unity/pull/947/files#diff-de9904b5ccc03c4a50ec009435ca97d7ec0aa87d63812badfa9a0d27659e77d1L46-L48))