I put the above code into my apps info.plist although I did change <key>UTExportedTypeDeclarations</key> to <key>UTImportTypeDeclarations</key>
and then in the app delegate I am putting
-(BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
if (url != nil && [url isFileURL]) {
// do something with the URL
}
returnYES;
}
and then this;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];
if (url != nil && [url isFileURL]) {
//it has been suggested that I put [self.viewcontroller handleOpenURL:url];
or self.window.rootViewController hanleOpenURL:url];
but neither work so I left them out.
}
returnYES;
}
I have also use the code:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>.jpg</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.jpeg</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>.au</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.ulaw-audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>.aiff</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.aiff-audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>.aif</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.aifc-audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>.caf</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.coreaudio-format</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>.m4a</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mpeg-4-audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>.mp3</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mp3</string>
</array>
</dict>
</array>
The audio files work great but I cannot get the image files to work. I have tried .png, .tif, .pct, and .jp2 int the latter code. Nothing seems to work.
I don't know what I am doing wrong and I am finding it very frustrating without any help.
Thank you for any assistance you can render.