mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2025-02-18 00:30:43 +00:00
show documents directory in iOS 11 files
This commit is contained in:
parent
a6e6014220
commit
1700d38dd7
@ -1624,6 +1624,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
DEVELOPMENT_TEAM = UJXNDZ5TNU;
|
||||||
HEADER_SEARCH_PATHS = "$(SRCROOT)";
|
HEADER_SEARCH_PATHS = "$(SRCROOT)";
|
||||||
INFOPLIST_FILE = "Mini vMac/Info.plist";
|
INFOPLIST_FILE = "Mini vMac/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
@ -1641,6 +1642,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
DEVELOPMENT_TEAM = UJXNDZ5TNU;
|
||||||
HEADER_SEARCH_PATHS = "$(SRCROOT)";
|
HEADER_SEARCH_PATHS = "$(SRCROOT)";
|
||||||
INFOPLIST_FILE = "Mini vMac/Info.plist";
|
INFOPLIST_FILE = "Mini vMac/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
@ -294,6 +294,17 @@ NSString *DocumentsChangedNotification = @"documentsChanged";
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
|
||||||
|
NSMutableDictionary *options = [NSMutableDictionary dictionaryWithCapacity:2];
|
||||||
|
if (sourceApplication) {
|
||||||
|
options[UIApplicationOpenURLOptionsSourceApplicationKey] = sourceApplication;
|
||||||
|
}
|
||||||
|
if (annotation) {
|
||||||
|
options[UIApplicationOpenURLOptionsAnnotationKey] = annotation;
|
||||||
|
}
|
||||||
|
return [self application:application openURL:url options:options];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)importFileToDocuments:(NSURL *)url {
|
||||||
if (url.fileURL) {
|
if (url.fileURL) {
|
||||||
// opening file
|
// opening file
|
||||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||||
@ -323,4 +334,22 @@ NSString *DocumentsChangedNotification = @"documentsChanged";
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
|
||||||
|
if (url.fileURL) {
|
||||||
|
// opening file
|
||||||
|
if ([url.path.stringByStandardizingPath hasPrefix:self.documentsPath]) {
|
||||||
|
// already in documents - mount
|
||||||
|
[sharedEmulator insertDisk:url.path];
|
||||||
|
} else if ([options[UIApplicationOpenURLOptionsOpenInPlaceKey] boolValue]) {
|
||||||
|
// not in documents - copy
|
||||||
|
[url startAccessingSecurityScopedResource];
|
||||||
|
[self importFileToDocuments:url];
|
||||||
|
[url stopAccessingSecurityScopedResource];
|
||||||
|
} else {
|
||||||
|
return [self importFileToDocuments:url];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -11,10 +11,8 @@
|
|||||||
<array/>
|
<array/>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>Disk Image</string>
|
<string>Disk Image</string>
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Editor</string>
|
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
<string>Owner</string>
|
<string>Alternate</string>
|
||||||
<key>LSItemContentTypes</key>
|
<key>LSItemContentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>com.apple.disk-image</string>
|
<string>com.apple.disk-image</string>
|
||||||
@ -25,10 +23,8 @@
|
|||||||
<array/>
|
<array/>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>Disk Copy 4.2 Disk Image</string>
|
<string>Disk Copy 4.2 Disk Image</string>
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Editor</string>
|
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
<string>Owner</string>
|
<string>Alternate</string>
|
||||||
<key>LSItemContentTypes</key>
|
<key>LSItemContentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>com.apple.disk-image-dc42</string>
|
<string>com.apple.disk-image-dc42</string>
|
||||||
@ -39,16 +35,16 @@
|
|||||||
<array/>
|
<array/>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>ROM image</string>
|
<string>ROM image</string>
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Editor</string>
|
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
<string>Owner</string>
|
<string>Alternate</string>
|
||||||
<key>LSItemContentTypes</key>
|
<key>LSItemContentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>net.namedfork.minivmac.rom</string>
|
<string>net.namedfork.minivmac.rom</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CFBundleTypeIconFiles</key>
|
||||||
|
<array/>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>Unknown File</string>
|
<string>Unknown File</string>
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
@ -79,6 +75,8 @@
|
|||||||
<string>9</string>
|
<string>9</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||||
|
<true/>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>audio</string>
|
<string>audio</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user