iOS
Comments

Every new version uploaded to iTunes Connect needs to have a different build number in order to differentiate the version.

Note: Build number (eg. 1234) is different from Version number (eg. 1.2).

The build number can be automatically increased in these few ways:

Continue reading →
Comments

After upgrading to Yosemite, your brew could run into an error:

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
Continue reading →
iOS
Comments

Xcode Build Settings has a Build Active Architecture Only for every project/target.

YES – If set to yes, then Xcode will detect the device that is connected, and determine the architecture, and build on just that architecture alone.

NO – If set to no, then it will build on all the architectures.

There are pros and cons.

If there’s no problem, setting to YES will make building faster.

But sometimes, you can’t. For example if your project does not support 64-bit (yet), and your device is the latest iPhone 6 which needs 64-bit, then your project will not be able to run. If you change to NO, then the project will build armv7 etc, which will work.

iOS
Comments

This is a common pitfall when you are using UIStatusBarStyleLightContent for your status bar when you want light colored status text over dark colored background.

There are 2 things that you MUST set to make it work.

  1. This is usually what developers will do – Under Target settings > General > Status Bar Style > Change to Light. This will effect the Info.plist to include UIStatusBarStyleLightContent.

  2. This is an obscure/unnatural step – In Info.plist, add View controller-based status bar appearance and set to NO

Comments

If you have multiple targets in an Xcode project, then you will need to use link_with in your Podfile to specify the targets that will use the pod.

The documentation of link_with explains the usage. For example to link with your 2 targets:

link_with 'Target1', 'Target2'

Without specifying all the targets, the default behaviour of Cocoapods is to use the first target as default, and the rest of the targets will not include the pod libraries.