Xcode yet another provisioning issue when developing and debugging on your own iPhone. This was right after deployment where you switch it to iPhone distribution when doing a release. The error: A valid provisioning profile for this executable was not found. You cannot debug while the provisioning profile is selected to “iPhone Destribution”. Switch it
Tag: xcode
Xcode Cannot Run Using The Selected Device
Updating Xcode to 4.5 and your iPhone device to 6.0 you might run into this error where you cannot run your application on your device. Xcode cannot run using the selected device. No provisioned iOS device are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to
Xcode Missing Retina 4 Launch Image
Updating Xcode with SDK 6.0 gives you an error when trying to compile your project. Missing Retina 4 launch image. A launch image named “Default-568@2x.png” is required to run at native resolution on Retina 4 devices. Would you like Xcode to add this image for you? This is solved easily by pressing “Add”. Under Project
Xcode Dimensions Of The Screen In iOS
To get the dimensions of the iPhone or iPad screen you can do the following in xcode: CGRect screenRect = [[UIScreen mainScreen] bounds]; CGFloat screenWidth = screenRect.size.width; CGFloat screenHeight = screenRect.size.height;
Xcode Simulator Retina
The Simulator in Xcode does not run Retina by default. You can switch to Retina by going to Hardware -> Device -> iPhone (Retina) Remember to have the simulator in front and not Xcode or the menu will be wrong.
Xcode Add iPad Compatibility
To add iPad compatibility in Xcode do the following: In Xcode 4 after opening select your project in the Project Navigator and select your target. Go to the summary tab and select “Universal” under Devices. For Xcode 3 take look at this blogpost.
Xcode Commit Missing File Or Directory
Xcode aren’t keen when deleting files or directory without it being notifies and there refused to commit which is a pain. What worked to fix it was to recreate an empty folder with the same name. No need to recreate its contents. After you committed you can delete the folder and commit again. Xcode is missing
Xcode Get The iPhones Language
To get the locale language in your app on iPhone you can use the this example: NSLog(@”localeIdentifier: %@”, [[NSLocale currentLocale] localeIdentifier]); If you running english language on your iPhone you’ll get this output: localeIdentifier: en_GB Other output could be en_US sv_SE da_DK de_DE and so on.
Xcode Unterminated Conditional Directive
When coding in Xcode and using the #ifdef, perhaps from using multiple targets preprocessor macros you might run into this error: Unterminated Conditional Directive This is due to a missing ending. It needs to be balanced with an #endif. Just like the #if statement needs an #endif. So to solve the error the if statement
Xcode Rename Scheme Name
To rename a scheme name you can do two things. Go to the menu Product -> Edit Scheme… (Cmd + <) -> Manage Scheme -> Select the Scheme you want to rename. Press return or do a slow double click Now you can rename the scheme name.