microsoft / react-native-test-app

react-native-test-app provides an app for all supported platforms as a package
MIT License
586 stars 87 forks source link

fix(macos): add anchor points for `applicationWillFinishLaunching(_:)` #2188

Closed tido64 closed 3 weeks ago

tido64 commented 3 weeks ago

Description

Add anchor points for applicationWillFinishLaunching(_:) to make it easier for config plugin authors to target the correct override.

Platforms affected

Test plan

n/a

Saadnajmi commented 3 weeks ago

@tido64 Long term, should the ifdefs be more granular? AKA, ifdefs inside the method and only one method definition?

tido64 commented 3 weeks ago

@tido64 Long term, should the ifdefs be more granular? AKA, ifdefs inside the method and only one method definition?

For AppDelegate.swift in particular, I think we want to create two more files, AppDelegate+Multi.swift and AppDelegate+Single.swift, and move the appropriate extensions to them. Single app mode requires significantly less logic to start up the app so I think what you're suggesting makes it harder to see what each mode actually implements.