harshmantri88 / FlutterSimNumberPlugin

Get SIM Details from Android Device
MIT License
0 stars 4 forks source link

iOS Error #1

Open gauchok opened 2 years ago

gauchok commented 2 years ago

Hello, I am implementing simnumber 0.0.12 but in iOS I get the following error, I have already carried out the install pod correctly, could you help me?

[SimNumberPlugin registerWithRegistrar:[registry registrarForPlugin:@"SimNumberPlugin"]];

Use of undeclared identifier 'SimNumberPlugin'

udayBloxXyz commented 1 year ago

Sam i am also getting

husleuujii commented 11 months ago

any fix here?

miguelfeb02 commented 9 months ago

alguna solucion ?

hsynksahin commented 7 months ago

I have the same problem here, turns out probably there is no pod for this package, the IOS tag on this package might be mistaken.

With some searchings over the internet I can say that the Apple protects the phone number information of the user from the applications. Which means there is no valid way to directly get phone number on an ios device. And some says that even at Android this might not work.

So Best way to "validate" the phone number (like we know the phone number already but is this the right device we are in) is sending a hashed message to the phone number and force auto-read the message (don't let the user fill it).

In the other hand if you want to get user's phone number, just use a textfield (I suggest you can use flutter_multi_formatter's phone_input_formatter for this job) and then if needed send message to the phone, make user put the validation code you've sent or read it from the message.