Posts Tagged ‘tips’

9 Oct 2014
0

Webstorm Tip: Use Key Promoter to help you find Keyboard shortcuts

For me, there are too many keyboard shortcuts to memorise in Webstorm IDE? Thanks to a nifty plugin, these shortcuts can be learnt on the fly.

Overview

What Key Promoter does is monitor your mouse clicks on Menus and Toolbars inside Webstorm. If a shortcut exists for where you mouse-clicked, Key Promoter will show you the Keyboard Shortcut command that you can use for that same action.

Firstly, where to find references to Keyboard Shortcuts

Note: The below instructions are for Mac, but Windows will be very similar.

  • Top Menu > Help > Default Keymap Reference
  • Top Menu > Preferences > Keymap
  • Keyboard: CMD + SHIFT + A (For Mac)
  • Keyboartd: CTRL + SHIFT + A (For Windows)

To install Key Promoter

Note: The below instructions are for Mac, but Windows will be very similar.

  • Go to the Webstorm Preferences: Top Menu > Preferences
  • Search for “Plugins”
  • Click on “Browse Repositories”
  • Search for “Key Promoter”
  • Click on Install Plugin
  • Restart Webstorm

Webstorm

Test Key Promoter

After restarting Webstorm, you can test Key Promoter by performing the following mouse actions below:

  • Clicking on the Changes Tab at the bottom of the Webstorm IDE

Webstorm2

  • Clicking on the Git Update Project icon on the top right of the Webstorm IDE

Webstorm3

Closing

I trust this tip will help you be more productive when developing? Stay tuned for more.

Cheers for now
John
3 Oct 2014
6

Appcelerator fix for Ti.Map on iOS after upgrading to Titanium 3.4.0

This is a quick tip on how to get Ti.Map working again on your iOS7 builds after upgrading Titanium to SDK 3.4.0.

Quick Note

For the sake of those who just want to know how to fix the problem and not why it occurred, I will commence this post with the fix and then after that explain what I assumed happened.

Also, thanks to Tim Poulsen and Boydlee, please see below Option 1 on how to resolve this issue best. I’ve kept my option as Option 2

How to fix the issue – Option 1 (Thanks to Tim and Boydlee)

  • In Titanium Studio, open the tiapp.xml file in your mobile project
  • Under the Modules section, double click on the entry “ti.map”
  • Change the version to 2.0.2 (Which seems to be the version that will work with SDK 3.2.0 and up)

TiMap5

How to fix the issue – Option 2

  • In Finder, navigate to “Library > Application Support > Titanium > modules > iphone > ti.map
  • Starting with the latest version of Ti.Map, open the relevant folder (e.g. 2.0.5)

TiMap

  • Open the manifest file using TextEdit
  • Check the mindsdk property. If it says 3.4.0, then it will only work for iOS 8 Builds

TiMap2

  • If you want to still develop for iOS7 and use Ti.Map globally for all your apps, then you will need to delete the version of Ti.Map relevant to the above-mentioned
  • In my case, I needed to delete the 2.0.4 and 2.0.5 folders. Now, my latest version of Ti.Map is 2.0.2

The error I was getting

I mentioned in a previous post of mine, that the reason I upgraded Titanium Studio to version 3.4.0, was because Xcode 6 silently installed itself on my machine. When I upgraded Titanium to 3.4.0, I got the following error message when trying to run a build for an iOS7 app that makes use of the Ti.MAP module:

TiMap3

 

My assumption of what happened

So, here’s a shot in the dark of what happened. When upgrading to Titanium Studio 3.4.0, Appcelerator saw that I had the Ti.Map module (which Appcelerator developed) and immediately downloaded the latest version (2.0.4 or 2.0.5), which I assume is required for iOS 8 development.

The truth is, I can’t remember what version of Ti.Map I installed last, but I do know that it was working. When I opened the modules folder on my Mac, the latest version was 2.0.4.

At this time I thought that maybe I downloaded 2.0.4 a while ago, and during the update of Titanium Studio this module was modified accidentally by the update.

My first attempt to fix the problem

First thing I did was check on Github what the latest version of Ti.Map was. I noticed 2.0.5 was released and downloaded that to my modules folder.

Sadly this did not fix the problem. I still received the same error as before.

My second attempt to fix the problem

I got a bit clever and opened the manifest file for version 2.0.5. I noticed that the minsdk parameter had a value of 3.4.0. I changed this to 3.2.3.

The good news is that my app was successfully running again. The bad news is that when launching any window that made use of the Ti.Map module I got the following error:

TiMap4

It was here that I finally made the assumption that Ti.Map 2.0.4 was automatically downloaded, as it contains code that only works in XCode 6.

My third attempt which finally fix the problem

What I did next was started from the latest version of Ti.Map, and checking backwards which version had a minsdk lower or equal to 3.2.3. In my case, it was version 2.0.2 of Ti.Map. So I deleted the 2.0.4 and 2.0.5 folders, reran my iOS7 build and Boom. Everything is working again.

I hope this helps everyone. I welcome any input that would assist in understanding what happened here.

Cheers for now
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
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