How do I run Interactive PDF files in iPad? - ios

I am trying to run Interactive PDF files in iPad using Xcode.
I have successfully run simple PDF file in iPad using Xcode. But when I tried to run interactive PDF file which contains videos then in iPad simulator it skips the videos in the PDF and simply run the PDF.
Please help me out in this matter.

This is difficult, because most PDF viewers (and engines) just concentrate on the graphical representation. Interactive elements like hyperlinks, javascript and videos are generally not supported.
Unless you find a ready-to-use engine (maybe Adobe has something like that as an SDK?) it will be difficult. There are a lot of video codecs and formats that you'd need to support.

Related

Is it possible to embed an existing SWF into an Air for iOS app?

One of my customers has many SWF and he would like to port them to iPad. However, he only has the SWFs, not the FLAs.
I 'd like to know if it is a way to run the SWFs inside an Air for iOS app. I´ve read you can import then with a Loader, but they will only run as an animation ignoring all the code inside them.
Thanks, any help is welcome!
[UPDATE] I´ve read something about using SWC, but still not sure if they will run the code.
Update, Oct 2012:
In Adobe AIR 3.5, adl is introducing a feature called "multiple SWF support" that allows the use of Loaders to load SWFs delivered in the .ipa (local files, not from servers) to have code in them. The adl compiler AOT compiles SWFs that are included in the .ipa, allowing them to be loaded and work under iOS.
AIR 3.5 is currently in beta at the time of this writing, available on the adobe labs site:
AIR 3.5 on Adobe labs website
AIR 3.5 release notes
Note that this feature requires -swf-version=18 or greater of the root SWF (not necessarily the assets being loaded) and AIR namespace ending in 3.5 in the application xml file.
Older answer:
The reason external SWFs with code in the doesn't work is that Air's ADT compiler cross-compiles your root SWF (and only your root swf) into objective-c code consumable by an iOS device. Both [embedded] SWFs and those included in the .ipa (prior to AIR 3.5) are not cross-compiled.
I created a workaround for this problem for embedded assets:
[Embed(source="gameLevel.swf")]
private var gameLevel:Class;
...
addChild(new gameLevel());
In this scenario, if gameLevel.swf has code in it, it typically wouldn't work in iOS, because new gameLevel() would create a Loader and interpret SWF bytecode. But, if you first run the above SWF through my tool called SWFMerge, it will take your embedded SWF and merge it into your root SWF. The result is that ADT will compile your embedded code into objective-C, it will work on iOS, and note: new gameLevel() now results in an instance of your asset - NOT a Loader.
The SWFMerge tool is here:
http://www.onetacoshort.com/temp/SWFMerge_alpha.swf
LMK if this workaround works for you or if you have trouble. Cheers!
-Jeff
Yes you can,
Apple does not allow your application to download SWF's using Loader from the internet but you ARE allowed to embed and include them inside of your .ipa
To do this you would use the embed tag
[Embed("myswf.swf", mimeType="application/octet-stream")] private var mySwf:Class;
You can then use
swf = new mySwf();
swf.addEventListener(Event.COMPLETE, completeHandler);
And interact with the swf inside that complete handler
I wanted to add to this that it is possible to compile a SWF that is not able to be loaded

Convert Flash to iOS app

For the record, I am an iOS developer, and have absolutely no background on how flash programs work/run/developed...etc.
I have a Flash program that is mostly a collection of SWF files. It does, however, contain some Actionscript, Javascript and other integrated languages here and there..
I would like to convert this project/program to an iPad application. Is it possible?
What I got from searching the net:
Converting Actionscript to LUA script
Using Corona SDK to port the program to iOS
Starting a new iOS project in flash and moving the code somehow..
Other tedious ways which are not feasible at all....
The above mostly handles the actionscript part .. what about the SWF files?
As a last resort, one could at least guide me to a developer/company who can handle this task, or provide training to accomplish this.
Additional details
The flash program app file is already generated, and the program works on desktops perfectly. The program is somehow an interactive e-book, and it has some linked XML files to index the table of contents and other sections...
I've not done a lot of iOS development yet, but here are my experiences so far; maybe they help you form a better idea.
Only the main SWF can contain actionscript code.
I'm not sure how far assets (Sounds, Fonts, MovieClips) in other SWFs which are exported for actionscript are accessible to the main SWF.
It is possible to include additional XML files (and other types) which can be loaded via the normal loader classes.
Recently I came acrosshe tool which allows you to convert and play swf to some cross-platform frameworks. Now they support only Cocos2d-x, Unity 3d and Starling. But I saw the logo of Corona on their homepage. You can go there and ask them. I don't remember the right name of the site, but tool is called GAF converter

AS3 - Instantiating objects from external .swf in iOS

I'm looking to load external .swfs that have graphical assets in them which are all 'exported for actionscript', and instantiate those assets in a .swf packaged for iOS.
I'm using the adt command line packager to create the .ipa file. I'm including the .swf files while packaging. The .swf files seem to load correctly, and give me no errors, but when the Loader for each .swf's bytesLoaded equals bytesTotal the content property remains null.
The program works perfectly when I package the .ipa using the -target ipa-test-interpreter flag, but not when I use the -target ipa-test.
I'm assuming the problem is that iOS doesn't allow Flex developers to load external .swf files that contain actionscript, and the 'export for actionscript' in the external .swf files counts as actionscript for the purposes of Apple's security policies. I'm looking for confirmation as to whether or not this is the problem.
When using adt to package .ipa files, does iOS block external .swf files that have library assets that have been 'exported for actionscript'?
Similar discussion:
http://forums.adobe.com/message/3728665
Thanks!
J
This IS possible.
However there are some limitations.
You cannot use AS3 in the swf's if they are not loaded from the app
source.
And you have to run all the code in the same ApplicationDomain, which
can cause weird errors with duplicate class names and such.
This is a official article from Adobe about how to do it:
http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/
I highly recommend using swc's as suggested by others tho, since it simplifies the process in many cases.
You are not allowed to load external swf files on apple devices when you are creating a app.
the solution for you would be: put all your graphics and everything else into swc file and then compile the one ipa file.

What types of files can the built in iPad Web Browser handle natively?

What types of files can the built in iPad UIWebView handle natively? It seems to handle PDF files and image files fine with loadRequest URL's, but it can't handle Excel spreadsheets. What is the complete list of files that it is capable of showing natively?
Apple's documentation is here:
http://developer.apple.com/iphone/library/qa/qa2008/qa1630.html#//apple_ref/doc/uid/DTS40008749
They claim it does support Excel (.xls); perhaps you have a xlsx or a problem with mimetypes on the server? (Though that list is the iPhone OS 3.0 list, but I can't see why they'd have removed any supported formats on the iPad.)

Ruby/Rails Audio Conversion Plugins?

I am looking for a good gem/plugin to convert user-uploaded audio files to different formats. One format in particular that I am interested in is converting to Apple .caf with ima4 compression for inclusion in an iPhone app.
I have been using afconvert on my mac for this so far, but I need to do it on my linux box, server-side. Ideally, I would be able to work into paperclip.
As an additional solution, ffmpeg could work, but I have not seen any .caf options for it. Anybody know of one?
The Sound eXchange project supports lots of audio file conversions. I've used this in the past to convert aiff files output by the OS X "say" program to ulaw files for Asterisk. This yields rather nice text-to-speech. For my purposes, I also found a Ruby extension on github called sox-ruby that wraps the libsox functions directly.

Resources