I am new on iOS. In my application, I need to get files on the phone e.g. pdf, words etc in the phone. I know iOS application has their own sandbox to work with, they have no idea of other applications.
I have read some of the extension : Document Provider and a older post importing document through this link : https://mobiforge.com/design-development/importing-exporting-documents-ios
Is there any different between the two setup in my requirement? Sorry this is my first time working on iOS.
Unfortunately, iOS does not allows to share files storage between apps from two different developers.
If you own both apps, you can use App Groups to share data and files between apps. You can read more about App Groups, and how to use the APIs here https://developer.xamarin.com/guides/ios/watch/working-with/app-groups/
Related
I have a firebase project with two iOS apps and two Android apps.
These apps needs to share databases and users so this design seems natural.
Regarding dynamic links, Android works like a breeze but I’m struggling with the iOS part.
Basic dynamic links setup is easy, the difficult (impossible?) part is to make dynamic link that routes toward the proper app, based on bundleID.
Firebase auto-generates the apple-app-site-association files but the paths components for all apps is always the same : ["/*"]
{"applinks":
{"apps":[],
"details":[
{"appID":"XXXXX.com.test.app1","paths":["/*"]},
{"appID":"XXXXX.com.test.app2","paths":["/*"]}]
}
}
As a consequence, the first app app1 always match and all deep links are directed towards this app.
At this point, i'm unable to open a dynamic link to app2.
The documentation is inexistant for this configuration, even if this fully functional on Android apps.
Am i missing something here ?
Firebase Dynamic Links has limited support for multiple iOS Apps in the same project. We are planning to improve this support, but no ETA on the dates, likely Q1 2018.
Here is one of the most typical example of Firebase Dynamic Links setup for several iOS App in one project: https://photos.app.goo.gl/apple-app-site-association
You still should be able to open app2, if app1 is not installed on iOS device.
I believe you can change order of the Apps in apple-app-site-association by deleting app1 and re-adding app1 to the project.
We do receive more requests on allowing to re-order priority of the App in apple-app-site-association file. For example, developers have free and paid App, so they actually want for dynamic link to work in both Apps.
As a workaround, you may be able to use customURL scheme to re-open correct app2, if app1 was opened when this was not desired. This would be not the best user experience.
Let me know if you have more questions, feel free to open Firebase support ticket to share private information.
As Oleksiy Ivanov has already pointed out, this boils down to the problem, that Firebase Dynamic Links doesn't support using the same URL prefix for multiple iOS apps/targets contained in the same Firebase project.
There are multiple workarounds though:
Using multiple (sub)domains
Use a custom domain
Using multiple Firebase projects
On Android it works out of the box, because you are in charge of matching paths with particular apps within the Manifest file. On iOS it doesn't work, because Firebase is in charge of such matches within the hosted apple-app-site-association file (as you've already pointed out in your question).
For further information, I've written an extensive answer here.
Is there any equivalent of Android's external/public storage concept in IOS
https://developer.android.com/guide/topics/data/data-storage.html#filesExternal
I don't want the physical external storage in iOS but at least a common public folder where multiple apps can read/write from.
Also i want to check if there is any way to share a file between two applications on a same device. My file can get huge
AFAIK with air drop i can share files between applications in different devices.
Best Regards,
Saurav
App groups can be a possible solution for your case if you are going to share data among your apps.
Otherwise creating an extension & allow user to store data in cloud storage could be a possible solution.
https://www.centerdevice.de/document-and-share-extensions-in-ios/
I have an app that downloads files from a web server. Our customer wants the ability to edit those files on their mobile devices and upload the edited version to our servers. Is this possible in iOS? I have figured out how to allow users to view the files in external apps, but I don't see a way to bring back their changes if the file was modified as it seems to copy the file into the other app's space, so my app is left with the unaltered version.
iOS has a sandbox mechanism, so for sure you can not modify any file in another app.
The only way to transfer data from different app is using sharing.
This is a sample project I wrote for implement sharing on iOS, check it:
Sample for sharing on iOS
Hope it can help you.
How can I find out programmatically all the files present in iOS device and list them out to user? Also I need to download the file in my local application database?
How this can be achieved with Objective-C.
You cannot access all files in an iOS device outside the sandbox of the app. But there are other ways you can achieve this. What you can do is:
Access all the files in Gallery using UIImagePickerController.
Access all the user files in network- Dropbox/Google drive/iCloud. They all have separate public APIs that can be downloaded and used to download/upload files in network.
In this way, you can access most of the user files and use the same in your application.
Simple answer : you can't (on a non-jailbroken device).
Each app is launched is in own sandbox and can't interact with the others apps, expect using API provided by Apple for app-communication (ex: extension)
You should look at that Apple guide about App Sandboxing, which is valid for OSX and iOS apps.
The main difference between these two OS, as quoted directly from the doc :
iOS Note: Because it is not for user documents, an OS X container
differs from an iOS container—which, in iOS, is the one and only
location for user documents. In addition, an iOS container contains
the app itself. This is not so in OS X.
You cannot access all the files outside the app sandbox. But, if they are available at some shared location(network), you can use third party libraries to access them. For eg.
1. For iCloud- iOS provides inbuilt framework of UIDocument
2. For dropbox- DropBoxAPI is available
3. For Google drive- there is a separate library to access files in the drive.
Hope this helps :)
I am writing multiple apps for iPad. All these apps have some settings in common. I therefore would like to have one app that handles the settings and write them to a file - the respective apps will then retrieve their settings from this single file. Is there a way to access one file from different apps on iOS?
The iOS Keychain may help -> http://shaune.com.au/ios-keychain-sharing-data-between-apps/ though a Google search for FireMonkey APIs for the keychain has proven fruitless. At least it could be a starting point.