Categories
Digilife

Using iOS SDK 5 with Xcode 3

I have been lately using a quite older MacBook Pro (Intel Core Duo 2 2.4 GHz, 4GB RAM) for development and found that it is pretty unpractical installing Xcode 4 for regular use due to its slow performance and huge memory footprint. So I looked for a way to run good old Xcode 3, which is fine under most aspects and works reliably. Turned out it was not so difficult in the end, so I list here the steps I took to make it work: you simply need to copy a bunch of files from a newer Xcode 4.3 distribution to the proper Xcode 3 location.

  • ensure you are using Xcode 3.2.6 and make sure it is not running before executing the steps below;
  • copy from a newer Xcode distribution (e.g., Xcode 4.3) the OS5 SDK files:
    sudo cp -a /PATH_TO_LATEST_XCODE/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
  • copy version.plist file (important: backup the original one before overwriting it!)
    sudo cp /PATH_TO_LATEST_XCODE/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version.plist /Developer/Platforms/iPhoneOS.platform/
  • copy device support files for OS5:
    sudo cp -a /PATH_TO_LATEST_XCODE/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.*/Developer/Platforms/iPhoneOS.platform/DeviceSupport/

If you want to ever go back to using the old original SDK distributed with Xcode 3, simply switch the version.plist file mentioned above with the backup copy.

In any case, I would not suggest using this set up for building your app for submission to Apple. For that, I prefer using a later Xcode version with a newer compiler and all the regular stuff.

 

Categories
Main

Thanksgiving Sale on iMandala for iPad/iPhone

iMandala - Mandala and Seed Syllabe Meditation

If you would like to have a special Thanksgiving Day, what is more advisable than initiating your self to the art of meditating? And what is better than using some clever app and your iPad/iPhone to achieve surprising results?

You can try iMandala at 40% of its regular price. Just check it.

Categories
Main

dic:ph English Spanish Dictionary for the iPhone

Just to revive this blog, some advertisement blurb on my latest app.

Another release in the dic:ph series, dic:ph English Spanish is a novel concept of multidictionary for the iPhone providing:

  • dictionary definition for English words;
  • dictionary definition for Spanish words;
  • translation from/into Spanish/English;
  • conjugation table for Spanish verbs.

dic:ph is your perfect companion if you are aiming at improving your English or Spanish skills. You can read more about it in our product page for dic:ph.

It is available on the App Store.

Categories
Digilife

Video of The Odyssey for the iPad

I think I have mentioned a few times a collateral project I worked on in the second half of 2011: The Odyssey for the iPad. (The iPhone was not considered from the start due to its smaller size). The project was born as a serious attempt at making an artistic and fiercely poetic version of the Odyssey, based on the original drawing and literary research by Joma, a Barcelona based artist, and on the original music by Xavier Maristany, a Barcelona based musician.

In the end, we decided to cancel the project due to lack of funding (and the Odyssey is ha huge work, we would have needed funding for at least 2 years work), but I think that the outcome, although only a prototype (hence of prototype-level quality and refinement) is worth describing here.

The basic idea is illustrating the Odyssey through the selection of its main stories, events, characters. To give an idea of the size of this work, suffices it to say that we were planning on having about 350 drawings. Each drawing was thought as a mixture of images and the greek text associated to the image, and the really clever part was the way in which the text and the drawing fit together.

Here you can see an image from the prototype and understand what I mean.

Each scene was meant to have some kind of animation, graphical effect, interaction, and music. By rotating the device, you could get a more traditional book-like view of the Odyssey, based on its text.

So, with all this in mind, I built a framework to:

  1. display and browse a set of PDF files (each file was meant to cover one of the 24 Odyssey books) containing the base layout (header, footer, text, default image);
  2. enrich the PDF view by displaying on top of it an animation (conceived as a sequence of PNGs), or an OpenGL scene, or a Cocos2D scene, or a video;
  3. play a background music associated to a PDF file, plus a specific musical comment for each given page.

Apart from the framework, we worked out a couple of scenes as a proof of concept, and this also gave me the chance to integrate in the prototype some cool Cocos2D animation effects and an Open GL 3D panoramic view.

Since the app is just a prototype and cannot be made available through the App Store, recently, I made a video of it. It is not professionally-crafted, but it gives you an idea of what our Odyssey for the iPad could look like. If there are any interested investors out there…

Watch a trailer of The Odyssey for iPad here.

.

Categories
Main

dic:ph 1.2 soon available from the App Store

Only a few days remains before dic:ph 1.2 becomes available on the App Store.

Dic:ph is a novel concept of multilingual dictionary for the iPhone. You can read about it here.

Dic:ph includes several improvements offer a better user experience:

  • tap-to-search: tap any word in any result view to automatically look it up;
  • larger fonts for easier reading;
  • improved parsing of results;
  • recent searches are cached locally;
  • even faster.

As usual, upgrade is free and almost automatic for all current users!

Categories
Main

iMandala available on the App Store

iMandala is the new app for iOS that you can find on the App Store.

iMandala combines time-proven meditation techniques such as mandala and seed syllable visualization, with the soothing sound of Tibetan Bowls and Gongs, and with subtle and relaxing visual effects.

Mandalas and seed syllablesSeed Syllables in iMandala (Bīja) are employed in several spiritual traditions as a support to meditation and to convey a deeper meaning that is not attainable through the rational mind.

Mandalas have spiritual and ritual significance in Hinduism and Buddhism. Aside from aiding in meditaion, they are used to establish a sacred space and as a spiritual teaching tool.

Fully exploiting the powerful graphical capabilities of the iPad and the iPhone, iMandala adds visual effects to such visualizations in an attempt to make them more effective at capturing your focus and make your mind more present and less prone to distractions. Depending on your state of mind and your personal preference, you can choose whether the visual effect is stronger or lighter. iMandala is fully functional on the iPhone, too, but it really shines on the larger screen of the iPad.

Sounds will guide you through the meditation by playing a gong or a tibetan bowl sound at fixed time intervals; you can also choose how many repetitions you would like to have.
The discrete use of sound will help you to relax, since you don’t have to worry about the time passing, while also giving you another means to refocus in case you lost your attention.

If you are not an experienced practitioner of meditation, you can get more benefit from iMandala sounds if you choose a shorter repetition timeframe.

As usual, follow a set of basic guidelines when you are about to meditate: find a peaceful and quiet place; get comfortable; assume a correct position and relax your body; breathe.

iMandala aims to be a project open to the feedback from its users. If you would like to have any of iMandala features further developed, please send an email to us.

Categories
Main

App Store: it’s a hard life

It may come as a bit of a shock to many, but the truth was already known to most independent developers for iOS: the App Store is a really hard environment to live in. This has been lately confirmed in some new figures released by mobile analytics firm Adeven, which speak of almost 400.000 (i.e., 80% of all apps) “zombie” apps: apps that are seldom, if ever, downloaded. Here what TUAW says about it:

[only] a few companies with a lot of experience, brand recognition and marketing money are able to catapult their products up into the Top 25, where they’re usually profitable as long as they can sit there.

This is definitely true, so, when I found this list of beautiful iOS app web sites, I could not resist the curiosity of checking with Xyologic stat engine how much a beautiful site can help an app.

Well, I will leave the detailed task for yourself, since it would be pretty hideous to highlight the not-so-good results of some nice and well-done apps, which fellow independent developers put a lot of effort and time into, but it seems pretty obvious that with several of them ranking below the 10k downloads overall, a nice app web site is not the most important thing to have.

Categories
Main

Calculate CPU usage for iOS

I have recently needed to monitor how much CPU is used by a graphics-intensive app I am developing. Instruments is a wonderful tool to find out performance bottlenecks in your code, but in many cases simply monitoring cpu usage allows for an easier way to find out what is going on (possibly in an unexpected way) in your app.

Collecting this kind of information requires getting to the mach-subsystem but in the end it is not so difficult to set up. Much of the information I needed to accomplish this came from the extremely interesting, though not 100% up-to-date, Mac OS Internals: A Systems Approach, by Amit Sing.

You can find the code on my github.

Categories
Tutorials

Playing a secondary theme in Cocos2D

Cocos2D offers CocosDenshion, an easy to use framework to work with audio.

CocosDenshion allows you to play a background music and then some effects on top of that. This is clearly aimed at games and it usually works really well. The difference between background music and effects is summarized as follows:

  1. background music is thought of as potentially of long duration, so it is handled as a long audio stream;
  2. background music is thought of as continuous, so it is played in exclusive mode;
  3. effects are thought of as smaller in size, so they are loaded into memory entirely;
  4. effects are by their definition itself aimed at being played many times, so they are cached into memory for reuse;
  5. effect can be mixed to background music, so they do not “steal” the audio subsystem.

This works well until your effects are pretty small in size, otherwise your memory requirements will quickly grow. On iOS this is a no-no, since your app has very little memory to run with. Another case when CocosDenshion falls short is when you want your effects to be played continuously in a loop.

Say, for example, that you have a main background theme that is played in a loop, and then a secondary theme that you would like to be also played in a loop when your character enters some given state.

Suche scenario led me to create a small category on CocosDenshion SimpleAudioManager which defines four methods:


-(void) playForegroundMusic:(NSString*)filePath loop:(BOOL)loop;
-(void) stopForegroundMusic;
-(void) pauseForegroundMusic;
-(void) resumeForegroundMusic;

playForegroundMusic will simply play your secondary theme on top of your background music without claiming exclusive access to the audio subsystem. You can find it on my github together with the rest of my Cocos2D snippets.

 

Categories
Main

A bug in the Dropbox app for iOS?

Try this:

  1. launch your Dropbox app on the iPhone/iPad and log in;
  2. go to your computer and browse to the Dropbox settings to change your account password;
  3. go back to your iPhone/iPad and… surprise, you are still allowed to browse through your documents…

So, if you loose your iPhone, no need to rush to change your account password to protect your files from undesired access. This will not do nothing.

The only protection you have is the 4 digits passcode that you can set in the Dropbox app.

Is this enough security for sensitive information?

I suspect this issue is common to many systems using oAuth or other similar long-lived access token mechanisms. But why should it be hard to invalidate all tokens associated to an account when the account password is changed?