Showing posts with label Xcode. Show all posts
Showing posts with label Xcode. Show all posts


When you want to display your launch screen longer as normal you can do this by simply adding a sleep() in the AppDelegate implementation:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Time in seconds
    sleep(5);
    
    // Override point for customization after application launch.
    return YES;
}
When you want to remove all provisioning profiles from Xcode, close Xcode and run the following commands from terminal:

rm -r ~/Library/MobileDevice/Provisioning\ Profiles/
rm  ~/Library/Developer/Xcode/connect1.apple.com\ 4.6.1.db

Xcode quit unexpectedly.

Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.



When you received the message above while refreshing provisioning profiles, close Xcode, go to terminal and delete the "connect1.apple.com 4.6.1.db" file:
rm  ~/Library/Developer/Xcode/connect1.apple.com\ 4.6.1.db
After deleting the database file you should be able to refresh provisioning profiles in Xcode again.


You have an iPhone storyboard and want to support the iPad too? This can be done in a quick way:

  1. Open Xcode
  2. Duplicate the existing storyboard.
  3. Rename them to "MainStoryboard_iPhone.storyboard" and "MainStoryboard_iPad.storyboard"
  4. Right click on the "MainStoryboard_iPad.storyboard" file > "Open as" > "Source code" 
  5. Search & Replace:
    targetRuntime="iOS.CocoaTouch"
    with:
    targetRuntime="iOS.CocoaTouch.iPad"
  6. Done!