From SWF to AIR to iOS application - iphone

I have existing Flash application, which compiles to SWF and runs on web. I'm looking at converting that application to work on mobile devices such as iPhone/iPad.
I see that there is now a way to publish Adobe Air applications on mobile devices. My thought is why not convert SWF to AIR application and then use that AIR application to publish on mobile devices. Does it make sense? Is this even possible or doable?
What are people doing to convert their existing Flash SWF applications to work on mobile devices?

This question was just answered here, but to recap any Flash content can be packaged to iOS or other mobile device with AIR.
AIR can be overlaid to Flash Professional or Flash Builder, or your SWF can be packaged using the ADT command line packager:
Download AIR 3.0 SDK.
Assure JRE, or use the one from Flash Builder.
Execute adt to package your SWF to an IPA:
adt -package -target [ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc]
-keystore iosPrivateKey.p12 -storetype pkcs12 -storepass qwerty12
-provisioning-profile ios.mobileprovision
HelloWorld.ipa
HelloWorld-app.xml
HelloWorld.swf icons Default.png
It's important to note that all executable code must reside in a single SWF to run on the iOS platform. SWFLoading or any dynamically loaded SWF that executes code is not supported. So, link all your Flash to a single SWF.
There are other considerations, such as optimizing performance and handling multiple screen resolutions and aspect ratios.
References:
http://www.adobe.com/devnet/air/articles/packaging-air-apps-ios.html
http://www.adobe.com/devnet/air/articles/packaging-air-apps-android.html
http://www.adobe.com/devnet/air/articles/packaging-air-apps-blackberry.html

There are a few ways to achieve this:
You can download Adobe AIR SDK, and follow their help or this tutorial. This method would be a bit tedious if you are not comfortable with command line, but it is perhaps the most powerful option because you get to tweak and control a lot of options.
If you have the FLA file, the latest version of Flash CS6 should provide you the means to create IOS IPA file more effortlessly. If you are a Windows user, you would need to get the p12 file as well as mobile provision file. Adobe has documentations on how to do that without a Mac. Eventually when your IPA is ripe for AppStore, you would need a Mac.
Keep in mind that the user experience of an SWF would not right away translate well for iOS. For example, the size of buttons, the affordance of interactive user controls, and most importantly, mouseover events could sometimes adversely impact the experience of a mobile app.
But those problems have nothing to do with SWF, as I have seen similar issues with other HTML-based web apps too.
Good luck, I would say writing Flash and it runs everywhere including iPhone/iPad is truly an amazing thing that most people don't know.

I have been doing this exact thing for a year or so.
You do have to set up your certificates using the keychain on the Mac, and you have to upload the app from a Mac. However, I do not have a Mac . . . instead, I rent time on a remote Mac using (macincloud or others), and use DropBox to send the files back and forth.
Depending on how the SWF was created, you do not necessarily need to buy Adobe products. I use FlashDevelop, which sets up the latest Air and Flex SDKs automatically. As long as you have a developer's license, you can create the Air application from that, and you can also create the IPA file for loading into iTunes (or Google Play, or others).
Make sure you have read #JasonSturges response as well. Good tips and links.

Related

How to embed flash files in iOS app

I have some flash files and i need to integrate those files in iPad app. i searched lot but everyone's answer is
- iOS will not support flash.
- even if you integrate flash files app store will not accept.
But my app is not for app store this is an enterprise app. Instead of integrating flash files we can do all the animation in our objective-c itself. But client is demanding to integrate flash files in iPad app. Is there any alternate solution. Please guide me.
Sure you can run Flash apps on iOS, you just have to build them using AIR:
Adobe AIR is a cross-platform runtime that enables you to use your
existing Flash/ActionScript or HTML/JavaScript development skills and
tools to build and deploy applications, games, and videos outside the
browser and on mobile devices.
Here is the specific resources page on how to build Flash ActionScript 3 apps targeting any iOS device.
The beauty of AIR is that if the code of your app is well organized, you can reuse most of it for any build being it for Android, iOS, Blackberry, or even a desktop app (windows and macosx) or the web.
Hybrid way:
Flash to html5 conversion then open HTML document using webview
Google swiffy:
Swf to HTML 5
Note:
maximum of 1 mb only be converted at present
Link:
click here
Adobe wallaby:
Fla to HTML 5
Note:
At present cs5 only supported.the lower versions have to be resaved in cs5 to convert.
Link:
click here
Native way:
Adobe air:
One could run actioscript flash content directly in ios devices.
Note:
At present you could make stand alone ios apps only you can't integrate with existing app.
Link:
click here
It is a detour only, but you could install the Photon browser and call it from your app.

Is there any benefit to buy a Mac over Windows PC just to make and test HTML5 web apps and sites for iphone even if I'm already having iPhone?

I know native app development for iOS is not possible on windows but for Web Apps Development it's possible on all OS.
Is there any benefit buy a iMac or Macbook over Windows PC just to make and test HTML5 + CSS3 Web apps and sites for iphone? If I'm already having iPhone.
As I already have iphone and ipad so i think I don't need Emulators of iOS SDK.
1) Can having Mac improve productivity in making Web Apps not Native apps?
2) Are there any better Web Development tools available on MAC to make Mobile Websites and Web Apps for iPhone compare to windows?
3) Currently whenever I want to test something on iphone safari I upload first all files into my ftp (online) then i open the url from iphone safari. But If I buy mac and install Apple SDK, can I run local html files directly on iPhone emulator.
Note: My question is not related to making iOS native applications.
If there are any better tools, it's not worth the cost of a Mac. You're best sticking with your PC, especially if you've never used a Mac before (or if you've not used one often),
Simple things like the window controls being on the "wrong" side of the window and not doing the same thing as their window counterparts ("maximise" is not the same on Mac) can cause annoyance and cost time.
Testing files locally isn't exactly the same as remotely, and the emulator will not match the iphone, as the user agent strings are different. Also the simulator is designed for native apps primarily so I'm betting the Safari on it is not exactly the same as on a device. Basically you can't beat the device.
To be honest (I am a mac fan and always have been) if you are switching to mac for just for testing purposes it really wouldn't be worth it. You said in your question that you have a an iPhone and iPad both of those can connect to a local network and you can preview on them. Testing iPhone and iPad event on the iOS emulator really... sucks. You dont get any of the touch events or the slides so you really do need the real thing. I just finished developing a full HTML5 webapp for the iPad/phone and I had to go out and buy an iPad for testing; the simulator would not cut it at all.
Now on the other hand if you want to switch for a development environment I have always been a fan of OSX. For two main reasons
The fact that the development tools
for mac are amazing, Coda, TextMate,
Sequel Pro, and CSS Editor alone
make my computer worth it.
It's UNIX, if you are a web designer
or developer who does not dabble in
unix then this does not matter but I
manage servers all over the world
for about 30 different clients and
the fact that OSX is UNIX underneath
makes getting in and out, scripting,
and moving files sooo easy. Try scp
with putty... it's no fun.
I hope this helps,
TL;DR version: For testing don't buy one it's not worth it. For the full package do it.
No. if you are already comfortable using a PC then stick with it. There aren't any better web development tools on the mac then the pc (personal tastes aside).

Force download mp3 for mobile site on iPhone

I'm working on a little mobile site for a musician and they want to be able to let users download a song for free on their mobile device. The problem I'm running into is that in Safari for iPhone the song plays in the browser no matter what and does not get added to the music library.
On Android I've been able to force a download which the user can then add to their music application of choice. I was hoping there was some way to get the song into the iPhone music library with out requiring some additional application or going through iTunes.
Any help would be greatly appreciated. Thanks!
It is not possible to have Mobile Safari download a media file from your site to a device's library. That and many other parts of the iOS filesystem are protected from external access.
Safari on iOS 13 and up finally supports file downloads, just like Android and Chrome.
According to a senior level Apple Support Rep, Apple has coded their OS to specifically prevent any audio file that does not have DRM protection, to be downloaded. This means Apple products will force a file to stream as opposed to downloading the entire file. Finding an official statement from Apple is difficult so the closest I could get was talking to a senior rep. You can, of course, call apple for free support with ANY apple product (including I-tunes on windows lol) by calling 1-800 My Apple. Most likely you can get additional confirmation there.
I actually created a site where if you click on a link with a windows or android device, it forces the download. This doesn't work on Apple devices, it still will only stream. The only real fix for this is to offer the file as a compressed file. (ie. zip) then they could download the compressed file but then they would have to open the .zip up and extract the audio.
Ironically, I'm currently looking into how I can use PHP to "zip" a file up on the server side per client request and then deliver them the file in the compressed format. I stumbled across this post because I was attempting to see if there was a way to fool a system into believing a file was in fact protected when it was not.
Hope this helps.

AS3 Packager for iPhone: Can the app download content?

I am in the stages of designing a magazine concept for a client, taking the printed version and adding animated and interactive content, it seems Flash would be the obvious choice, and something which I am reasonably skilled with.
If I build the Magazine app with Flash, will the app be able to download additional issues? if so please point to any resources on the subject if possible.
You can use the Packager for iPhone to get Flash content on an iOS device. However, you can't download compiled Flash files (.swf) to the iOS device and execute them after the app has been installed.
From the developer documentation:
Loader
In an iPhone application, you cannot
use the Loader.load() method. However,
you cannot run any ActionScript code
in SWF content loaded with the
Loader.load() method. However, you can
use assets in the SWF file (such as
movie clips, images, fonts, and sounds
in the library). You can also use the
Loader.load() method to load image
files
If you would like to use InDesign and some of the other tools that Adobe Makes, you can consider the so called Digital Publishing Suite which is a toolset that was used to make some of the iPad magazines such as Wired or Martha Stewart Living.

Can we Integrate flash in iPhone application?

I want to integrate flash in my iPhone application so is it possible to integrate?
You can write apps in Flash that will run on the iPhone by using the Packager for iPhone. It only works with Flash and not Flash Builder. Adobe just released a revision after Apple changed its SDK license again so that it can run. Note that to run on the iPhone your app has to be compiled by Flash to a native iPhone app. You can't run just any SWF.
Also yesterday Adobe announced AIR 2.5 which claims to let you program for one runtime (AIR) and target multiple platforms including iPhone and iPad. The release notes explain that they will be updating their Packager to work with AIR 2.5 for feature parity with AIR 2.5 for Android.
There is an application called Packager for iPhone from Adobe, which can be used to make iPhone app from Flash. I never used it though, but I think you should give it a try.
No.
Adobe Packager appears to only be able to create entire apps, not library code that will integrate inside a larger app. There also is no complete Flash interpreter in a form that you might be able to bundle with your app (although there appear to be a few open source projects that claim to run a limited subset of Flash). Thus there is no way to integrate Flash into a larger iPhone application that will run offline.
Online, you might be able to run a Flash application remotely on a server, and serve the graphic results to an iPhone app using something like the VNC protocol.
A new parser called hiramkei will soon be available for adding Flash animation SWF files into Xcode projects for iPhone. Here is the site http://www.flash-on-iphone.com/demo