Johnno's Workbench - 2/20 - Tips, Tutorials, Domino, XPages, Java, Mobile, Appcelerator, etc

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
27 May 2014
0

Quick fix for a Git Push via Terminal to BlueMix if fatal error occurs

bluemix

I’m going through a node.js tutorial for BlueMix and got stuck when trying to push some changes to the BlueMix Git Repository via Terminal.

When trying to perform a git push, I got the following timeout error:

warning: push.default is unset; its implicit value is changing in
Git 2.0 from ‘matching’ to ‘simple’.
error: RPC failed; result=22, HTTP code = 401
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
 

It seems I have an earlier version of Git (version 1.9) than what BlueMix uses. The good news is that it’s a simple configuration change to get things going again.

In Terminal, enter the following command:

git config –global push.default simple

This simple config change will do the job and will allow you to work through the BlueMix tutorial step by step.

P.S. I’m no Git expert so i’m not sure what side-effect the above config change produces, but so far all is still working on my side.

NOTE: After this change, you might need to move back to the git add * step in the node.js Tutorial.

I hope this helps.
John
23 May 2014
0

BlueMix Tip: Fix error when installing Cloud Foundry CLI via HomeBrew

In this article I quickly show you how to sort out a Formula error that could occur when trying to install Cloud Foundry CLI via HomeBrew for IBM BlueMix.

My Machine Specs

  • Apple MacBook Pro: Max OS X 10.8.5
  • HomeBrew 0.9.4

The Problem

I tried to run the HomeBrew command line to install Cloud Foundry CLI…

brew install cloudfoundry-cli

…but received the following error:

Error: No available formula for cloudfoundry-cli

Why did this happen?

It’s simple. My version of HomeBrew was 0.9.4 and Cloud Foundry requires 0.9.5 (I typed in brew -v to check the version).

To fix this, do the following:

  • Open Terminal
  • Clean and remove current version of HomeBrew by running the following command:

rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

  • Install latest version of HomeBrew by running the following command:

ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

  • Install Cloud Foundry CLI:

brew install cloudfoundry-cli

Simple as that. You can check the version of Cloud Foundry CLI by typing cf -v in Terminal.

Quick Note

To avoid the above-mentioned fuss, you can also download Cloud Foundry CLI directly by clicking here.

Happy Coding :)
John
22 May 2014
0

Appcelerator Titanium Fix for – dyld: Library not loaded

It seems that after upgrading XCode to version 5.1.1 on my Mac, my iPad Simulator through Appcelerator Titanium no longer works and receives the following error:

Screen Shot 2014-05-20 at 12.27.27 PM

My Specs are the following:

Apple Mountain Lion: 10.8.5
Titanium Studio: 3.2.3
XCode: 5.1.1
Mobile Application: 3.1.2GA SDK (iPad Only)

After some online searching and troubleshooting, I found the following JIRA Ticket that suggests using the “ios-sim” file from the “3.2.2 SDK” in your “3.1.2 SDK”. I tested it and it works.

To apply this fix on your side, do the following:
  • Quit Titanium Studio
  • In Finder, navigate to “Users/{Username}/Library/Application Support/Titanium/mobilesdk/osx/3.2.2.GA/iphone”
  • Copy the “ios-sim” executable
  • In Finder, navigate to “Users/{Username}/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.GA/iphone”
  • Rename the current “ios-sim” executable in this folder (Just in case)
  • Paste the “ios-sim” file you copied
  • Start up Titanium Studio and Test again

I hope this Helps