Skip to content

Commit

Permalink
Change user agent to Safari to fix WhatsApp Web update
Browse files Browse the repository at this point in the history
  • Loading branch information
stonesam92 committed Jul 9, 2015
1 parent 0542b0e commit a15e4cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WhatsMac/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[_webView addObserver:self forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:NULL];

//Whatsapp web only works with specific user agents
_webView._customUserAgent = @"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36";
_webView._customUserAgent = @"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A";

NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://web.whatsapp.com"]];
[_webView loadRequest:urlRequest];
Expand Down

0 comments on commit a15e4cd

Please sign in to comment.