appcenter-sdk-dotnet
appcenter-sdk-dotnet copied to clipboard
Make AppCenterSDK Hot Restart ready
Is your feature request related to a problem? Please describe. If you use Xamarin Hot Restart with AppCenter SDK. The App is crashes at AppCenter.Start call with the following exception:
It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.'. Callstack: ' at Foundation.NSObject.InitializeObject (System.Boolean alloced) [0x0002e] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:342 at Foundation.NSObject..ctor (Foundation.NSObjectFlag x) [0x0000d] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:199 at Microsoft.AppCenter.iOS.Bindings.MSACWrapperSdk..ctor (System.String wrapperSdkVersion, System.String wrapperSdkName, System.String wrapperRuntimeVersion, System.String liveUpdateReleaseLabel, System.String liveUpdateDeploymentKey, System.String liveUpdatePackageHash) <0x111facb00 + 0x0000a> in
:0 at Microsoft.AppCenter.AppCenter.SetWrapperSdk () <0x111fac0c8 + 0x00012> in <6fe6a02f43c842958fca2ca674d9ab59>:0 at Microsoft.AppCenter.AppCenter.PlatformStart (System.String appSecret, System.Type[] services) <0x111fabde0 + 0x00002> in <6fe6a02f43c842958fca2ca674d9ab59>:0 at Microsoft.AppCenter.AppCenter.Start (System.String appSecret, System.Type[] services) <0x111fab8d8 + 0x00008> in <6fe6a02f43c842958fca2ca674d9ab59>:0 at MyNameSpace.InitializeAsync () [0x000e8] in aaa.cs:24 at MyNameSpace.InitializeAsync () [0x002a3] in bbb\App.xaml.cs:147 at MyNameSpace.App.<.ctor>b__4_0 () [0x0001f] in bbb\App.xaml.cs:38 ' The app has been terminated.
This is because Hot Restart has the this limitation:
Static iOS libraries and frameworks are not supported and you may see runtime errors or crashes if your app attempts to load these.
Source: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/deploy-test/hot-restart#limitations
Describe the solution you'd like Try to use non static iOS libraries or frameworks.
Hello @AlleSchonWeg Thank you for proposing this feature request! AppCenter Apple SDK is shipped as a static library by design and we dont have plans to change it in near future. Lets keep this feature request open and see home many upvotes it gets. Related issues: https://github.com/microsoft/appcenter/issues/1642 https://github.com/microsoft/appcenter-sdk-apple/issues/2340 https://github.com/microsoft/appcenter-sdk-apple/issues/1227
Gets my vote as be nice to debug on iOS locally on dev devices using HotRestart.
As we do not have plans to add support for this feature in the next year, I'm closing the issue.