Archive

Author Archive

Create and handle button with flex mobile application

November 24th, 2011 No comments

Today we start with basic control of any development, a Button. Button is main control to take actions from user and respond to it.

First create new application as described in this post.

I choose Blank Template so I only get application file. Now add one view to src. I have added it to my package. Name it Buttons. To create new package, right click on src folder and then select New – >Package. Give name of package and click Finish.

Create New Package

 

 

Now create new view in this package with name Buttons. For that, right click on package we just created and then choose New -> MXML Component follow on screen instructions. This will create new view file for you.

Now replace content of application file with this:

<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160" firstView="com.macymind.views.Buttons">
	<fx:Declarations>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	</fx:Declarations>
</s:ViewNavigatorApplication>

This will instruct that our fist start up view is Buttons.mxml

Now open Buttons.mxml from project explorer. Switch to design view and add one button from Components panel. If Components panel is not visible then display it from Window -> Show View -> Components

Rename text of button by double clicking on it. Now run your app. It should display button on view.

Now its time to handle tap event form that button. Select button in design view and from Properties panel, click on button beside of On Click label and choose Generate Event handler. This will crate black event handler function and add that button to click event of button.

Now place some trace in that event handler function, debug application and tap on button and see results in Console.

Do comment if you have any problem.

How to create first mobile application with Adobe Flash builder 4.5

November 24th, 2011 No comments

I have started learning Mobile Application Development with Adobe Flash Builder. The reason behind using it is that it is platform independent. You just need to do code at once and then make a build for each platform.

Now for working for all platforms, you need to apply Flash Builder Patch 4.5.1.  If you don’t have applied it yet then get it from here for your operating system and install it.

Once installed, start Flash Builder. Now follow below steps to create new application.

  1. Go to File->New->Flex Mobile Project
    File Menu Create New

     

  2. Give name to your app. I name it FirstApp.

    Give App Name

  3. Click on Next. Now choose platform you want develop for and Template for your app. NOTE: if you don’t have installed Flash Builder Update 4.5.1 then you can only create app for Android platform.

    Choose Template Type

  4. Clic on Finish. This will create project for your in Flash Builder and create initial required files for your project. if you want to test your project then Right click on your project from project explorer and select Run As -> Mobile Application. Then select proper mobile platform and startup device or desktop simulator.
Post comment if you have any query. Stay on to get more tutorials about mobile application development.

Facebook iOS sharing sdk login screen problem

June 14th, 2011 No comments

Hello Friends,

 

Today I found a major issue with facebook oAuth login screen issue.

I was sharing one application from my iphone to my facebook wall from inbuilt facebook sharing feature of my iBollySongs app.

By mistake I have entered a wrong password and I have tried again with login screen. Now when I was entering password with login screen again, I can see my full password. That password textfield is made normal textfield. I think this is a major bug from facebook. They should resolve it as soon as possible.

See below two screens for first time login and second time login.

Facebook login screen issue

Facebook login screen issue

Facebook login screen issue

Facebook login screen issue

Categories: iOS Tags:

How to generate certificate and provisioning profile on apple developer site

May 21st, 2011 4 comments

Friends,

Here are steps to generate certificate and provisioning profile from apple developer site for signing iphone application.

STEP 1: Open http://developer.apple.com/ios and login with your developer account. Note that you need to purchase $99 or $299 developer program from apple to do this. Once you login to developer site, you will get screen as shown in below image.

Apple Developer Provisioning Portal Home

 

STEP 2: Now from that screen click on iOS Provisioning Portal. This will open screen as shown in below image.

Apple Developer Provisioning Portal Home

STEP 3: Now click on Certificates from left navigation of previous page. Now on this page you can see two main tabs: Development and Distribution. So here you can create certificate for development and distribution separately. If you didn’t created certificate yet then you can see “Request Certificate” button. So click on that will open screen that will ask you for Certificate Signing Request(CSR) file. That you can create as from this post. You can see below screen once you click on Request Certificate” button. It will open screen as shown in below image.

STEP 4: Now choose CSR file as we have created in previous step as from this post and click on Submit button. I have created certificate from my team member account so I can’t see Distribution tab but you can see it from your mail developer account. Now this will create certificate for you. You need to approve this certificate from list of certificates available on your Developer or Distribution tab. Once you approved it, download and save it on your MAC.

STEP 5: Install certificate on Mac.

Once you have downloaded that certificate, just open that .cer file by double clicking on it. This will install your certificate to your development machine. Remember that you need to have private key for installing this certificate and you can get this private ket from Mac on which you have created your CSR. So remember to always backup your private key from your Mac. To get this private key, you need to open your keychain access program and find relevant private ket and take backup by right click on it and click on Export and follow on screen instructions.

STEP 6: Add App Id

Once you have completed with creating and installing certificate, you need to create application id for your unique iphone app. For this, click on App IDs from left navigation on apple iOS Provisioning Portal. Doing this will open screen as shown below.

Create Application IdSTEP 7: Now click on New App ID button. This will ask you for “Description” and unique “Bundle Identifier” as shown in below image.

New Application Identifier

STEP 8: Now provide Description to identify your app id. Write Bundle Identifier as reverse domain name format like com.macymind.myappname. Click on Submit will generate new app id for you.

STEP 9: Now its time to create provisioning profile. From left navigation of Provisioning Portal, Click on Provisioning link. This will show you list of all profiles for particular type as Development or Distribution. Click on New Profile on this screen and follow on screen instructions to create new provisioning profile. Now download this newly created Provisioning Profile on your mac. Now for installing this provisioning profile to your xCode, drag and drop this file on xCode icon on your dock.

Let me know if you have any problem or suggestion for this article.

 

How to Generate Certificate Signing Request (CSR)

May 20th, 2011 No comments

Here are steps to generate certificate signing request (CSR).

STEP 1: Open Keychain Access application on your MAC system.

STEP 2: Now from KeyChain Access menu choose Certificate Assistant > Request a Certificate From a Certificate Authority… as shown in below image.

Create Certificate Signing Request

 

STEP 3: STEP 2 will open form dialog as shown in below image. Provide “User Email Address” and “Common Name”. Select “Save to disk” option and click on Continue button.

NOTE: If you are using CSR for creating certificate on apple site then also select “Let me specify key pair information” and provide 2048 as key size when asked.

Create Certificate Signing Request

STEP 4: Once you complete STEP 3, it will ask you to specify destination and name of resulting CSR file. Give name and specify destination for CSR file. I used my desktop as destination and name as “CetificateSigningRequest.certSigningRequest” as shown in below image.

 

Create Certificate Signing Request

 

STEP 5: STEP 4 will save CSR on your specified destination. Below image show a confirmation message for successful saving of CSR file.

Create Certificate Signing RequestNow we have generated CSR file. You can use it for creating Certificate for Apple Developer Site and also for Push Notification.

Please feel free to write comment if you have any doubt.

Apple Push Notification Server is not working

May 13th, 2011 No comments

Friends,

Today I noticed that, apple’s push notification server is not working.

I have tried to send push message but it was not able to connect to push notification gateway server.

Then I tried to ping on both production and development push gateway of apple, but it was failed.

Is there anybody facing same issue?
Anyone has solution for this?

 

UPDATE

This is issue with my hosting server. My Server was blocking out bound socket connection on port 2195 which is port used by apple push gateway server. So finally I have resolved this issue.

In built web browser for native iPhone app

May 6th, 2011 No comments

Hello Friends,

Today I am going to provide you with steps on how to create in built web browser for iPhone apps. Easy 6 step procedure.

Step 1: Create new project from xCode File->New Project. Choose “View-based Application” and give a name as “InAppBrowser”.

New Project

 

Step 2: Now xCode will create all minimum required files for you. Open “InAppBrowserViewController.xib” file from left panel and add one textfield to enter url. Add one button next to added text field and give it title as “Go”. So we will code on tap of this button to load url in browser. Now add UIWebView to this view as shown in below image.

Browser ViewStep 3: Now open “InAppBrowserViewController.h” and add below code to it.


@interface InAppBrowserViewController : UIViewController
{
IBOutlet UITextField *txtUrl;
IBOutlet UIWebView *webView;
}
- (IBAction)onGo:(id)sender;
@end

Step 4: Now assign this newly created outlets to relevant textfield and webview and action to UIButton(Go) Touch Up Inside Event in Interface builder.

Step 5: Now add method implementation of onGo in “InAppBrowserViewController.m” file. Use below code for that.


- (IBAction)onGo:(id)sender
{
NSURL *url = [NSURL URLWithString:txtUrl.text];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
[txtUrl resignFirstResponder];
}

Step 6: Now build and run your app. Enter http://google.com in url textfield and tap on “Go” button. This will open Google in webview. See below screenshot for final output.

That’s it! We are done now. If you want to download code then click here.

Adwhirl Registration Problem – Google and Admob

May 5th, 2011 3 comments

Friends,

If you are planning to publish different advertisement on your mobile application then one of the best solution to integrate it is Adwhirl. It is a product from Admob, a famos mobile advertisement playtform which is undertaken by Google now.

So recently I was trying for registering my account with adwhirl. But no success. I have used their sign up page and tried to register myself. Website reported that “Your registration has been processed. Look for an email to verify your new account.”. Then I have look into my Inbox but no emails from Adwhirl. Then I checked my spam emails if by mistake it is moved to it. But no emails in spam too.

Then I had wait for 3 days for their emails but no emails from them. I have look into their google code site from where they are providing source code. And moved to their issue reporting page and found that lot many people reported issue for Adwhirl registration issue. I have also tried to send email to their development team but no one is responding to emails.

Then I have tried to register for 4-5 times a day but no success with it. I had also submit one issue to their issues reporting on google but I found from google search that they are removing this kind of issues from their system without responding to it. So my mail concern is that if they don’t want to respond to public issues then why are they opening this kind of system for taking issues from users?

Even I have tried for sending emails to their Google group and mailing list. No response till the date.

I think we can’t expect this kind of things from Google.

If anyone from Adwhirl(Google) is looking at my post then try to resolve this issue as you are lossing your customers by this way.

If anyone facing this issue then please do comment on this thread.

 

Update 12-May-2011:

This issue has been resolved by adwhirl team. Great thanks to them !!!

 

Screen Size and icon size for iOS iPhone iPod iPad iPhone 4

May 4th, 2011 1 comment

Hello Friends,

Today I am going to share screen size and different icon size for iPhone, iPad and iPhone 4 (Retina Display).

Screen Resolution (Size)

  1. iPhone/iPod Touch up to 3rd Generation
    • Resolution: 320×480
    • Signal Bar Size: 20 pixels
  2. iPad
    • Resolution: 768×1024
    • Signal Bar Size: 20 pixels
  3. iPhone 4/iPod Touch 4th Generation (Retina Display)
    • Resolution: 640×960
    • Signal Bar Size: 40 pixels

Application Icon Size and name

  1. Icon.png (57×57 – for iPhone and iPod Touch)
  2. Icon@2x.png (114×114 – for iPhone 4)
  3. Icon-72.png (72×72 – for iPad)
  4. Icon-Small.png (29×29 – Settings app and in search results for iPhone and iPod Touch)
  5. Icon-Small@2x.png (58×58 – Settings app and in search results on iPhone 4)
  6. Icon-Small-50.png (50×50 – Settings app and in search results on iPad)

Toolbar and Navigation bar button item icon size

  1. iPhone/iPad/iPod Touch upto 3rd Generation : 20×20
  2. iPhone 4/ iPod Touch 4th Generation : 40×40

Tabbar icon size

  1. iPhone/iPad/iPod Touch upto 3rd Generation : Near to 30×30
  2. iPhone 4/ iPod Touch 4th Generation : Near to 60×60

Default (Launch) image size

  1. iPhone/iPod Touch up to 3rd Generation: 320×480
  2. iPhone 4/iPod Touch 4th Generation: 640×960
  3. iPad
    1. Portrait: 768×1004
    2. Landscape: 1024×748

 

Correct me if I am going wrong somewhere.

Welcome!

May 4th, 2011 No comments

Hello Friends,

I am opening this blog for mobile application developers. In future I will provide my knowledge and experience by writing different articles about languages and source code for my various achievements.

Those who want to contribute here for writing articles and want to explore your knowledge are most welcome. You can do a message to me and I will contact you.

Thanks