Archive

Posts Tagged ‘iPhone Programing’

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.

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.