Friday, October 8, 2010

iPhone Application for MS CRM





After Releasing MobileEdge 4.3.4 version
Mobile Edge for MicrosoftDynamics v 5.0.0 is Available now.

New features :
Push Notification- When A record is created or edited on CRM, you will get a push notification on iPhone and can immediatly sync with CRM
More details, 

Friday, September 24, 2010

Add UIToolBar on top of Keyboard

UIToolbar *boolbar = [UIToolbar new];
boolbar.barStyle = UIBarStyleDefault;
[boolbar sizeToFit];
  
  
UIBarButtonItem *cancelleftBarButton =[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(buttonClicked:)];
NSArray *array = [NSArray arrayWithObjects:cancelleftBarButton, nil];
[cancelleftBarButton release];
[boolbar setItems:array];
  
myTextFieldorTextView.inputAccessoryView = boolbar;

How to right or center align the UIToolBar items

create  buttons like this 
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] 
              initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace 
              target:nil action:nil];


Add  UIBarButtonSystemItemFlexibleSpace items to your toolbar, to the left and right of your items OR left to get the center align OR right align

Wednesday, September 1, 2010

Thursday, August 12, 2010

static declaration of 'xxx' follows non-static declaration

If you declare a variable as static in your implementation file, then don't declare the same variable in header file.

expected specifier-qualifier-list before extern

There may be many reasons for this. one situation if you variable declaration inside the @interface block in the header file. It should be  outside.

Tuesday, July 27, 2010

What's the difference of UIView frame and bounds.

UIView and its subclasses all have the properties "frame" and "bounds". What's the difference?

The frame of an UIView is the rectangle, expressed as a location (x,y) and size (width,height) relative to the superview it is contained within.
The bounds of an UIView is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0).

Difference between delegate and data source?

Thursday, July 1, 2010

Can't run - was built for 'armv7', but device requires 'armv6' or compatable architecture.

This error may appear when connecting to device from iPhone Sdk 4, (Xcode 3.2.3)

to fix this
in Xcode Project->Edit Active Target
Set the Architectures:Standard(armv6 armv7) 


Tuesday, June 29, 2010

Connecting MS CRM 4.0 using Java webservices

Continue from connecting with MS CRM 3.0

The following is the sample code to connect MSCRM 4.0

String password = "password";

String username = "user";
String OrganizationName = "orgname";  //Whats Org Name

String endpointURL = "http://server:port/MSCrmServices/2007/CrmService.asmx"; 

CrmAuthenticationToken token = new CrmAuthenticationToken();
token.setCallerId("00000000-0000-0000-0000-000000000000");
token.setOrganizationName(OrganizationName);
//token.setAuthenticationType(0);

CrmServiceSoapStub bindingStub = (CrmServiceSoapStub) new CrmServiceLocator().getCrmServiceSoap(new URL(endpointURL));
bindingStub.setHeader("http://schemas.microsoft.com/crm/2007/WebServices",
"CrmAuthenticationToken", token);

bindingStub.setUsername(username);
bindingStub.setPassword(password);

WhoAmIRequest whoRequest = new WhoAmIRequest();
WhoAmIResponse whoResp = (WhoAmIResponse)bindingStub.execute(whoRequest);
String userid = whoResp.getUserId();
System.out.println("userid = "+userid );

I will provide the sample code for connecting MS CRM Services for all types of deployment

NSString constants in Objective C

Easiest way:
// constants.h
#define MY_CONSTANT @"my_constant"
 
Better way:
// constants.h
extern NSString * const MY_CONSTANT;
// constants.m
NSString * const MY_CONSTANT = @"const value";

There is also one thing to mention. If you need a non global constant, you should use static keyword.
Example

// in constants.m file
static NSString * const MY_CONSTANT = @"const value";

The following are some interesting article.

Java Developer’s Guide to String Constants in Objective-C

Correct way of defining constants in Objective-C

Saturday, April 17, 2010

Monday, March 15, 2010

Apple Hot News iPad Now Available for Pre-Order

Starting today, you can pre-order your iPad from the Apple Online Store and have it delivered free to your door. Or buy it at your favorite Apple Retail Store starting April 3.
Read More

Wednesday, March 10, 2010

Predicted sales for Nexus One reduced by 70%

Only one million to be sold this year
Google's plan to release its own mobile phone - the Nexus One - seems to have backfired as sales estimates have been slashed.
Read More

Thursday, March 4, 2010

Apple World’s Most Admired Company by Fortune Magazine

For the third year in a row Apple has been named the World’s Most Admired Company by Fortune Magazine — this year by the widest margin ever. What makes Apple so admired? Fortune explains: “Product, product, product. This is the company that has changed the way we do everything from consume music to design products to engage with the world around us.” Apple also ranked #1 in Innovation among all companies.
Read More

See the TOP 50 companies..

Monday, March 1, 2010

How to trim NSString in Obj C

To trimming an NSString in Objective C  ..
e.g:
NSString *trimmedString = [description stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];