How to fix “No unexpired provisioning profiles found that contain any of the keychain’s signing certificates” in Xcode 4
I understand there can be many reasons for this error message. Xcode needs a distribution profile with the same Bundle Identifier as the app. Even though this seemed to have worked in the past, Xcode 4.6.3 has gotten more pernickety as of late. Let’s fix this. Provisioning Portal Head over to the Apple Provisioning Portal and under Provisioning Profiles, select Distribution. Select the Plus Button to add a new profile. Select App Store under Distribution and hit continue. Next you’ll have to select the App ID for your project....
read moreHow to set the colour in a UINavigationBar
Since Xcode 5 and iOS 7 the default appearance of a UINavigationBar is black translucent. This even affects the same app running in iOS 6. Black opaque is deprecated and can no longer be set in Interface Builder. However, you can set the appearance for all nav bars by putting this little gem in your App Delegate’s didFinishLaunchingWithOptions method: [[UINavigationBar appearance] setTintColor:[UIColor blackColor]]; You can specify colours other than black. Note that iOS 7 devices are affected differently by this change: only the...
read moreHow to hide a UIBarButtonItem in your Navigation Controller
Since UIBarButtonItems do not have a “hidden” property, we can’t just set this to yes and it’ll disappear. Instead, we can set them to nil. In this example we’re hiding the right item in the navigation controller: [self.navigationItem setRightBarButtonItems:nil animated:YES];
read moreHow to check which iOS version your device is running
We can check the UIDevice’s property systemVersion for this. Here’s a quick snippet that checks this, and conveniently checks the first number in the returned value. This should work until iOS 9… NSArray *versionArray = [[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."]; if ([[versionArray objectAtIndex:0] intValue] >= 7) { // do this if we're runnign iOS 7 or higher return @"iOS 7 or higher"; } else { // do this if we're running iOS 6 or below return @"iOS 6 or...
read moreHow to fix “Dynamically-related files could not be resolved” message in Dreamweaver
WordPress is made up of over 70 files which may be called to display your site. Dreamweaver has a handy feature with which it lets you discover all those files. Sometimes this works great – and sometimes you get the error message above. I was stumped by this when a site I was working on seemingly threw Dreamweaver overnight. Was was going on? The secret is Permalinks. Dreamweaver has a problem discovering and resolving related files if you’ve set Permalinks to anything other than the default. This problem has been around for a...
read moreHow to remove a widget from the WordPress Dashboard permanently
If you want to never see a widget on your WordPress Dashboard ever again, just head over to the top where it says “Screen Option”, then simply un-tick the ones you don’t like. That’s Zen Therapy right there. These preferences are saved on a per-user basis. But what if you don’t want certain widgets to show up, because your client gets confused by all the dashboard clutter? I know I do! Help is at hand: you can use a couple of neat functions in your theme (or plugin) so certain widgets never even show up....
read moreHow to define Javascript Behaviours in Dreamweaver
Dreamweaver keeps on giving – and the more I’m looking into it, the more I like how it can support me. Today I discovered that you can define Javascript Behaviours without writing a single line of code. This can only be good news – especially if Javascript is one of those things that always looks a bit scary. Here’s how to make Dreamweaver create code that can hide an element, and bring it back. First you’ll have to define a site for this to work. Head over to Site – New Site to do this. All you need to...
read moreHow to change the WordPress Login image and URL
There’s a great little plugin called Add Logo to Admin by c.bavota which does a great job at letting you add your own logo to the WordPress login screen, and even to the top of your dashboard. But it’s another plugin. If you’re building a theme for a client and simply want to replace the generic WordPress image, you can do that with just a few lines of code. Place them in your theme’s functions.php file: //Change the generic login image function custom_login_logo() { echo ”; } add_action(‘login_head’,...
read more