Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

support doc interaction

  • Loading branch information...
commit edc55b11e0d6a7638c469269249f1521a7b8d3ae 1 parent f2f3364
@robin authored
View
5 Classes/iChmAppDelegate.m
@@ -79,7 +79,8 @@ - (void) setPreference:(id)pref ForFile:(NSString*)filename
[defaults synchronize];
}
-- (void)applicationDidFinishLaunching:(UIApplication *)application {
+-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
// dynamically add a method to UITableViewIndex that lets us move around the index
Class tvi = NSClassFromString(@"UITableViewIndex");
if ( !class_addMethod(tvi, @selector(moveIndexIn), (IMP)tableViewIndexMoveIn, "v@:") ) {
@@ -97,9 +98,9 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application {
// Configure and show the window
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
+ return YES;
}
-
- (void)applicationWillTerminate:(UIApplication *)application {
[NSURLProtocol unregisterClass:[ITSSProtocol class]];
// Save data if appropriate
View
39 Info.plist
@@ -6,6 +6,25 @@
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeIconFiles</key>
+ <array>
+ <string>redbird.png</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>CHM Document</string>
+ <key>LSHandlerRank</key>
+ <string>Owner</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.robinlu.ichm.chm</string>
+ </array>
+ </dict>
+ </array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
@@ -33,5 +52,25 @@
<string>MainWindow</string>
<key>UIFileSharingEnabled</key>
<true/>
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeDescription</key>
+ <string>CHM Document</string>
+ <key>UTTypeIdentifier</key>
+ <string>com.robinlu.ichm.chm</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <string>chm</string>
+ <key>public.mime-type</key>
+ <string>application/x-chm</string>
+ </dict>
+ </dict>
+ </array>
</dict>
</plist>
View
8 iChm.xcodeproj/project.pbxproj
@@ -745,7 +745,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iChm_Prefix.pch;
INFOPLIST_FILE = Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_LDFLAGS = "-licucore";
PRODUCT_NAME = iChm;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
@@ -764,7 +764,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iChm_Prefix.pch;
INFOPLIST_FILE = Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_LDFLAGS = "-licucore";
PRODUCT_NAME = iChm;
PROVISIONING_PROFILE = "";
@@ -830,7 +830,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iChm_Prefix.pch;
INFOPLIST_FILE = Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_LDFLAGS = "-licucore";
PRODUCT_NAME = iChm;
PROVISIONING_PROFILE = "CFDF946C-8876-4278-B35D-FDF0411AEB01";
@@ -866,7 +866,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iChm_Prefix.pch;
INFOPLIST_FILE = Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_LDFLAGS = "-licucore";
PRODUCT_NAME = iChm;
PROVISIONING_PROFILE = "EB345737-FA5E-452F-99FB-CB36449DC9F9";
Please sign in to comment.
Something went wrong with that request. Please try again.