Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #671 from BarakaAka1Only/master
Browse files Browse the repository at this point in the history
macOS Sierra and above Blocked Plugin Fix + Legacy Xcode Building
  • Loading branch information
jacobwgillespie authored Mar 13, 2019
2 parents ff301fd + c39398f commit c242bc3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions radiant-player-mac/WebView/CustomWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ - (void)awakeFromNib
// Sets UserAgent to Safari Version 12.0 (14606.1.36.1.9) running in macOS Mojave 10.14
[self setApplicationNameForUserAgent:@"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15"];

// Check if we are macOS Sierra or higher
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) {

// Since we are doing a custom user-agent, lets show the app version of Radiant
NSString * RadiantVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey: @"CFBundleShortVersionString"];

// Push and set our custom strings
NSString* RadiantBarakaAgent = [NSString stringWithFormat: @"Safari Radiant Player/%@", RadiantVersion];

//Use our default user-agent and push our custom string
[self setApplicationNameForUserAgent:RadiantBarakaAgent];

//Testing is needed right?
//NSLog(@"navigator.userAgent = %@", RadiantBarakaAgent);
}

[self setResourceLoadDelegate:self];
[self setUIDelegate:self];
[self setFrameLoadDelegate:self];
Expand Down

0 comments on commit c242bc3

Please sign in to comment.