What is the best way to distinguish on a server between a request that came from an iPhone through the web browser vs through an iphone with an app written in objective c? What differences do I look for in the user agent string?
相关问题
- Angular RxJS mergeMap types
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- Google Apps Script: testing doPost() with cURL
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- Is a unicode user agent legal inside an HTTP heade
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- is there a “rails” way to redirect if mobile brows
It seems that iPhone Apps using the UIWebKit HTTP request component have user agent string like the following
While Safari on iPhone has mostly the same string but ending with " Safari/XXX"
However, it is also possible to change the user agent of UIWebKit then there is no guarantee that you'll grab every iPhone app by proceeding this way.
Indeed the user agent will be different.
in PHP, you can find out with this: $_SERVER['HTTP_USER_AGENT']
I believe user agents from the Safari app start with "Mozilla", while user agents from apps start with the name of the app.