简体   繁体   English

通过位置iOS App限制注册

[英]iOS App Limit Registratin via Location

I am looking to limit registration for my app on whether they are from London. 我希望限制我的应用程序注册是否来自伦敦。

I am not sure what is the best way to do this, I could use iOS' location API but not sure if this is easily hackable. 我不确定最好的方法是什么,我可以使用iOS的位置API,但不确定这是否容易被黑客攻击。

I use a PHP backend so could extract the location via GEO co-ordinates from the IP Address, but heard this could be unreliable. 我使用PHP后端,因此可以通过IP地址中的GEO坐标提取位置,但听说这可能是不可靠的。

Does anyone have any experience with this and what is the best/secure way to do this? 有没有人有这方面的经验,最好/最安全的方法是什么?

Your first idea (using the iOS Core Location API) is the best. 您的第一个想法(使用iOS核心位置API)是最好的。 Indeed, you cannot rely on IP for geolocation. 实际上,您不能依靠IP进行地理定位。 When it works, it's not accurate. 当它工作时,它不准确。 And, most of the time, it just gives a wrong location. 而且,大多数情况下,它只是给出了一个错误的位置。 And it's easily fakeable (with a VPN for example). 它很容易伪装(例如VPN)。

From my point of view, you have to rely on the iOS Core Location API. 从我的角度来看,您必须依赖iOS Core Location API。 It's the most reliable solution (and the less fakeable). 这是最可靠的解决方案(并且不那么可伪造)。 But, to be clear: I don't know any solution to be 100% sure of the user location in iOS. 但是,要明确:我不知道任何解决方案是100%确定iOS中的用户位置。 The only way would be to install some equipment in the targeted area (like iBeacons ). 唯一的方法是在目标区域安装一些设备(如iBeacons )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM