Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding steps for the Completing your native Mac OSX App built in HTML…

  • Loading branch information...
commit 26ab88ecb9298dfd2011f8e42af0a580fc99193c 1 parent 5caf3ed
@richtaur richtaur authored
View
BIN  OnslaughtArena.icns
Binary file not shown
View
2  WebViewExample-Info.plist
@@ -7,6 +7,8 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
+ <string>OnslaughtArena.icns</string>
+ <key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
View
9 WebViewExampleAppDelegate.m
@@ -14,9 +14,18 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}
- (void)awakeFromNib {
+ WebPreferences *prefs = [webView preferences];
+ [prefs _setLocalStorageDatabasePath:@"~/Library/WebViewExample/LocalStorage"];
+
NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
NSString *htmlPath = [resourcesPath stringByAppendingString:@"/htdocs/640x480_naked.html"];
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
+
+ [window setDelegate:self];
+}
+
+- (void)windowWillClose:(NSNotification *)aNotification {
+ [NSApp terminate:self];
}
@end
Please sign in to comment.
Something went wrong with that request. Please try again.