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

[Bug]: iOSNotificationsManager.RequestPermissionAsync #81

Open
1 task
TryLastOne opened this issue Nov 22, 2023 · 3 comments
Open
1 task

[Bug]: iOSNotificationsManager.RequestPermissionAsync #81

TryLastOne opened this issue Nov 22, 2023 · 3 comments

Comments

@TryLastOne
Copy link

TryLastOne commented Nov 22, 2023

What happened?

iOSNotificationsManager.RequestPermissionAsync (System.Boolean fallbackToSettings)
System.ExecutionEngineException: Attempting to JIT compile method 'void Com.OneSignal.iOS.OSNotifications:RequestPermission (Com.OneSignal.iOS.OSUserResponseBlock,bool)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

Steps to reproduce?

1) Create Xamarin.Forms app.
2) Add OneSignalSDK.DotNet packages for iOS, Android and Shared projects.
3) Build Release with Linked SDK assemblies, then deploy iOS app to iPhone device.
4) Run App.
5) Call RequestPermissionAsync will get the error.

What did you expect to happen?

Show notification prompt on iOS app.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shepherd-l
Copy link
Contributor

What version of Xcode and .Net are you using?

Are you using a Mac or Windows machine?

Are you able to reproduce the error on Debug builds?

@TryLastOne
Copy link
Author

TryLastOne commented Nov 29, 2023

Hey @shepherd-l,
Thank you for your response.

What version of Xcode and .Net are you using?

== > .NET Core SDK: 6.0.417, 7.0.102, 7.0.202, 7.0.306, 7.0.404, 8.0.100
Xcode 14.2 Build 14C18
Xamarin.Mono: 6.12
Xamarin.iOS: 16.2

Are you using a Mac or Windows machine?

==> MacOS 12.7.1 (21G920) on Intel Chip X64. Build configruation: Release

Are you able to reproduce the error on Debug builds?
==> not tried to build with Debug.

Additional information: The same project built on the latest MacOS (Sonoma), Xcode (15.0.1), Mono (6.12.0.188), Xamarin.iOS (16.4.0.23) and Release configuration on M2 chip (ARM64), the issue was not happened.

@emawby
Copy link
Contributor

emawby commented Jan 17, 2024

@TryLastOne I am not able to reproduce this issue but it seems similar to these xamarin/xamarin-macios#12416
dotnet/maui#7396
The newer releases of this SDK will be using the .net7 build tool chain instead of the legacy Xamarin build tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants