shinyorg / shiny

.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst)
https://shinylib.net
MIT License
1.42k stars 227 forks source link

[Bug]: Push notification iOS simulator #1498

Open IeuanWalker opened 2 weeks ago

IeuanWalker commented 2 weeks ago

Component/Nuget

Push - Native (Shiny.Push)

What operating system(s) are effected?

Version(s) of Operation Systems

Hi, starting with xcode 14 iOS simulators now support push notifications - https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Simulator:~:text=Simulator%20now%20supports,these%20tokens.%20(60974170)

Looking at the code it always returns 'NotSupported' if its a simulator - https://github.com/shinyorg/shiny/blob/1b4138d42835a71447cee7b4134c7b0ef25b2f21/src/Shiny.Push/Platforms/Apple/PushManager.cs#L95C9-L96C72

Hosting Model

Steps To Reproduce

I have a 'Mac mini (M1)' running a 'iPhone 15 Pro 17.5' simulator and getting NotSupported result from await push!.RequestAccess();

Expected Behavior

Behave like a normal device and let me setup notifications

Actual Behavior

NotSupported

Exception or Log output

No response

Code Sample

No response

Code of Conduct

aritchie commented 2 weeks ago

While the simulator may support it, .NET iOS doesn't always properly push through the entitlements for the simulator. I don't want the support that comes with opening this up right now.