-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find index.html #6
Comments
Just make a folder |
that said, when I build it myself in Xcode, it always loads the github page. |
I think the readme is quite outdated, here is how to let it work as it's "advertised": Steps(I'm a total newbie for Xcode and iOS/Mac development, so I described every detail and my have some mistakes.)
webView = [[WebView alloc] initWithFrame:[self bounds] frameName:nil groupName:nil];
[webView setFrameLoadDelegate:self];
[webView setMainFrameURL:[NSString stringWithFormat:@"file://%@/index.html", [[NSBundle bundleForClass:[self class]] resourcePath]]];
[self addSubview:webView];
// [self loadWebView];
Some explanationWhat I did in Xcode is to let it actually read file from [webView setMainFrameURL:[NSString stringWithFormat:@"file://%@/index.html", [[NSBundle bundleForClass:[self class]] resourcePath]]]; This is the code the author committed at first: 7369c4a But this logic was removed at commit of 1d62ad2#L6L20, don't know why... |
I think it was removed so the preferences dialog lets you choose a URL. A simpler solution is to edit "loadWebView" method. change [webView setMainFrameURL:[defaults valueForKey:URL_KEY]]; to [webView setMainFrameURL:[NSString stringWithFormat:@"file://%@/index.html", [[NSBundle bundleForClass:[self class]] resourcePath]]]; I think a better-still solution would be a radio button for selecting local file or remote URL in preferences dialog. |
Works fine for me too. |
Make where? In home directory? |
@rifler In |
(right-click, "Show Package Contents" for Web.saver) |
I'm trying to edit the URL to a page I want as my screensaver, but I can not find ' Web.saver/Contents/Resources/index.html ' in any of the files.
When I explored Web.saver's package contents I couldn't find a Resources dir / folder.
.
The text was updated successfully, but these errors were encountered: