Adobe AIR : get user's video content on iOS - ios

I have to develop an AIR app for a client, that reads the video folder content and can play any video in it.
It's quite easy with Android, I can read any folder on the phone/tablet, but on iOS it's not that easy. I can't use applicationDirectory because the client wants to put videos himself later in the videos folder on iPad. (But if you have a solution to put files in applicationDirectory with iTunes or else, please share !)
I know there are some ane's that read the cameraroll content, but they display a native pickup screen, while I just need a list of the files.
I tried to use File.documentsDirectory to access content, but got no luck. If you have any idea, thanks in advance !

Ok I found a workaround : in my XML application file I added <key>UIFileSharingEnabled</key><true/> to the iPhone infoAdditions, so that I can access to app's documents through iTunes. I add files with iTunes, and I can read the content of the folder in AIR with File.documentsDirectory.getDirectoryListing()
Hope it will help someone else !

Related

How to search through iPhone filesystem downloads folder for mp3 files in react native

I'm working on an react native ios app where I want to look through the iPhone's downloads folder for .mp3 files that I can play. I've found a library react-native-fs but right now I am only able to see files added to my app and I can't figure out how to search for .mp3 files already on the iPhone. Any advice on libraries to use or code would be appreciated.
Code for my project: https://github.com/Laybium/laybium
In iOS apps have access only to their sandboxes. There's no such a thing as a Downloads folder, because there's no folder all apps may share.

How to pick(picker view) any files from ios device using objective c?

I was developing an ios application for file backup. In that I need to list and enable user to pick up files from any folder and need to do email backup like media and image picker.
I am struckup here with a bottle neck. I can't triger populating the list of document and email list for the user to pick. I had tried many codes, but it is not working.
I was working with the simulator.
Could anyone share their insight?
Regards
You should be more precise : do you want to pick up any file from any application on your device or just in your application library folder ? You can't access others applications folders.
You can find more information about the file system here :
https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
iPhone do not have a file browser.
The only place that a iPhone app can take file is from photo album.
Every application keeps its files in its private place.

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.

In SharePoint 2013, the uploaded videos are not playing on ipad and iphone

I have uploaded .mp4 videos to an Assest Library in SharePoint 2013. I can play these videos on IE and other browers but I am unable to play them on IPhone and IPAD. It is asking for Silverlight Installation. Is there any way I can play my videos on them.
Please help me.
Thanks.
I was in the same situation. You need to make an additional extra change. Initially I couldn't believe, but it is necessary to enable the blobcache for that SharePoint web application that is hosting the mp4 files in order to make them available for iPad / iPhone. When you enable the blobcache please make sure you have mp4 added as extension.
Here is an example of how the blobcache entry should look like in your web.config file. Of course please add the required adjustments based on your environment: cache location, size, extensions...
<BlobCache location="D:\SPS\BlobCache" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="true" />
You are not going to be able to get Silverlight on an Iphone/Ipad.
You should be able to simply download the mp4 files and play them direct from your device.
I had a video rendition set in the asset library and this caused a different video menu, and prompted to install Silverlight. Set the video properties so it forces the main video as default and it should play on iPad.
Cheers.

How to open a pdf on the iPad from an AIR for iOS app

I am making an AIR for iOS app that can download pdfs. I do not want to display the pdf in the app itself but want the default pdf-viewer (iBooks) to launch and show the pdf. How can this be done.
I am aware that navigateToURL can be used to open a file with the uri scheme of iBooks. But i dont know how to tell iBooks to look in the app-directory of my app. (Or is there some secret directory to place the file in from within the app - where iBooks can find it)
I have a hard time figuring out what the expected behavior should be. I can open iBooks from the app, but where should i place the file so that iBooks can get to it?
Any pointers or help would be greatly appreciated as this is somewhat of a show stopper.
If simple navigateToURL won't work as expected, I'd suggest you to look at AIR Native Extensions (ANE) and UIDocumentInteractionController (+ blog post).
Try this library
http://code.google.com/p/pavo/
I haven't used it personally. It this works you will be able to extract text / content and render back in flash / flex application.

Resources