Noodlecode parody of spaghetti code

Month: October 2014

Git download specific tag

git clone <repo_url>

# list out tags
git tag -l 

# checkout specific tag
git checkout tags/<tag_name>

Restart ADB

The most important script for an Android developer

cd /usr/local/bin
vim restart_adb

adb kill-server
adb start-server

chmod +x restart_adb

iOS simulator folder

Up until iOS 7
~/Library/Application Support/iPhone Simulator/<ios version>

New in iOS 8
~/Library/Developer/CoreSimulator/Devices/<simulator id>

Add custom framework to Titanium iOS module

For example, I’m creating a module com.mymod, which include MillennialMedia SDK, that has 2 custom frameworks:

  • MillennialMedia.framework
  • SpeechKit.framework

Copy the frameworks into <module folder>/platform/iphone/custom_frameworks

Open the module in Xcode & include the framework – you can choose to include into any folder, for example the root of project

Edit module.xcconfig. Choose a unique variable name to set the environment variables (e.g MYMOD)


OTHER_LDFLAGS=$(inherited) -F"$(COM_MYMOD_MYMOD_DIR)/custom_frameworks" -framework MillennialMedia -F SpeechKit

Notice that we’re not using the defined env vars. This is because Titanium build script rename the var based on the module id (com.mymod becomes COM_MYMOD). If we’re referring to the var name that we define, it produces distorted value, example, MYMOD_VER become ” 1.0 1.0″


Copyright © 2017 Noodlecode