Skip to content

Commit b9d72cc

Browse files
committed
# By Jason Morcos (28) and others # Via Jason Morcos (18) and others * 'master' of https://github.com/jvanakker/tvOSBrowser: (85 commits) Update README.mdown Update README.mdown Add files via upload Delete 62808899-be123c80-baf9-11e9-9c41-76c25917fac7.png Delete 62808759-56f48800-baf9-11e9-887e-c4fe5912076f.png Add files via upload Revert the CFBundleVersion Remove the unused refresh button when full screen Fix Nav Bar default value issues Remove that issues OffsetCorrection, now, WebView the frame size(height) is compressed when nav bar appears, not the contentOffset, which can avoid massive iseeus Do not check cursor when not loading Fix the UserAgent during switch Code structure adjustment Remove the unused property Change the ivar into property Supports to save the Nav Bar settings to user defaults Arrange Top Navigation Bar into the middle Fix the <input type="search">, which is used in many search engine like Bing Using the Menu button to cancel, instead of a Standalone "Cancel" button, follows Apple Human Interface Guideline Fix that cancel does not works on search URL page ... # Conflicts: # .gitignore # README.mdown # _Project/Browser.xcodeproj/project.pbxproj # _Project/Browser.xcodeproj/xcuserdata/Jason.xcuserdatad/xcschemes/xcschememanagement.plist # _Project/Browser/AppDelegate.m # _Project/Browser/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json # _Project/Browser/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json # _Project/Browser/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Glyph.imagestacklayer/Content.imageset/Contents.json # _Project/Browser/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json # _Project/Browser/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json # _Project/Browser/Assets.xcassets/Cursor.imageset/Contents.json # _Project/Browser/Assets.xcassets/LaunchImage.launchimage/Contents.json # _Project/Browser/Base.lproj/Main.storyboard # _Project/Browser/Info.plist # _Project/Browser/ViewController.h # _Project/Browser/ViewController.m # _Project/README.mdown
2 parents 5324879 + 20ec534 commit b9d72cc

File tree

21 files changed

+506
-457
lines changed

21 files changed

+506
-457
lines changed

Icons/iconFlattened.pdf

69.6 KB
Binary file not shown.

Icons/iconFlattened.psd

99.5 KB
Binary file not shown.

README.mdown

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
tvOS Browser
1+
tvOS Browser:
2+
Web browser for AppleTV
23
=============
34

45
![Alt text](/screen01.jpg?raw=true "tvOS Browser on AppleTV")
@@ -14,9 +15,19 @@ The private UIWebView is now initialized using NSClassFromString(@"UIWebView"),
1415
How to Install tvOS Browser
1516
=============
1617

17-
To install this app, connect your Apple TV to your macOS computer via USB. Open this project in XCode and install to your Apple TV.
18+
To install this app, connect your Apple TV to your macOS computer via USB. Open this project in XCode, and first do the following:
19+
Set the proper deployment target, and change the Bundle Identifier to your own identifier:
20+
21+
![Alt text](/readme_instruction_01.png?raw=true "Change bundle ID to your own")
22+
23+
Next, remember to change to your own Team in Signing & Capabilities:
24+
![Alt text](/readme_instruction_02.png?raw=true "Change Team setting")
25+
26+
Then Run the project, with your AppleTV as target device.
1827
If your Apple TV does not have a USB-C port or you don't have a cable, connect to your Apple TV wirelessly: http://www.redmondpie.com/how-to-wirelessly-connect-apple-tv-4k-to-xcode-on-mac/.
1928

29+
30+
2031
How to Use tvOSBrowser
2132
=============
2233

@@ -26,9 +37,9 @@ Quick start:
2637
- Single tap the Play/Pause button to show the Quick Menu, with: input URLs, search Google, reload the page, or navigate back.
2738
- Double tap the Play/Pause button to: display the Advanced Menu, with: Favorites, History, set/open homepage, change user agent, clear cache, and clear cookies and more.
2839
- Single tap the Menu button to "go back" (like the back button in a traditional browser)
29-
- Single tap the TV button (to the rigtht of the Menu button) to exit
40+
- Single tap the TV button (to the right of the Menu button) to exit
3041

31-
The Avanced menu lets you:
42+
The Advanced menu lets you:
3243
- Show and hide the top navigation bar
3344
- Manage Favorites
3445
- Manage History
@@ -39,5 +50,5 @@ The Avanced menu lets you:
3950
- Enable/Disable WebView offset correction
4051
- Increase/decrease font size
4152
- Clear cache
42-
- Cleare cookies
53+
- Clear cookies
4354
- Show the usage guide

_Project/Browser.xcodeproj/project.pbxproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
B002B85A1BAE420500C744AF /* Project object */ = {
155155
isa = PBXProject;
156156
attributes = {
157-
LastUpgradeCheck = 1020;
157+
LastUpgradeCheck = 1420;
158158
ORGANIZATIONNAME = "High Caffeine Content";
159159
TargetAttributes = {
160160
B002B8611BAE420500C744AF = {
@@ -265,6 +265,7 @@
265265
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
266266
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
267267
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
268+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
268269
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
269270
CLANG_WARN_STRICT_PROTOTYPES = YES;
270271
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -292,7 +293,7 @@
292293
ONLY_ACTIVE_ARCH = YES;
293294
SDKROOT = appletvos;
294295
TARGETED_DEVICE_FAMILY = 3;
295-
TVOS_DEPLOYMENT_TARGET = 9.0;
296+
TVOS_DEPLOYMENT_TARGET = 12.0;
296297
};
297298
name = Debug;
298299
};
@@ -319,6 +320,7 @@
319320
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
320321
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
321322
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
323+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
322324
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
323325
CLANG_WARN_STRICT_PROTOTYPES = YES;
324326
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -339,7 +341,7 @@
339341
MTL_ENABLE_DEBUG_INFO = NO;
340342
SDKROOT = appletvos;
341343
TARGETED_DEVICE_FAMILY = 3;
342-
TVOS_DEPLOYMENT_TARGET = 9.0;
344+
TVOS_DEPLOYMENT_TARGET = 12.0;
343345
VALIDATE_PRODUCT = YES;
344346
};
345347
name = Release;
@@ -361,7 +363,7 @@
361363
PRODUCT_BUNDLE_IDENTIFIER = com.moballo.tvbrowser;
362364
PRODUCT_NAME = "$(TARGET_NAME)";
363365
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO;
364-
TVOS_DEPLOYMENT_TARGET = 9.0;
366+
TVOS_DEPLOYMENT_TARGET = 12.0;
365367
};
366368
name = Debug;
367369
};
@@ -382,7 +384,7 @@
382384
PRODUCT_BUNDLE_IDENTIFIER = com.moballo.tvbrowser;
383385
PRODUCT_NAME = "$(TARGET_NAME)";
384386
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO;
385-
TVOS_DEPLOYMENT_TARGET = 9.0;
387+
TVOS_DEPLOYMENT_TARGET = 12.0;
386388
};
387389
name = Release;
388390
};

_Project/Browser.xcodeproj/xcshareddata/xcschemes/Browser.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1420"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:Browser.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:Browser.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1420"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "B002B8611BAE420500C744AF"
18+
BuildableName = "Browser.app"
19+
BlueprintName = "Browser"
20+
ReferencedContainer = "container:Browser.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "B002B8611BAE420500C744AF"
34+
BuildableName = "Browser.app"
35+
BlueprintName = "Browser"
36+
ReferencedContainer = "container:Browser.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
39+
<Testables>
40+
</Testables>
41+
</TestAction>
42+
<LaunchAction
43+
buildConfiguration = "Debug"
44+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
45+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
46+
launchStyle = "0"
47+
useCustomWorkingDirectory = "NO"
48+
ignoresPersistentStateOnLaunch = "NO"
49+
debugDocumentVersioning = "YES"
50+
debugServiceExtension = "internal"
51+
allowLocationSimulation = "YES">
52+
<BuildableProductRunnable
53+
runnableDebuggingMode = "0">
54+
<BuildableReference
55+
BuildableIdentifier = "primary"
56+
BlueprintIdentifier = "B002B8611BAE420500C744AF"
57+
BuildableName = "Browser.app"
58+
BlueprintName = "Browser"
59+
ReferencedContainer = "container:Browser.xcodeproj">
60+
</BuildableReference>
61+
</BuildableProductRunnable>
62+
</LaunchAction>
63+
<ProfileAction
64+
buildConfiguration = "Release"
65+
shouldUseLaunchSchemeArgsEnv = "YES"
66+
savedToolIdentifier = ""
67+
useCustomWorkingDirectory = "NO"
68+
debugDocumentVersioning = "YES">
69+
<BuildableProductRunnable
70+
runnableDebuggingMode = "0">
71+
<BuildableReference
72+
BuildableIdentifier = "primary"
73+
BlueprintIdentifier = "B002B8611BAE420500C744AF"
74+
BuildableName = "Browser.app"
75+
BlueprintName = "Browser"
76+
ReferencedContainer = "container:Browser.xcodeproj">
77+
</BuildableReference>
78+
</BuildableProductRunnable>
79+
</ProfileAction>
80+
<AnalyzeAction
81+
buildConfiguration = "Debug">
82+
</AnalyzeAction>
83+
<ArchiveAction
84+
buildConfiguration = "Release"
85+
revealArchiveInOrganizer = "YES">
86+
</ArchiveAction>
87+
</Scheme>

_Project/Browser/AppDelegate.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ @implementation AppDelegate
1818
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
1919
// Override point for customization after application launch.
2020
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"MobileMode"]) {
21-
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"Mozilla/5.0 (iPad; CPU OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A300 Safari/602.1", @"UserAgent", nil];
21+
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1", @"UserAgent", nil];
2222
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
2323
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"MobileMode"];
2424
[[NSUserDefaults standardUserDefaults] synchronize];
2525
}
2626
else {
27-
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12", @"UserAgent", nil];
27+
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15", @"UserAgent", nil];
2828
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
2929
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"MobileMode"];
3030
[[NSUserDefaults standardUserDefaults] synchronize];
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "tv",
54
"filename" : "icon-back@1x.png",
5+
"idiom" : "tv",
66
"scale" : "1x"
77
},
88
{
9-
"idiom" : "tv",
109
"filename" : "icon-back@2x.png",
10+
"idiom" : "tv",
1111
"scale" : "2x"
1212
}
1313
],
1414
"info" : {
15-
"version" : 1,
16-
"author" : "xcode"
15+
"author" : "xcode",
16+
"version" : 1
1717
}
18-
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "tv",
54
"filename" : "icon-front@1x.png",
5+
"idiom" : "tv",
66
"scale" : "1x"
77
},
88
{
9-
"idiom" : "tv",
109
"filename" : "icon-front@2x.png",
10+
"idiom" : "tv",
1111
"scale" : "2x"
1212
}
1313
],
1414
"info" : {
15-
"version" : 1,
16-
"author" : "xcode"
15+
"author" : "xcode",
16+
"version" : 1
1717
}
18-
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "tv",
54
"filename" : "glyph@1x.png",
5+
"idiom" : "tv",
66
"scale" : "1x"
77
},
88
{
9-
"idiom" : "tv",
109
"filename" : "glyph@2x.png",
10+
"idiom" : "tv",
1111
"scale" : "2x"
1212
}
1313
],
1414
"info" : {
15-
"version" : 1,
16-
"author" : "xcode"
15+
"author" : "xcode",
16+
"version" : 1
1717
}
18-
}
18+
}

0 commit comments

Comments
 (0)