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.

Comments

When I did a pod update --verbose, cocoapod got stuck when trying to clone my private repos.

With the verbose mode, this is the line it got stuck on:

$ /usr/bin/git clone https://my.repos.com/my_library/ /MyWorkspace/ --single-branch --depth 1

Turned out it is an issue to do with using https to connect with the repository.

Solution is to change to SSH counterpart.

Comments

Have you ever wondered how to send those nice emails with images embedded (and not as attachment)?

They are actually just HTML, with some pitfalls depending on how email apps render them.

In everyday emailing, no one bothers writing HTML. But I have my big day invitation to send, which I want to make it pretty. And so I went on to create my own HTML email.

Here’s what I learnt.

Continue reading →