Build OpenCV and install from source

I wanted to set up the latest OpenCV version on my Mac. I found various instructions, but few that applied specifically to my setup — Mac OS X High Sierra running Anaconda. What follows are my steps to compile and install the latest OpenCV version onto my Mac. Prerequisites You’ll need a few things first…if… Read More »

Rebuilding modules for Titanium 6

I’m no modules expert, nor am I native Android guru. But, when your app depends on eight or ten native modules and Appcelerator announces breaking changes in their SDK, sometimes you have to just dive in and give it your best shot. Appcelerator has released the beta version of Titanium 6. With it, they’ve updated the… Read More »

Apache userdir with El Capitan

I spent four hours working through guides like this one and lots of Stack Overflow posts trying to get userdir support working again after updating from Yosemite to El Capitan. (You know, so that I can open http://localhost/~myusername and put files in /Users/myusername/Sites.) Eventually I gave up and used a simple workaround. In Terminal: cd… Read More »

Simulating a bad network connection on iOS devices

Following yesterday’s quick Android tip, here’s a quick iOS tip. Want to see how your app performs over a crappy network connection? You could tell the boss you gotta go on a field trip. Or, do this: Open Settings and tap Developer Options, tap Status under the Network Link Condition item. From there, turn on… Read More »

Arggh! Failed Android install

You just spent 10 mins waiting for Titanium to build your app for Android and install your app. At the end of it all, you get a message like the following in the console: [INFO] Making sure the adb server is running [INFO] Installing apk: /path/to/your_app/build/android/bin/YourApp.apk [INFO] Installing app on device: Galaxy Nexus [ERROR] Failed… Read More »

Multiple exceptions for iOS 9 App Transport Security

As you’ve surely heard by now, Apple is requiring secure network connections (https). This requirement will apply to all newly-submitted apps for iOS 9, as well as updates to existing apps submitted after the release of iOS 9. There are some great articles about why this is good and how you should be using it. What… Read More »

The right and wrong way to save file paths in Titanium

If your app requires you to save files, perhaps photos that the user snapped using your app, your first thought might be to do something like: // don’t do this: var file = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename); file.write(imageBlobData); // saving the full nativePath to the DB myModel.set(‘filepath’, file.nativePath);; console.log(file.nativePath); Unfortunately, you cannot count on the nativePath… Read More »

Automating Titanium builds with Grunt

OMIGOSH, I submitted our app to Apple with it pointing to our development endpoints, not production! Stupid mistakes like this are the stuff of developer nightmares, and they can easily happen when you have manual steps in your release process. People screw up. We use the awesome Installr service to distribute iOS and Android test… Read More »

Don’t create variables you don’t need

We were having a problem in our app where occasionally photos would load only partway. You’d see the top portion of the photo and the rest would be white. In testing, I was not seeing network errors. Nor was memory being exhausted. Listening in on the ImageView’s error event showed no errors being reported. It wasn’t… Read More »