Archives for category: Uncategorized
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
NSLog(@"orientation: %d", [[UIDevice currentDevice] orientation]);
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];

It won't work on the simulator.

NSString *osVersion = [[UIDevice currentDevice] systemVersion];    

NSNumberFormatter *f = [[NSNumberFormatter alloc] init];

[f setNumberStyle:NSNumberFormatterDecimalStyle];

NSNumber * myNumber = [f numberFromString:@”42″];

You can set your boolean by using:

[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"logged_in"];

and read it by using this code:

if(![[NSUserDefaults standardUserDefaults] boolForKey:@"logged_in"]) {
    [self displayLogin];
} else {
    [self displayMainScreen];
}
Without ARC
int main(int argc, char *argv[]) { 
 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 
 int retVal = -1; 
 @try { 
 retVal = UIApplicationMain(argc, argv, nil, nil); 

 @catch (NSException* exception) { 
 NSLog(@"Uncaught exception: %@", exception.description); 
 NSLog(@"Stack trace: %@", [exception callStackSymbols]); 

 [pool release]; return retVal; 
}

With ARC

int main(int argc, char *argv[])

{

@autoreleasepool {

//        return UIApplicationMain(argc, argv, nil, NSStringFromClass([MCAppDelegate class]));

int retVal = -1;

@try {

retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([MCAppDelegate class]));

}

@catch (NSException *exception) {

NSLog(@”Uncaught exception: %@”, exception.description);

NSLog(@”Stack trace: %@”, [exception callStackSymbols]);

}

@finally {

//

}

return retVal;

}

}

Source: http://stackoverflow.com/questions/8100054/no-exception-stack-trace-in-console-under-xcode-4-2-ios-5

1. In your Xcode project, under the Supporting Files group, add a new Localization.string file. Right click on Supporting Files then New File… Then Resources then Strings File.

First, you need an iOS Dev Center account that has the role Agent or Admin to distribute apps.

1. Logon to the iOS Dev Center (here).

2. Go in the iOS Provisioning Portal.

3. Go to Certificates section and Distribution tab. Make sure you have a valid certificate. If you don’t, follow this guide to get one, then come back here.

4. Go to the App IDs section and add a new App ID for the app you want to distribute. Note: It is one App ID per app, so if you already created one for your app, skip this step.

 

 

 

http://www.idev101.com/code/Distribution/build.html

http://www.weston-fl.com/blog/?p=2442

http://stackoverflow.com/questions/5265772/archives-not-showing-up-in-organizer-for-xcode-4

First, you need an iOS Dev Center account that has the role Agent to distribute apps. The role Admin or other roles won’t allow you to do so. Update: it looks like Apple made some changes and it’s now possible to distribute with an Admin account.

1. Logon to the iOS Dev Center (here).

2. Go in the iOS Provisioning Portal.

3. Go to Certificates section and Distribution tab. Make sure you have a valid certificate.

5. Go to Devices section and add the devices you want to use to test the app.

6. Go to the App IDs section and add a new App ID if you didn’t already.

7. Go to Provisioning section and Distribution tab.

8. Create a new Ad-Hoc Distribution profile with the following settings.

9. Download the .provision file and double-click it. It should be added to XCode’s Organizer.

In Xcode (here)

10. In Xcode 4, create a new configuration for the distribution build. Open your project Info page:

10.

11.

12.

13. On the left navigation panel, select Archive. On the right panel, in Build Configuration, select Ad-Hoc (the one created in step x). Close this window.

14. In the scheme drop down, make sure iOS Device is selected.

15. Go to project Menu -> Archive.

*** If you have trouble Archiving check this out: http://stackoverflow.com/questions/1760518/codesign-error-provisioning-profile-cannot-be-found-after-deleting-expired-prof

16. In the Organizer, select your newly created archive and click on the “Share…” button.

17. Select iOS App Store Package (.ipa) radio button

18. Select your newly created project AdHoc distribution provisioning profile

19. Select “Save for Enterprise Distribution”

20.

13. To distribute over-the-air follow this guide: http://aaronparecki.com/How_to_Distribute_your_iOS_Apps_Over_the_Air

Yes this is my first post!!

Cool eh.

 

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.