How to attach a file from ipad in your application? - objective-c

I have developed an application in ipad, i want to browse a file from ipad and attach it to my apps..it should not be like e-mail attachment..am sorting out the code but am gettin code for only email attachment

The only files on the iPad your app will be allowed to browse are the files inside your app's sandbox or those accessed using a framework like the Assets Library Framework. As for "attaching a file to your apps", what do you mean by that? Can you clarify?

Related

Google Picker Api attach shared file

I implemented Google Picker Api in my app, and I attach files from drive to my app.
Is there any possibility to attach in my app files which are shared with me,
I can select them but I can not attach them

How to get the URI scheme of any app for AppLinks/universal linking?

I need to open a third-party app from my react native mobile app. I understand that this is called universal linking on iOS and AppLink on Android.
I have done a lot of research for this, and I have been able to set up a link to the third party app on the app store. Now I just need to get my app to open up the app if the user has it installed. That requires the URI scheme of the other app, though.
My question is, how do I get the URI scheme to this third party app? Rather, how do I get the URI scheme of any app? I know the URI scheme of the twitter app is 'twitter://app', but the app I am trying to link to is way more niche than twitter or other popular apps, so there is no help for this sort of thing online.
Any tips?
Finding the URL scheme of an iOS app
Due to Apple's tendency for secrecy, it's not easy to find the URL scheme of an iOS app. But it can be done. Here's how I do it, using a Mac app called iMazing.
Launch iMazing, select a connected iOS device, click Apps:
In the footer of the window, click Manage Apps:
Select the app you're interested in , then select Export .IPA menu item. Note: You may need to download the app first.
The saved file will have the .ipa extension. Change the extension to .zip, and unzip the file. You now have a directory with the name matching the app's name.
Assuming "asana" is the app name, open the file "asana/Payload/asana.app/Info.plist" in a text editor, and search for a section that contains "CFBundleURLSchemes". Assuming the app contains CFBundleURLSchemes (they are optional), it should look something like this:
The URL scheme is in the <string>asana</string>, so the complete url scheme in this case is "asana://". Test that the URL launches the app by typing it into iOS Safari browser window. If it works, Safari should display an alert like this:
What About Apps Without CFBundleURLSchemes?
I haven't found a way to launch apps without CFBundleURLSchemes directly, but you can link to the app's page in the App Store, where the user can open the app with the Open button (or Get button if the app is not installed).
You will need to obtain the app page's URL from the App Store:
Open App Store, go to the app's page, click the share icon:
Click Copy Link:
The URL will look like this:
https://apps.apple.com/us/app/asana-organize-tasks-work/id489969512
Clicking on that link in Safari will bring up the app page in the App Store.
Maybe it is worth to start with some background:
There are various ways to deep link into an app, and it depends on the platform (iOS\Android\WindowsPhone...) and its version.
On iOS, up until version 9, the way to open an app was by using URI schemes, e.g. the one you added above: twitter://app. Each app declares the scheme that should be used. Therefore in order to deep link into the app you wish to open, you'll need to use the scheme that it declared. This is the same for Android until version 6.
Starting iOS9+, Apple introduced Universal Links as the method for deep linking. Here's some information: https://developer.apple.com/ios/universal-links/
In these versions, URI schemes won't longer work when using Safari browser (which is the iOS default browser) if the app is not installed. If the app is installed, however, URI schemes should allow opening the app, if everything is configured successfully. In Android there's a similar method called "AppLinks".
Having said this, the above information is for setting deep link for your app. I do not think that it is a common use case to open a third party app from your app - deep links are configured and used by the app owner (e.g. for publishing his\her app to engage users).

OSX iCloud share files between apps

Is it possible to share files between different applications though iCloud? For example may I export epub book from my app to make it appear in iBooks or export a document to Pages from my application? And is there any way to get this files or pictures from photo stream in my application?
You won't be able to write files to another's application sandbox, precisely because the Sandbox won't let you write outside your app's container. What you can do is invoke a save panel to let the user export the file as an ebook wherever he wants. He can then open the file in Pages and move it to the cloud there.
And no, there is no API to access your Photo Stream.

Need clarification in Dropbox sample application

I need to integrate DropBox in my application. I tried dropbox sample application downloaded from www.dropbox.com. While working with that app after Login to dropbox, it goes to Random photo controller and there when we press the Random Photo Button, it is showing the Alert that "Put .jpg photos in your Photos folder to use DBRoulette!. But in dropbox website, there are three .jpg images.
Check your dropbox folders ... you will have a new one called Apps. One of the subfolders will be your apps root folder. Place a photo there with jpg or jpeg extension and it should work.

PDF and Titanium SDK

I'm trying to make a app which is able to display PDFs. It should be possible to click web links within the document and dynamically load new PDFs into the app.
The file download and REST/JSON communication shouldn't be a problem but the PDF part looks kinda hard. Is there a way to display PDFs via the Appcelerator Titanium SDK?
This is app is targeting the iPad and iPhone.
You can show pdf files using Titanium.UI.WebView