OnShareTargetActivated does not call OnInitializeAsync before

Jun 12, 2015 at 2:44 PM
we have written a universal app for windows store 8.1 and windows phone 8.1.
If the app is started as a share target the method OnShareTargetActivated is called in the app.xaml.cs
But before there is not called the OnInitializeAsync.

In the OnInitializeAsync we register the types for dependency injection and serialization. If we now try to process the share target request we need certain services which should be registered. But because the OnInitializeAsync method was not called nothing is registered and we get an exception. Also the NavigationService and SessionStateService of prism is not yet created. Navigation to a page is therefore not possible.

What do we wrong? Why is the OnInitializeAsync method not called before OnShareTargetActivated?
Jun 13, 2015 at 12:55 PM
I think it just a bug because share target launch was not one of the requirements we tried to address in Prism for Windows Runtime, only a normal launch or a custom deep link live tile.

If you could add an issue in our new repo here: https://github.com/PrismLibrary/Prism we will at least have that in our backlog if we do an updated Windows 8/8.1 release. Its not currently on our roadmap to do so, we are focusing on the WPF, Xamarin, and Windows 10 UWP platforms for now.

But if you use the source code from Prism for Windows Runtime and create a fix, if you can submit it as a pull request to the repo, we will at least get it integrated into the source code in our new repo and then people could pull from there if they need this.
Jun 15, 2015 at 12:44 PM
Bug created for reference here: