kstenerud / KSCrash

The Ultimate iOS Crash Reporter
MIT License
4.23k stars 705 forks source link

Add new samples #511

Closed bamx23 closed 2 months ago

bamx23 commented 2 months ago

This PR adds a minimal sample for each of the supported platforms.

Supporting Xcode projects for each of the platform is a bit painful, so here I'm adding a dependency on Tuist for projects generation. The common part of the samples is managed using SPM to ensure that integration of KSCrash into samples is as close as possible to real use of SPM. Sorry, no CocoaPods (not sorry).

As a follow up, we can create a set of build jobs to ensure there's no breaking API changes (after most of the APIs are used in these samples).

bamx23 commented 2 months ago

Actually I thought that we can use one SwiftUI code for all the platforms without separate subfolders and configurations. If it's not applicable to Tuist, maybe one xcproject is not a bad solution?

While I think it can be possible, I would still have this entry point file to be separate for each of the samples. The most of the code is intended to go to that common SwiftUI library. But it's already not the same for macOS as we need to override the app delegate. 2 files per sample that you don't need to touch in most of the cases – sounds good to me.