WWDC 2014 – iOS Developer Wish list

As an iOS developer, here are a few things I’d like to see at WWDC 2014

  • Siri Extensibility – I’d like to see Apple open up Siri to third party apps.  For example if I have RunKeeper on my iPhone, I’d like to be able to tell Siri “Start my run”, “End my run”.
  • Blocks added to older API’s – A lot of older API’s are using delegates instead of completion blocks.  For example: UIAlertView
  • UIActivityViewController enhancements – Every time I’ve used UIActivityViewController, I’ve had to extend it to do what I wanted.  It shouldn’t be that hard to share an email where you can specific the recipient, subject, attachment, body, etc..
  • Inter App Communication – I’d like to see something more like Intents on Android.
  • AppleTV SDK – I’d love to be able to write apps for the AppleTV
  • Filesystem - Mac OS X and iOS are due for a new filesystem. ZFS was rumored for awhile but fell through.
  • Multi User iOS – It would be nice if iOS support multiple users, so a family could share an iPad.
Filed under iOS

ld: library not found for -lPods

I’ve had this error a few times, so I figured I’d document the solution for the next time it occurred.

When doing a build in Xcode, I got the following error:

ld: library not found for -lPods

My project is setup to use cocoapods.

First make sure you are using MyProject.xcworkspace and not MyProject.xcodeproj

For me this was the case.  But I realized that I just created a new configuration for “Ad Hoc” builds.  To fix the problem I had to install the Podfile again with the command:

pod install

After running pod infall, open the project: MyProject.xcworkspace, clean your project and build.  The error should go away.

Replace battery on Celestron NexStar 4SE Star Pointer ?

I left the switch turn ON on my Celestron NexStar 4SE Star Pointer and the batteries died. It wasn’t obvious where the battery was. I read the manual and found that it took: 3-volt lithium battery (#CR2032)

Afer reading a few reviews, I ordered the Strip of 5 Genuine Sony CR2032. I read a lot of reviews about getting what you pay for with the cheaper ones.

After reading some forums I found where the battery compartment is. Here is a picture showing where it is:
Celestron NexStar 4SE Star Pointer Battery Compartment

I carefully pried the cover off with my fingernails. Under the cover was the battery:
Celestron NexStar 4SE Star Pointer Battery Compartment Open

 

I replaced the battery and put the cover back on.

Bike Lights

For the past nine months, I have been riding my bike to work. It’s a little over 7 miles each way. During the summertime, there is plenty of light in the morning and evening. In October of 2013, when it started getting darker earlier, I had to upgrade my bike lights. I ended up with a Lumina 700 for my headlight and a Serfas Thunderbolt for my taillight. I’ve been very happy with both. I’ve had other bikers, people in cars and people on the road ask me about both of them. They’ve been impressed about how bright they are. Here are some more details.

Lumina 700

NightRider Lumina 700
What I like about the Lumina 700:

  • It has three levels of brightness. It’s plenty bright to light up the dark road on my route where there are no street lights.
  • It has a flash mode with I use for daylight riding. It’s super bright and cars can see me
  • It’s rechargeable via USB. I usually charge at night, but when I forget it’s easy to plugin at work.
  • It’s light weight

You can read all the specs at the Lumina 700 product page. It’s a great light and I highly recommend it. You can buy the Lumina 700 on Amazon for $97. That about $20 cheaper then when I bought it.

Serfas Thunderbolt USB Taillight

serfasThunderbolt

What I like about the Serfas Thunderbolt:

  • It’s the brightest taillight I’ve ever seen. I’ve had several people comment on that.
  • It’s rechargeable via USB. I usually charge at night, but when I forget it’s easy to plugin at work.
  • It mounts on the seat post and is very easy to put on or remove.

You can read all the specs at the Lumina 700 product page. You can buy the Serfas Thunderbolt on Amazon for $36 – $45 depending on the color.

AddressBookFiller for iOS

AddressBookFiller is a simple application which populates your address book with contacts. It is an updated version of my previous post.

This is useful when developing for the iOS and working on the emulator. On many occasions, I’ve spent quite a bit of time adding contacts to the emulator to test something. Then when I change emulator version, they all get erased. This is very frustrating. So I put together this simple application which allow you to programatically fill up your address book.

Currenly the address book is populated with U.S. Presidents. Values are set for:
* first name
* last name
* photo
* phone number
* birthday
* Address: street, city, state, zip

Source on Github: https://github.com/dougdiego/AddressBookFiller

Node.js on the Raspberry Pi

I needed to install Node.js on the Raspberry Pi and searching the web gave me so many difficult ways to do it. But since node.js now distributed as a binary for the Raspberry Pi, it’s pretty easy.

First, go to http://nodejs.org/dist/latest/ and find the latest Raspberry Pi release. It’s the file ending in: linux-arm-pi.tar.gz

Then on the Raspberry Pi, update the package list

sudo apt-get update 

Update packages

sudo apt-get upgrade -y 

Create a directory to install node:

sudo mkdir /opt/node

Change directories to a temporary directory.

cd /tmp

Download the latest release you found at http://nodejs.org/dist/latest/

wget http://nodejs.org/dist/latest/node-v0.10.17-linux-arm-pi.tar.gz

Uncompress it:

tar xvzf node-v0.10.17-linux-arm-pi.tar.gz 

Copy it to your new directory:

sudo cp -r node-v0.10.17-linux-arm-pi/* /opt/node 

Then add it to your environment variables by opening or creating .bash_profile in your home directory. (You nano if you can’t use vi.):

cd
vi .bash_profile

Add the following to your .bash_profile

PATH=$PATH:/opt/node/bin
export PATH

After saving the file, you’re all set!

Raspberry Pi Tip: Change keyboard layout

If you’re in the US like me and you start coding on your Raspberry Pi, you might quickly realize that when typing the pound key # you get the currency symbol: £

This is because the Raspberry Pi defaults to the British Keyboard layout. To change this, as sudo edit the file:

etc/default/keyboard

Change XKBLAYOUT=”gb” to XKBLAYOUT=”us”

# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"

Then restart your Pi.

Knight Rider with Arduino and AdaFruit NeoPixel

Arduino code to light a AdaFruit NeoPixel with the Kight Rider light sequence. This code was based off the Arduino Knight Rider Tutorial.

Source: https://github.com/dougdiego/KnightRiderNeoPixel

Requirements

  1. An Arduino Board. I’m using an Uno.
  2. AdaFruit NeoPixel
  3. Adafruit NeoPixel library

Instructions

  1. Install Adafruit NeoPixel library
  2. Connect the NeoPixel to ground and power. Power requirements here: AdaFruit NeoPixel
  3. Connect NeoPixel to PIN 6 of the Arduino. Connect NeoPixel ground to the ground of the Arduino.
  4. Upload KnightRiderNeoPixel to the board and run it.

Credit

This code was based off the Arduino Knight Rider Tutorial.

Knight Rider Light sequence on a Arduino with AdaFruit NeoPixel led lights from doug on Vimeo.

MHTabBarController

Source: https://github.com/dougdiego/MHTabBarController

I forked MHTabBarController, which is a custom tab bar controller for iOS 5.  I forked it to accomplish two things.

  1. I wanted to use Quartz to draw my arrow instead of using images.
  2. I wanted my arrows to go down in addition to up.

To change the direction of the arrow, just set the pageIndicatorDirection variable like:

MHTabBarController *tabBarController = [[MHTabBarController alloc] init];
tabBarController.pageIndicatorDirection = PageIndicatorDirectionDown;

You can also easily modify the colors in MHTabBarController.m here:

// TAB Colors
#define SELECTED_TAB_COLOR UIColorFromRGB(0xCF785B)
#define SELECTED_TAB_TITLE_COLOR UIColorFromRGBWithAlpha(0xFFFFFF,0.5f)
#define DESELECTED_TAB_COLOR UIColorFromRGB(0xF5EECD)
#define DESELECTED_TAB_TITLE_COLOR UIColorFromRGB(0xAF553A)

ScreenshotDownScreenshotUp

devonThinkToDayOne – Apple Script

Source: https://github.com/dougdiego/devonThinkToDayOne

An AppleScript to export item(s) from DEVONthink to Day One.

Requirements

Download and install Day One Command Line Interface: http://dayoneapp.com/downloads/dayone-cli.pkg

Instructions

  1. Open DEVONthink and select the entries you want to export. You can select 1 or more than 1.
  2. Run the script. An entry will be made into Day One for each entry you selected in DEVONthink.

Configurations

To make the name of the DEVONthink entry a header in Day One, set the following property to ON:

property dayHeader : "OFF"

By default the create date of the entry in DEVONthink is used as the entry date in Day One. I organize my entries in DEVONthink like: 20110101-journal, 20110102-journal. If you use this format, set the following property to “ON”

property extractDateFromTitle : "OFF"

Note: you can modifiy the script if you use a diffent format for you note name.

Credit

The inspiration for this script came from: