For example, the VLC app was able to somehow get my username (or device name?) without me ever giving it this info. Here is a screenshot that shows the VLC app greeting me by name in the app switcher. How is this possible if I never gave the app this information? Which API could it be using to obtain this info?
Asked
Active
Viewed 86 times
0
-
Possible duplicate of https://stackoverflow.com/questions/28597627/how-to-get-the-user-name-using-swift?noredirect=1&lq=1 – Martin R Jan 07 '18 at 20:16
-
1This looks like a Handover functionality. Did you use VLC on your mac the same time? – cornr Jan 07 '18 at 20:20
-
Thanks, @cornr, I think you may be on to something regarding Handoff - I do have VLC installed on both my Mac and my iPhone and it's possible that I was using both close to the same time. However, I'm not able to reproduce this with my Mac in front of me now and Bluetooth turned on on both devices and connected to the same wifi. This is very perplexing indeed. Anyway, thanks for suggesting that. – tensor2049 Jan 07 '18 at 20:55
2 Answers
0
This is possible due to UIDevice
class. It doesn't require permissions in order to get some basic system information, after all it's just your name (if you were to ask for location/health data/contacts/etc that would be something else and thus user permission is mandatory).
For more information refer to official documentation here https://developer.apple.com/documentation/uikit/uidevice

Mauricio Chirino
- 1,182
- 17
- 19
-
1Thanks for the response. My device name, however, is just "iPhone", so it makes no mention of my actual name, unless they are somehow able to get past versions of my device name, which could have had my actual name in there when I set it up or something. The documentation doesn't make any mention of being able to see past versions of the device name though, so this is unlikely. I have a hunch that it may have something to do with Handoff, like another commenter mentioned. Anyway, thanks! – tensor2049 Jan 07 '18 at 20:51
0
That's not VLC but rather iOS.
iOS suggests apps based on time and location of your device. The name is taken from your iCloud Account. VLC is not aware of that banner.

Sam
- 649
- 5
- 13