diff --git a/radiant-player-mac.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/radiant-player-mac.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/radiant-player-mac.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/radiant-player-mac.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/radiant-player-mac.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings index 08de0be8..a3f43a8b 100644 --- a/radiant-player-mac.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ b/radiant-player-mac.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -2,6 +2,8 @@ + BuildSystemType + Original IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded diff --git a/radiant-player-mac/WebView/CustomWebView.m b/radiant-player-mac/WebView/CustomWebView.m index 5deaf472..b61ed333 100644 --- a/radiant-player-mac/WebView/CustomWebView.m +++ b/radiant-player-mac/WebView/CustomWebView.m @@ -30,6 +30,22 @@ - (void)awakeFromNib [self setAcceptsTouchEvents:YES]; [self addSubview:swipeView]; + // Check if we are macOS Sierra or higher + if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) { + + // Since we are doing a customer 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]; @@ -321,4 +337,4 @@ - (NSPoint)touchPositionForTouches:(NSSet *)touches return position; } -@end \ No newline at end of file +@end