devicekit / DeviceKit

DeviceKit is a value-type replacement of UIDevice.
MIT License
4.42k stars 430 forks source link

Feature Request: Check if device supports Vibration, Proximity, Physical AudioJack, SimCard slot #187

Open GabiGVeesto opened 5 years ago

GabiGVeesto commented 5 years ago

AFAIK -

  1. All iPads can't vibrate, and lack proximity sensors

  2. Products without a physical audio port(3.5mm jack):

  1. It is possible to identify if the sim is connected by: CTTelephonyNetworkInfo().subscriberCellularProvider?.mobileNetworkCode != nil but it would be much more accurate detection if we could somehow flag that a SimCard slot even exists
mtrezza commented 4 years ago

Interesting, what would be a possible use case for detecting the physical audio jack if audio target settings are systems settings anyway?

GabiGVeesto commented 4 years ago

There can be many uses, depends on what is your goal besides the rerouting of the audio by the system audio settings.

I have encountered a specific need which I'm not allowed to explain in detail.. the product of the company i work for requiers the flag that the user has a physical aux port...so i thought maybe it should exist in the kit.

It is one of the characteristics of the device so i don't see anything wrong having it available..even for just in case..

On Wed, Jan 22, 2020, 12:09 Manuel Trezza notifications@github.com wrote:

Interesting, what would be a possible use case for detecting the physical audio jack if audio target settings are systems settings anyway?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devicekit/DeviceKit/issues/187?email_source=notifications&email_token=AKXZ7FQK2PLKPRS3GKGDONLQ7ALNXA5CNFSM4HMJZGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJS7OMA#issuecomment-577107760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXZ7FS4SKVEJNWV7MGXGALQ7ALNXANCNFSM4HMJZGZA .