I have created a stand-alone HTML, CSS, JavaScript offline map view using Leaflet (see leafletjs.com). I can use FileApp/DiskAid to download the application to the iphone. I can tap on the HTML file and view the app, but as you can see from the attached screen shot, the layers and zoom controls are at the top of the screen. If I try and press them then your HTML viewer with block the press and slide down a banner (BACK, ACTIONS, etc) (the black top banner that your viewer shows).
Better yet, I would like to open it with SAFARI since it has the NITRO JS engine, but the only OPEN IN options I get are Evernote, RiddleDocs, Mover, and DropBox.
Is there way to tell safari or chrome for IOS to open up a local file system where the html is: http:// 127.0.0.1/fileApp/Toby.html for example where Toby is my HTML file? I realize is somewhere it the data for t
First Step :-
These options are configured using keys in your Info.plist file. The first key is UIFileSharingEnabled, which enables iTunes sharing of files in your Documents folder. The second key is LSSupportsOpeningDocumentsInPlace, which grants the local file provider access to files in your Documents folder. Add these keys to your Info.plist and set their values to YES.
enter image description here
enter image description here
let documentPicker = UIDocumentPickerViewController(documentTypes: [String(kUTTypePDF)], in: .import)
documentPicker.delegate = self
documentPicker.modalPresentationStyle = .overCurrentContext
present(documentPicker, animated: true, completion: nil)
You can use option either to import or export files from app. Also you can define the type of files you want to export or import...
Related
I did a cocoa application in which the file dialog box is opening when a button is tapped with the use of NSOpenPanel controller in cocoa applications.For ipad applications we are using UISplitViewController.
I want to know that for developing the applications in iphone,what controller to be used for opening a file dialog box when a button is tapped.
For example in composing a mail.In composing a mail,if we want to attach any files from the local drive,we click the "Attach a File" button. Then it will opens a file open dialog box for selection of file what we want.
Can any one help me or suggest me what controller to be used for opening a file in iphone applications?For opening a file dialog box ,in
cocoa applications --------- Controller used is NSOpenPanel
ipad applications --------- Controller used is UISplitViewController
Like wise for i phone applications ------- ??????
Please help me out of this?
iOS doesn't have a concept of browsing arbitrary local files.
It does have the ability to browse for images from the photo library — for that you can use UIImagePickerController.
Other than photos, the only files you can even open are ones that are inside your own sandbox folder (i.e. ones that you've put there yourself). There isn't a built in view controller that will display them — you'd have to write your own that will read the list of files using something like NSFileManager contentsOfDirectoryAtPath:error:, and display them in an appropriate UI.
My app is registered for certain file types, images + pdf etc, following the guidelines
provided by Apple. My app does show up("open in" option) when pdf files are encountered
in mobile-safari, but it is not the case with image files. In the default "Photos"
app provided by apple, the "open in" option does not show up. Probably this is because
it is implemented without using the document interaction controller. But is there any
way to make my app appear in the UIActionSheet button, which appears at the bottom left
corner ?
I do not want to use the UIImagePickerController for choosing the saved images.
the only thing you can do is add this key-value pair to your info.plist file. iPhone saves pictures in ".JPG", so that's what you should put as the file type.
(if it doesn't appear in Photos action sheet, that means that Apple doesn't want it to appear. You'll just have to hope that some day...)
p.s. more information and detailed instructions here:
Registering the File Types Your App Supports
Xcode4 is asking for a huge number of arguments just to make this simple thing possible:
NSString *stringURL = #"twitterriffic://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
What are all these properties for? Why an image? Must I repeat the app identifier here? What role to choose if I want anyone to be able to call this URL to open my app? And what are these Additional url type properties for?
I found no Xcode4-related tutorial how to register such an URL scheme with Xcode 4.
Open "Supporting Files" (folder) on left and click the "YourAppName-Info.plist"
Choose a row like "Bundle creator OS Type Code" and mouse over row and click the (+) symbol
This creates a new row and type "URL types"
Click the arror to left and see Item 0 and you'll rename the value in Item 0 to "URL Schemes" as shown
Then edit the field in Item 0 and type in your prototocol; I typed in "goomzee" as shown
Now if I install this app on my simulator, and open Safari and type "goomzee://" in the address bar it will launch my app.
Yup, this stuff isn't straightforward is it ?
I've outlined the steps required to register a custom URL here:
Custom URLs
But, basically the key to it is setting up a "URL Types" value in your .plist file. Here's what it looks like in XCode 5:
In this example, I've registered the MKB prefix, so now, I can use this new type of URLs in hyperlinks on webpages, and emails (if I read an email in the iPad Mail app):
If a user taps on one of these links, my iPad app will start up, and I can access the full URL string, to extract the other parameters from the URL (eg "DocumentNumber=100")
The only gotcha is that I have yet to work out how to test whether a user has an iPad app installed which can recognise a particular prefix.
If they haven't, and they tap on one of these MKB:// links on their iPad, they'll get an ugly error message:
You can continue to register your custom URL by editing your app's info.plist file (as shown in one of your previous questions). The new editor in Xcode 4 is supposed to be a convenience to make it easier to add the entries - all it is doing is making the same info.plist changes that you would do manually. If you want to use the new editor then you only need to fill in the 'Identifier' and the 'URL Schemes' boxes. You don't need an image, icon or additional URL properties.
The other properties (icon etc) are not well documented but seem to be applicable only on Mac OS X and might be used in the Finder's Get Info dialog to display what types of URL a particular app can open. For example, take a look at the Launch Services Programming Guide.
What you change in that editor is also reflected in your project's info plist file. It takes the form of ProjectName-Info.plist. Hopefully that helps.
I found some interesting URL http://cubiq.org/rotating-wheel-for-your-iphone-webapps which has rotational menu. Its good. It has html file along with images, css files etc.
In iPhone app, I copied (to root folder) all the files and imported to project. I'm using UIWebView's load request to load the html. But I'm not getting the rotatable menu.
Can some one post me the code (or tutorial or prototype or example) on how to use it?
Also let me know how to catch the even on click on "OK" button at the middle of the html.
Thanks in advance.
checkout IUI : http://code.google.com/p/iui/
i am making an app for iphone and for that i am using certain free libraries.My problem is that i want to show their complete license of nearly 4-5 pages in my application bundle so that a user can open settings in iphone and see that licensing page at one time but i am unable to do it.I have read these Specifiers for making an application bundle .
PSGroupSpecifier
PSTitleValueSpecifier
PSTextFieldSpecifier
PSSliderSpecifier
PSToggleSwitchSpecifier
PSMultiValueSpecifier
PSChildPaneSpecifier
but i want to show a page full of text like Settings->General->About->Leagl
just like in iphone through PSChildPaneSpecifier .Please help me how to do this>???
Thanks
You can create the same effect as used by Apple's iWorks apps for the license > section of the settings, without using any custom preference controller. Note this works for iOS 5 on the iPad, I have not tried it elsewhere. Use a PSChildPaneSpecifier for the initial control in the root plist. This points to the name of another plist file which will be the displayed child pane. You do not add .plist to the name within the root.plist file, it is implied. This plist file must be within the settings bundle. Next, use PSGroupSpecifiers in the child pane as the controls. For each paragraph use another PSGroupSpecifier - so the thing will scroll. Only use the Title section of the PSGroupSpecifier. The next gotcha that I found, was that by putting the strings in the plist file, the text was clipped in portrait orientation, so a placeholder string needs to go in the plist file and a StringTable used to point to a strings file. Text read from the strings file is properly kerned and displays without clipping.
The iPhone's "Legal" page is a custom preference controller which you can't use (not even with undocumented methods – you need to write a preference bundle in system locations which AppStore apps can't reach at all).
If you'd like to display the license, show it in the app.
I think you are going to need to use something like a UITextView, just make it non-editable. You can make in unobtrusive in your app but I think that is the only way to have 4-5 pages.
I don't think there is a nice way of displaying this in the preferences bundle. Personally I would either provide a series of url links or bring the preferences into the app itself. There is a good framework on github here that you may be able to modify.