Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AppCenterSDK Hot Restart ready #1680

Closed
AlleSchonWeg opened this issue Sep 23, 2022 · 3 comments
Closed

Make AppCenterSDK Hot Restart ready #1680

AlleSchonWeg opened this issue Sep 23, 2022 · 3 comments

Comments

@AlleSchonWeg
Copy link

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.

@aleksandr-dorofeev
Copy link
Contributor

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:
microsoft/appcenter#1642
microsoft/appcenter-sdk-apple#2340
microsoft/appcenter-sdk-apple#1227

@CliffAgius
Copy link

Gets my vote as be nice to debug on iOS locally on dev devices using HotRestart.

@DmitriyKirakosyan
Copy link
Contributor

As we do not have plans to add support for this feature in the next year, I'm closing the issue.

@DmitriyKirakosyan DmitriyKirakosyan closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants