Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change user-agent #36

Closed
JimmyYezeguelian opened this issue Apr 12, 2016 · 4 comments
Closed

Change user-agent #36

JimmyYezeguelian opened this issue Apr 12, 2016 · 4 comments

Comments

@JimmyYezeguelian
Copy link

Hi,

How can i change the user agent of the SignalR connection ?
Thank you by advance

@adamhartford
Copy link
Owner

You can't at the moment. I will add support for that very soon.

@JimmyYezeguelian
Copy link
Author

OK no problem. When do you think it will be possible ?

@adamhartford
Copy link
Owner

If you need to do this fast, you can use this line of code when your app launches:

NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent": "My User Agent"])

That'll change your user agent globally. WKWebView on iOS 9 allows you to change it individually I believe, so I'll add that support in SwiftR. But if you're supporting anything other than WKWebView on iOS 9, you'll need to use the line above anyway.

@JimmyYezeguelian
Copy link
Author

Oh perfect ! Thank you a lot !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants