Archive

Posts Tagged ‘flash’

How to publish an iPhone/iPad/iOS Application with the Adobe Packager for iPhone without using a MAC

November 5th, 2010 Radu Cocieru No comments

I’ve been experimenting lately with the Packager for iPhone on Windows and realized how much of the hustle that can be.

So here is a step by step tutorial that will transform your SWF file into an IPA ;) .

I Assume you are already registered with Apple as an iOS developer.

I used openssl (download) for windows to generate the needed certificates and for needed conversions, it’s free and quite easy to install.

Step 1: Generating a Certificate Signing Request

Replace the COUNTRY_CODE, STATE,CITY,COMPANY,DEPARTMENT to whatever you need.

Command Line:

 openssl req -new -newkey rsa:2048 -nodes -out CertRequest.csr -keyout CertRequest.key -subj "/C=COUNTRY_CODE/ST=STATE/L=CITY/O=COMPANY/OU=DEPARTMENT/

this will generate an output like this:

Loading 'screen' into random state - done
Generating a 2048 bit RSA private key
.........................................................+++
......................+++
writing new private key to 'CertRequest.key'
-----

Step 2: Submit the Certificate Signing Request to Apple

- Login to your Developer Account @ Apple
- go to the iOS Provisioning Portal
- Certificates section
( direct Link )
And upload the CertRequest.csr generated in the previous step.
*Make sure you have installed the WWDR intermediate certificate, link is available on the Certificates page or submit will fail.

Step 3: Convert the Apple’s developer_identity.cer to .p12 needed by iPhone Packager

Once your certificate request got approved download it by default it’s saved as developer_identity.cer.

You will need the CertRequest.key from Step 1.

Open a command line again and type:

openssl x509 -inform der -in developer_identity.cer -out developer_identity.pem
openssl pkcs12 -export -out DeveloperIdentity.p12 -inkey CertRequest.key -in developer_identity.pem

Output:

Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:

Now you have your Certificate (DeveloperIdentity.p12) that you can use with the iPhone Packager.

This was easy … but it’s not over yet.
To use the packager you will also need a Provisioning file that you have to get from Apple’s iOS Provisioning Portal.

Step 4: Making a .mobileprovision file

Got to the Provisioning page and hit New Profile
- Enter a Profile Name
- Tick the Certificate you’ve requested at step 2
- Select an App ID (or create one ) .. and remember it you will need it later
- Select the devices (or add one) you would like to test on

Download the file once Apple approved it (refresh the page in a minute or two).
I’ll assume the name of the file is: DeveloperName.mobileprovision

Almost finished.

Step 5: Making the IPA file

Flash CS5 in the iOS profile use the DeveloperName.mobileprovision and DeveloperIdentity.p12 files and make sure you the Application ID is the same you used for making the mobileprovision file

Click Publish and wait… it will take a while…

Adobe AIR, Flex edit the *-app.xml in the ID tage put the same Application ID you used for making the mobileprovision file.

make sure the application xmlns is 2.0 not 2.5

<application xmlns="http://ns.adobe.com/air/application/2.0">

add this

<iPhone>
   <!-- A list of plist key/value pairs to be added to the application Info.plist -->
   <InfoAdditions>
    <![CDATA[
        <key>UIDeviceFamily</key>
        <array>
            <string>1</string>
            <string>2</string>
        </array>
        <key>UIStatusBarStyle</key>
        <string>UIStatusBarStyleBlackOpaque</string>
        <key>UIRequiresPersistentWiFi</key>
        <string>YES</string>
    ]]>
    </InfoAdditions>
</iPhone>

Last step is to drag the IPA in iTunes and than into your connected device.

&nbps;

I hope this is useful, happy iOS codding :D

Categories: Thoughts Tags: , , , , ,

Flash Player feature request

March 14th, 2009 Radu Cocieru No comments

We are working on an OSGI framework implement in AsctionScript 3 FP9+ that can be used for both Flex and Flash combined  if needed.

As you may know one of the key features of an OSGI framework is the way it defines bundles interoperability using services and service consumers.
Some bundles may export services that other bundles will consume. The framework offers means of subscribing and unsubscribing from services, the service consumers than cast the framework provided object to the needed ServiceInterface. This way strong typing and code hinting is available during bundle design and the dependency to any particular ServiceImpl is removed.

There are 2 ways that I found that this could be implemented, but both ways have major drawbacks.

Solution 1: The first thought would be to load every bundle in it’s own ApplicationDomain this would make sure no name space collusions will occur and no other bundle will be able to access it’s content directly (not impossible but rather difficult).
Scenario:
BundleA export a service using the IService interfae and BundleB consumes this service, both Bundles are compiled  with the Interfaces build in.
Drawback: when BundleB code will cast the Framework.getService(IService) as IService … it will obviously get null, since the IService interface in BundleA and BundleB are of 2 different versions. Even though their code is identical VM considers them 2 distinct definitions since they are in 2 distinct ApplicationDomains. If the BundleB will not cast it to IService it will be able to call methods and access public properties, but no compile time checking and  generally error-prone.
Also Only objects available into the parent application domain will be accessible using their names everything else is just generic Object.

Solution 2: Another way to implement this would be to load everything into the main ApplicatonDomain, which will solve the above drawback but will add others.
Scenario: BundleA uses a class called HashMap version 1, Bundle B uses the same class HashMap but version 2, Version 2 is backwards compatible with Version 1, but not the other way around.
Drawback: if the first to load will be BundleA then it will register the HashMap v1, and when BundleB loads it’s v2 of HashMap will be ignored so BundleB will most probably misbehave, throw exceptions etc. and this errors are quite difficult do debug.

A way around Solution 1′s Drawback would be to export the interfaces to a separate SWF file and load it into the main ApplicationDomain, Interface collisions are less likely to occur in a flash application (relatively low complexity compared to potential server-side complexity). But this requires lots of configuration to be done during compile time, as the interfaces need to be explicitly excluded from 1 SWF and Included in another, and it still not solves all of the potential problems.

One of the reasons we cannot find a way around them is the ApplicationDomain beeing final. Although we understand the security reasons for it being final, we still think it’s a bit too restrictive. There should be a mechanism for one ApplicationDomain to import definitions from another ApplicationDomain if the SWF loaded into that ApplicationDomain exports those definitions.

Also it would be very good if one could define a ClassLoader for an ApplicationDomain so if a var bundleAvar = new BundleBClass() is called and BundleBClass is missing in BundleA … the BundleA.applicationDomain.

var someService:IWeatherService = Framework.getService(‘IWeatherService’) as IWeatherService;
in this case if the IWeatherService is not defined in the Bundle (and it should not be defined) .. it can be loaded from the bundle that provides the service and has marked the Interface as exported.

To sum it up, what I suggest is to add 3 methods(getter/setter) to the ApplicationDomain:
- get/set definitionResolver():IDefinitionResolver, can only be set from within the ApplicationDomain, most secure way would probably be to set it at compile time and deny override at runtime.
- exportPackage or exportDefinition(definition:Class) … callable only from within the current ApplicationDomain;
- importPackage or importDefinition(QualifiedClassName:String, provider:ApplicationDomain) … callable for the current applicationDomain

the IDefinitionResolver should have:
- resolve(QualifiedClassName):* or throws the Definition Not found exception

If that made any sense what so ever to you, please vote for this feature here: http://bugs.adobe.com/jira/browse/FP-1733
Any other ideas are welcomed as well.
You can read more on the subject here: http://forums.puremvc.org/index.php?topic=222.0
Categories: Thoughts Tags: , ,

Adobe Max day 1 wrap up

December 2nd, 2008 Radu Cocieru No comments

It’s been a very interesting day.

The keynote was quite interesting even through I’ve seen the topics before on  different blogs still seeing this live is really inspiring and opens up your mind.

The introducing to Flash Catalyst(aka Thermo) and C++ libraries for Flash (Alchemy) where my favorites from the day 1 at Max.

I was happy to see that the luck of certain features we’ve been complaining about have made it to the Flex 4 Builder (Spark), things like move re factoring, package explorer, Asdoc, and help tool tips really made my day, great productivity boosters if you ask me.

The Alchemy demos are really something, already have a couple of ideas of where I could use this especially on some AIR apps where size of the swf is not that important.

Got a copy of the Flash Catalyst … too bad it’s only works for MACs hope to find a VM or smth to still be able to run it, I know at least 1 person who’s job would be greatly simplified by this tool.

Got involved with the IGENKO project

May 10th, 2008 Radu Cocieru No comments

One of my latest R&D assignment was to find a CMS system that can be easily integrated with a Flex/Flash front end and work as a Data Service prvider. Basically I was looking for an opensource CMS project that would do all the data/content management and offer the stored data as a service to a Flash enabled front end.

I started by having a look at the most popular CMS out there and see how easy/quick are they to be changed to suite my needs. Looked at Joomla, Typo3, Drupal but none of them where really designed with WEB2.0 in mind maybe except the latest Joomla, built on CakePHP (port of Rails) with a somewhat MVC approach. Joomla did offer the basic Data like services, but since this is the first version using CakePHP the community contributes, that usually makes an open source project great, are kind of missing so it will be a while … and since no standard/protocol of communication is enforced I would say that every contributor will come with his own way of sending things to the front end.

Than I even bought a license of FlashBlocks BIG MISTAKE … the software is totally unusable, if I give to an owner that tool to maintain it’s own site … I should be expecting lots of support calls back and a quite unhappy client on the other side of the line.

The conclusion was that we will have to make our own CMS system for a RIA like website, looking for frameworks to build on I came across the IGENKO project, in a very early stage but good enough to have it as a starting point.

So we decided to get involved with the project and start contributing, solved a couple of issues and added Prana Framework to it for future scalability.

Ideas and thoughts are always welcomed so feel free to join the mailing list ask questions and even contribute :) .

You can read more on Igenko here.

Categories: Thoughts Tags: , , , , ,

Prana Framework 0.5 release

April 22nd, 2008 Radu Cocieru No comments

A very nice Inversion of control container that leverages the flexibility and loose coupling for Flash/Flex applications. Use it with confidence.

Will be posting a how to tutorial soon, so keep watching. Meantime you can read more on the subject.

Categories: Thoughts Tags: , ,