Thursday, 12 September 2013

Problems in uploading binary again - Security.h issues

It makes confusion when this error appears after once you've already submitted the same binary/app before.

To resolve it, just set the iOS distribution provisions once again in Project and Target Build settings.

Saturday, 31 August 2013

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'

If the exception appears like this :


Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'

then you would have given wrong path to your file in the code. Either for an example an audio file or image or else given wrong file format extension.

So, have a look whether you've given the correct path in your project directory and the problem will be solved :)

Wednesday, 28 August 2013

UINavigation in iPhone Example Code

If you've created custom button and on touch event navigation is not done then you should put this code in your app delegate file.

AppDelegate.m 


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[CoRoViewController alloc] initWithNibName:@"CoRoViewController" bundle:nil];
    } else {
        self.viewController = [[CoRoViewController alloc] initWithNibName:@"CoRoViewController" bundle:nil];
    }
    
UINavigationController *contrl = [[UINavigationControlleralloc]initWithRootViewController:self.viewController];
    self.window.rootViewController = contrl;
    [self.window makeKeyAndVisible];
    return YES;


}

Tuesday, 27 August 2013

framework not found in iPhone

Due to miscellaneous reasons those frameworks which were appearing in your library, now when you open up your project it doesn't show you and instead appears in red letters framework name.

First check your XCode app framework directory : would be in such path

Applications/Xcode2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks

if you can't see it there then open up your system library : would be in such path

System/Library/Frameworks

if you find your framework required there then just copy it and paste it to the above framework directory and issue will be resolved.

Thursday, 8 August 2013

Screen orientation not working iOS 7

Your screen will not get landscape even if you turn the phone. This is just because in iOS 7 beta, you would have turned on portrait orientation lock. 

The fifth option in the image. So tap and turn it off and you will be able to use apps like google and others in landscape view.






Monday, 5 August 2013

how to declare an object in Objective C language ?

There are two ways :

Myclass *obj1 ;  // strong type 

id obj1; // weak type - more flexible in use

Objective-C supports both strong and weak typing for variables containing objects. Strongly typed variables include the class name in the variable type declaration. Weakly typed variables use the type id for the object instead. Weakly typed variables are used frequently for things such as collection classes, where the exact type of the objects in a collection may be unknown. If you are used to using strongly typed languages, you might think that the use of weakly typed variables would cause problems, but they actually provide tremendous flexibility and allow for much greater dynamism in Objective-C programs.


what are ivars in programming ?

"ivars" are nothing but just those instance variables declared in the class.

e.g. in Objective C code

@interface Myclass : BaseClass
{
         int count;
         float get;          // instance variables / ivars / data members

}