Author Archives

19 Jun 2014
2

Possible fix for Error 404 when logging into Bluemix via cf

In the following Node.js Tutorial provided on the IBM Bluemix Cloud environment, you get asked to log in to Bluemix via cf (Cloud Foundry Command Line Interface) using the following command:

cf login -a https://api.mybluemix.net -o <your org name> -s <your space name>

For some reason, I kept getting the following error:

bluemix2

It seems the Endpoint URL changed, but even then, the above command didn’t work after using the new Endpoint URL. After some troubleshooting I finally managed to log in by doing the following:

  • In Terminal, enter cf login
  • API Endpoint = https://api.ng.bluemix.net
  • Provide Email and Password.

bluemix1

I hope this helps

Cheers
John

 

12 Jun 2014
0

TIP: Create global batch files for use in Terminal

I’m slowly but surely becoming a huge fan of running my development workflows through Terminal on my Mac, especially in the case of mobile development using Appcelerator Titanium. This is a quick tip to show you how to group terminal commands into batch files and have these batch files accessible anywhere when working in Terminal.

NOTE

  • I haven’t moved to Mavericks as yet, so my example below applies to Mountain Lion, but should also apply to Mavericks
  • In my example below, my batch file navigates to the required folder, builds and runs my mobile app the iPad Simulator
  • To enable/disable hidden folders and files in Finder, I recommend using Funter or Mountain Tweaks
  • You can’t double click on a hidden file to open it, you need to right-click on the file and select “Open”

Do The Following

  • Open TextEdit and add your commands to it, each command on a new line (See below what I did)

batchfile

  • Save this file and provide a file name without a suffix/file extension (i.e. file name = debugapp) and put it in a folder of your choosing. (e.g. “Users/{username}/Documents/terminalcommands“)
  • Under the “Users/{username}” folder, search for a hidden file called “.bash_profile” and open it
  • NOTE: if you can view hidden files in Finder and you don’t see the “.bash_profile” file, you will need to create it using TextEdit or something similar
  • Next, to add your folder path to the PATH Environment Variable, on a new line, type in export PATH=/Users/{username}/Documents/terminalcommands:$PATH

batchfile2

  • Save and Close
  • Restart Terminal

Test if this worked

  • You can check the $PATH variable by entering echo $PATH in Terminal
  • To run your batch file, simply enter the batch file name (e.g. debugapp) in Terminal
I hope this works for you :)
John
10 Jun 2014
0

XCode Tip: Possible fix if Application Loader hangs

I wanted to publish one of my mobile apps to the Apple App Store via Titanium Studio. The Archive was successfully created by Titanium and launched in XCode, but when I tried to distribute my mobile app to the App Store using the Application Loader, I got stuck on the following screen:

ApplicationLoaderHanging2

After waiting about 30 minutes, I cancelled the upload and started Googling for solutions. Thanks to this article, I managed to fix the issue by doing the following:

  • In Finder, navigate to “Applications”
  • Right click on XCode.app and select “Show Package Contents”
  • In the Finder Window that opens, navigate to “Contents/Applications”
  • Right click on “Application Loader.app” and select “Show Package Contents”
  • In the Finder Window that opens, navigate to “Contents/MaxOS/itms/java/lib”
  • Using a Text Editor (TextEdit / Sublime Text / etc), open net.properties
  • Check that http.proxyPort is set to 80 and that it’s unhashed (You can try the same with the https.proxyPort setting if this doesn’t work)
  • Save and Close
  • Restart XCode

ApplicationLoaderHangingAfter restarting XCode all was well with the world again :)

Hope this helps
John
6 Jun 2014
0

Possible fix for IDFA Warning when uploading to App Store

Even though I’m not using any Advertising in my mobile app, I receive an IDFA warning from XCode  before submitting my app to the App Store.

XCode Warning

Thanks to this Article on the Appcelerator Developer Forum,  I managed to fix the problem.

How Did I fix it?

Because I’m using the following Facebook Module (version 3.1.1) in my mobile app, the module makes use of the AdSupport Framework, which resulted in my app making use of IDFA.

To fix this, I downloaded and installed version 3.1.2 of the FaceBook Module.

Click here to view my article on how to install Appcelerator Modules if you are unsure of the process.

3 Jun 2014
2

Appcelerator Tutorial: Install Modules globally for Titanium Studio

One of the great features of Appcelerator Titanium is how you can extend its capability by installing Mobile Modules. Examples of some of these modules are:

  • Ti.Paint (A module that allows you to draw on a canvas within your mobile app…e.g. a user adding a signature)
  • Barcode Scanner (Barcode scanning for your mobile application)

A great place to find many of these modules is the Appcelerator Marketplace. You can also find many other modules on Github as well.

The best news is that it’s become very easy to install a mobile module for your Titanium development environment.

Some key notes about this Tutorial

  • For a detailed reference on how to install modules, click here
  • We will use the In-App Billing Module for this exercise
  • I’m using Android for this example but the same applies to a module developed for iOS
  • Mobile Modules are dependent on the Titanium SDK you are currently using for your mobile app
  • Modules are usually downloaded as zip files

To install a mobile module, do the following

  • Download the In-App Billing Module for Android
  • In Titanium Studio, click on “Help\Install Mobile Module…”

modules1

  • Select the Zip file you downloaded
  • Keep the Output Location as “Titanium SDK” (Remember, we want the module to be available throughout Titanium Studio)
  • Click “OK

modules5

  • Once the module has been installed, restart Titanium Studio (Just to be sure)
  • Once restarted, navigate to one of your mobile projects
  • Open you mobile app’s tiapp.xml file
  • On the right in the “Modules” section, click on the green plus sign (+)
  • In the list of modules dialog, select ti.inappbilling and click “OK”
  • Save the tiapp.xml file

modules4

That’s it. The module has been successfully installed and is available for any of your mobile apps via Titanium Studio. In the near future I’ll provide tutorials on how to make use of some of these modules within your mobile applications.

Till next time, happy coding :)
John