20
Apr 12

iOS Provisioning Portal – Invalid Certificate Error

So yesterday I was attempting to create a new distribution certificate for a client of mine. I would use Keychain to create my CSR file, and then attempt to upload it to the provisioning portal. No matter which combinations of emails/common-names I used, I got a very meaningless error message: ‘Invalid Certificate’. No reason why, just those words in red at the top of the page. Needless to say, I tried this quite a few times and decided to check the forums. Some users were reporting to try this in Safari only, some users recommended making sure you had Apple’s WWDR intermediate certificate installed, etc., but none of these were helping me.

I then contacted Apple late in the evening and got an email back from them fairly early the next day. After one back and forth email, I got a call, and they gave me the down-low on the issue. I already had two distribution certificates created, neither of which were expired. Apple apparently only allows you to create two certificates. This is so that you can have one ready to use in the ‘in between’ moments when the old one expires. I was under the impression you needed one certificate for every application. That is completely wrong, you should have one certificate for an infinite number of apps. Each application will be associated with one of those two possible certificates, and it will also have a unique provisioning profile and app ID.

The short version of this, your certificates are suppose to be general distribution certificates, not linked to any particular app.

Hope this helps someone!


12
Feb 12

Call JavaScript Function from AIR iOS Application

So I have been to look into making Omniture tracking calls from an Adobe AIR iOS application. I have done this very easily using in the past on web applications using ExternalInterface calls, however it seems to be a bit different from AIR iOS apps. I found two articles that helped me along my way and would like to share them with you, as well as the modifications I had to make.

Calling JavaScript
Omniture Tracking

The second article is a bit dated (2008), and recommends using the HTMLLoader class. I was unable to get that to work, and I believe the new standard is to use the StageWebView Class.

private function int():void {
	_html = new StageWebView();
	_html.viewPort = new Rectangle(0, 0, 400, 400);
	_html.stage = _stage;
	_html.addEventListener(Event.COMPLETE, onHTMLLoadComplete, false, 0, true);
	var buildPath:String = File.applicationDirectory.nativePath;
	var source:String;
	source = buildPath + "/"+ "omniture/track.html";
	_html.loadURL(source);
}

// call the 'test' method on the track.html page
private function onHTMLLoadComplete(event:Event):void {
	_html.loadURL("javascript:test()");
}

Hope this helps.


18
Jan 12

Flash/Flex Facebook Application HTML Wrapper

Facebook and Flash Builder
This again might seem pretty elementary for some Facebook developers, but I was having some problems with my first Facebook application’s HTML wrapper. First off I should mention, I am not a fan of the Flex generated HTML wrapper, and that is even more true now after this project. I typically write my own html files, especially the index files from scratch or start from a previously used project’s.

Here is an example of the HTML wrapper you will want to use.

Here are the contents of the head tag.




And the contents of the body tag.

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

There are a few things to take note of here:
• Make sure you are using the ‘https’ for your call to the all.js file from Facebook in the header script include. This may result in errors with SSL otherwise because a page that requires SSL would be attempting to load items that are not over SSL.
• The attributes object that gets passed into the swfobject embed has a matching id and name.
• The matching attributes of id and name mentioned above must also match the id of the div where your flash content lives.
• The first div id in your body must be “fb-root”.

The Flex generated HTML wrapper will not match the above, and even after making sure you have the correct div ids and attribute id and name, it still will not load in IE 9. I have not yet investigated why this is the case, but the Facebook application loaded in fine in ALL other browsers, except Internet Explorer 9. I then changed out the Flex generated and somewhat modified wrapper with the one above and all was well in IE9. This is even more dangerous with Flex because as we all know, many times Flex may freeze up when building and we may need to regenerate the Flex HTML wrapper in the project settings which may overwrite some of the changes you put in place to work with Facebook originally.


18
Jan 12

Facebook.init() and Facebook.Login() Handler Not Getting Called or Null

This was one of those ‘noob’ lessons of Facebook development. When setting up your Facebook application at Facebook Developers, within your ‘edit app settings’ page for your app, you will notice the canvas URL input fields. These fields point to where your application will be hosted, and eventually loaded through an iFrame once viewing within Facebook. Anyways, this location and all subdirectories of this location is the ONLY place I have been able to properly test my application, yes unfortunately that means no local testing of your application unless your application doesn’t need to make any or hasn’t yet made any calls to the Facebook API.

That might seem pretty self explanatory for some, but I for the longest time was wondering why I couldn’t get my Facebook.init(APP_ID, handleInit) to call back to the handleInit(). So as long as you are running or debugging in the directory or subdirectories of that directory that you specified in the ‘Canvas URL’ location your callback will fire. The same is true for the Facebook login: Facebook.login(handleLogin, {scope:”user_photos, publish_stream”}); In order to properly test logging in and giving your app the permissions you specify in your scope object, you need to be testing/working within the directory specified in your application settings.

The second part to this is coming in my next post Flash/Flex Facebook Application HTML Wrapper, about the limitations or expectations of the index.html or HTML wrapper you create for your app and point to within the Canvas URL settings. It may also directly impact the API calls mentioned above: Facebook.init() and Facebook.login().


18
Jan 12

Facebook Page Tab

From what I hear, creating a Facebook page tab was once fairly simple within the admin of the page. Not sure why, but Facebook apparently removed this simple functionality. A colleague of mine hooked me up with the call you can make to create a page tab on the fly.

Simply make the following call in your browser:

https://www.facebook.com/dialog/pagetab?app_id=APP_ID_HERE&display=popup&next=PAGE_TAB_URL_HERE

You obviously have to be an admin for the page you wish to add the tab to. After entering your application ID and landing page url in the above url, you will be able to select a page from a dropdown of pages you are an admin for. That’s it. Hope this helps.


18
Jan 12

Flash Builder/ Flex / Flash Facebook Application Development

Facebook Application
Recently I also completed work on my first Facebook application, and I can honestly say it was not as bad as I thought it would be. Myself and one other contrator made an application for SunnyD. The application is called ‘Drink Up & Download Cover Yourself’. The application allows users to create their own custom album artwork.

A few details about the project:
• Flex Framework (4.1A SDK)
• Flash Player 10
• ActionScript 3
• Facebook ActionScript API

Obstacles:
• Re-familiarizing with Flex Framework
• Familiarizing myself with the Open Graph API
• Facebook.init() and Facebook.login() (Check out the post)
• Limitations within Facebook API (where users can or cannot post items)
• App not initially working or visible in IE (Internet Explorer 9 specifically) – Check out the post
• Previous page tab creation removed by Facebook – Check out the post


18
Jan 12

My Very Own Name Storybook Launched

My Very Own Name
Well I am months behind on my posts, and that means that my second iPad app has gone live. My Very Own Name Storybook was an app built for I See Me. They make amazing custom children’s books and they wanted to bring their success to the digital space. Within the app, kids can search for letters in their name, learn how to write their letters, and collect and interactive with numerous animals that represent the letters in their names.

The application was built with much of the same framework that Zubopp was built with. I used Flash CS5.5 as my editor for all production and animation publishing. The application was republished with AIR 2.7 before sent to the App Store for approval. Final approval took about a week.


09
Aug 11

Zubopp


So this is coming a little late, but my first app has made it into the iOS App Store. Zubopp a whack-a-mole kids game was released on June 29th. Zubopp was built with Flash CS5 and was packaged for release with AIR 2.7. I wanted to prove many things in this application that would be used for a future application:
• Loading in external XML file
• Loading in external SWF files
• Attaching events to the externally loaded SWF files
• Shared Objects
• The restrictions to what is ‘code’ in an externally loaded file, could I use instances names, frame labels, stops, anything, etc.?

What I found out:
• No issues loading external XML files
• No issues loading in external SWF files as long as they did not have code in them (this means no timeline code or export for ActionScript, you are however allowed to use frame labels and instance names within movieclips)
• No issues attaching Mouse/Touch events to externally loaded in assets from SWF’s
• No issues setting Local Shared Objects to the device

All in all I wanted to test my architecture patterns that I have used on numerous Flash applications in the past. The app took about a week to get approved and is currently available to iPad users only as a free download. I have a universal binary ready for upload, just need to find time to do this.

Take a look: Zubopp in Apple AppStore


12
Jun 11

Back on iPhone, away with Samsung Fascinate…

So back in September or October I made the move to Android. I debated heavily over a Droid Incredible or a Samsung Fascinate. The store employees pushed heavily for the Fascinate for it was newer and nearing the release of Android 2.2 Froyo. Well I didn’t get the Froyo update for months, and as a Developer who works primarily with Flash this was hard for me to deal with.

Anyways, Android as an OS I liked, the Samsung Fascinate I did not. The battery life especially after the release of 2.2 became impossible for me to deal with. I would have to take a charger with me to work everyday, and charge before bed nightly. After doing a factory restore numerous times, I realized my choice of ‘bad apps’ was not the problem, it had to be the hardware. After doing some digging and some searching, I noticed within the Settings -> About Phone -> Battery Use section, there was a ‘Cell Standby’ listing. This was a high percent of my battery usage which I thought to be odd. Turns out my phone was searching for a signal more than half of the day, everyday. This constant on/off/searching of network towers was killing my battery while I wasn’t even using the device, worst part is this happened even when I was outside.

So what did I do, I am back on an iPhone and loving it because it is an extremely reliable phone, and that is what I need first in my cell phone.


12
Jun 11

Flash CS5 iOS Packaging with AIR 2.6 SDK

Recently I have began making a test application using Flash CS5. A year ago the flash packager wasn’t even an option because of how poor performance was on the iOS devices. However with changes Adobe has made to the compiler, AIR 2.6 makes Flash to iOS a real possibility. Last week I worked on my first application to be published to the App Store and hopefully submission will happen this week. I am eager to find out what the Apple approval process is like, especially given that I am using Flash over the native Objective-C approach.

A few things I am looking at proving with the first application:
• Having main SWF load external XML.
• Loading external SWF files that are listed in my XML.
• Assigning touch events to loaded in SWF files from the main application layer due to the inability to have external code in externally loaded files. This one is going to be key. So far I have not had any issues with this approach and I already have it working on my device. A couple things to note here. You seem to be allowed to have both instance names and frame labels in externally loaded SWF files. No export for ActionScript is allowed in your library, and no timeline code.
• Using Local Shared Objects to store user settings/preferences.