Permalink
Browse files

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

  • Loading branch information...
1 parent 5caf3ed commit 26ab88ecb9298dfd2011f8e42af0a580fc99193c @matthackedit matthackedit committed Apr 17, 2011
Showing with 11 additions and 0 deletions.
  1. BIN OnslaughtArena.icns
  2. +2 −0 WebViewExample-Info.plist
  3. +9 −0 WebViewExampleAppDelegate.m
View
Binary file not shown.
@@ -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>
@@ -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

0 comments on commit 26ab88e

Please sign in to comment.