Document Picker in React Native - ios

Scenario: Say end-user got a attachment in mail app in ios. And user wants to upload this file in my app.
In React native is there any good working component? I want to use it to create facility where my user can upload files( not images).
Any help would be appreciated.

As suggested by #jaineshdoshi, component hosted at www.npmjs.com/package/react-native-document-picker can be used as document picker..
ps: since ios 11 has file app, this solution might work differently on older ios version

Related

Is there a way to open an editor app in ios and receive edited results?

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.

Generate PDF for IOS in Xamarin

Does anyone know if its possible to create PDF files in Xamarin for ios? I know there is a library called Apitron, is there anything else besides this?
Thanks
You can go to the Xamarin Component Store to search for PDF libraries. Some are free, some require a one-time purchase. You can visit the store here.
Since Xamarin.iOS provides bindings to the native APIs for iOS development, you could probably use the instructions from Apple's documentation to infer the same calls in your Xamarin.iOS app.

Writing to a file in my iOS app

I have an app that downloads files that need to be edited and submitted back to the server through the app. These files could be anything, but are most likely to be .docs. I want to be able to open and edit these files in another app on the device, such as a .doc editor.
I've been able to get this functionality to work in similar Android and Chrome apps, but I'm very new to iOS so I'm not sure what my options are.
Is there a way to give permission for another app to edit a file that is in my app's sandbox? If not, is there a way to get the file back for submittal (like finding it through a file explorer launched through my app - similar to an 'Open..." file explorer dialog used in Windows/Mac OS/Chrome)? Am I going to have to create a way for the editor app to share the edited file back to my app?
Thanks in advance for your help!
To manage the file and the paths take a look at the documentation for NSFileManager:
https://developer.apple.com/LIBRARY/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html
I usually write using NSFileHandle for reading and writing:
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileHandle_Class/Reference/Reference.html
Hope this helps.
iOS8 will provide methods to allow apps to co-operate with "extensions".
See "Creating Extensions for iOS and OS X, Part 1 & 2` in the WWDC14 videos.
Also see the Apple "App Extension Programming Guide".
I ended up sending the file to a 3rd party app for editing and then sending the file back from the 3rd app to my app.

Saving Images in Database

I am working on Worklight Developer Edition Version 6.1. I have created a native component inside a Hybrid app. I am using WL.NativePage.show method for navigating from HTML to native pages. I am having 5 images in an array in a native page. I need to save those images in a DB and need to access the same in a HTML page.
Can anyone tell me, how to do this using DB? (should be common for both Native and Web app)
Can I use Worklight JSONStore in Developer Edition ?
Worklight 6.1 does not support JSONStore in native pages.
Possible solution:
What you can do instead is save the images locally using native code.
Then, in order to access these locally-saved images via the web portion of the app, you could write a custom Cordova plug-in to access it.
You will need to consult with the iOS SDK documentation regarding how to save the file locally.
Some resources:
Download an Image and Save it as PNG or JPEG in iPhone SDK
Adding native functionality using Cordova plug-ins

SwfUpload flash uploader not visible and not working in IOS

i am working on a web application based on media gallery.In this application i am uploading media using SWFUpload either images and videos.When i try to open my application on IOS then uploader not visible there.Where it is working fine on safari installed on windows.I want some suggestions from experts of this field.
one site who is using SWFUpload is http://www.ehproductions.com/mediaimage.htm.
Here SwfUploader working nice on windows but not on IOS machines.
Is there any javax html5 compatible uploader?
Thanks in advance.
According to the description of the SWFUpload:
SWFUpload Upload files to a server via flash and listen all the events
from JavaScript.
As all we know there is no flash on the iOS devices, and as result ­— uploader not visible there. But the problem is not only in the flash. iOS misses html file input, so you cannot use the same tools you use with other OS/browser. Take a look at this question - "A html5 web app for mobile safari to upload images from the Photos.app?", — for possible workarounds.

Resources