I am trying to change the User-Agent in iOS, however when I add my custom User-Agent it appends it to the existing User-Agent that contains my app name.
This is the code
To override the default user agent, use setValue:forHTTPHeaderField: instead of addValue:forHTTPHeaderField:. For example:
setValue:forHTTPHeaderField:
addValue:forHTTPHeaderField:
[request setValue:@"MyUserAgent (iPhone; iOS 7.0.2; gzip)" forHTTPHeaderField:@"User-Agent"];