Skip to content

Commit

Permalink
macOS Sierra and above Blocked Plugin Fix + Legacy Xcode Building
Browse files Browse the repository at this point in the history
Thanks to @xrubioj for pointing the his solution

This fix addresses the Blocked Plugin issue and UI properties are
usable than a blanked out UI from @xrubioj original PR
radiant-player#670

Legacy Build System is needed so i enabled it in my workspace

Only if you set `UseModernBuildSystem=NO` in the Workspace setting

```
Xcode 9.3 adds a new IDEWorkspaceChecks.plist file to a workspace’s
shared data, to store the state of necessary workspace checks.
Committing this file to source control will prevent unnecessary
rerunning of those checks for each user opening the workspace.
```
  • Loading branch information
BarakaAka1Only committed Nov 2, 2018
1 parent 39da217 commit 55fc72e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
<false/>
</dict>
Expand Down
18 changes: 17 additions & 1 deletion radiant-player-mac/WebView/CustomWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -321,4 +337,4 @@ - (NSPoint)touchPositionForTouches:(NSSet *)touches
return position;
}

@end
@end

0 comments on commit 55fc72e

Please sign in to comment.