Place an AppEvents widget on the native home page and put a nanoflow in the onload action. WIth recent Mendix releases the navigation allows a nanoflow call
This might not be the cleanest solution, but it should work. Maybe someone else has a better idea:
Create a blank default homepage that only includes a button linked to the Nanoflow were you want to perform this start-up logic. Then use the HTML snippet widget to load some javascript that automatically clicks on that button. At the end of your nanoflow you could open the proper homepage.
I was able to achieve my requirement using App Events widget.
Placed the App Events widget on home page. From the Timer tab, a configuration like this worked for me. It triggers the nanoflow only once when app is started.
Other options like app events → on resume or on page load/unload will trigger the nanoflow multiple times. The above timer event set to once fulfilled my requirement of executing a nanoflow once when user launches the app