-5

Is there a method or way in Swift to check if a user has visited a certain webpage or website?

I know a question was asked for this already:

How can I access browser history in my iOS project?

Or, maybe, is there a way to track if the phone has made a request from a certain IP?

I just want to create a condition to see if a user has visited my website.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
Simon
  • 1,095
  • 2
  • 11
  • 29
  • 1
    And on the question you linked, the answer was a rather clear 'no' – Kai Aug 11 '17 at 21:04
  • Possible duplicate of [How can I access browser history in my iOS project?](https://stackoverflow.com/questions/38901132/how-can-i-access-browser-history-in-my-ios-project) – temp Aug 11 '17 at 21:10

2 Answers2

2

No.

Due to the application sandbox for third party apps, you cannot track/access previous network requests outside your app.

Learn more about app sandboxing here.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
0

The only way I can think of doing this is to get current IP of the user:

Swift - Get device's IP Address

Then do a get request to see if it is in my server logs. But this is not very reliable as they may have visited the website on a different network.

Could request a location one the phone and on the browser then compare lat and long to see if in a radius... still, not a reliable solution.

Simon
  • 1,095
  • 2
  • 11
  • 29