krikor Herlopian
krikor Herlopian

Reputation: 731

How to get Default User Agent to send to server side in the header

I want to get the default user agent, that is like operating system (ios 10) and etc info. How can I do this?

Upvotes: 0

Views: 151

Answers (1)

Poles
Poles

Reputation: 3682

Use UIDevice to get system info in iOS.

[[UIDevice currentDevice] systemName]; // e.g. @"iOS"
[[UIDevice currentDevice] systemVersion]; // e.g. @"10.0"
[[UIDevice currentDevice] model]; // e.g. @"iPhone", @"iPod touch"
[[UIDevice currentDevice] localizedModel]; // localized version of model

Upvotes: 1

Related Questions