computer, travel, movies, music, cuisine and more
Posts tagged iphone
iPhoneManagers
May 17th
Mike and I are glad to announce to all you iPhone developers a library that we’ve been building together that enables very fast and easy development of network-related iPhone applications.
In particular in the library you will find:
- Network Manager – easy way to deal with parallel asynchronous network requests
- Image Manager – easy way to download and cache images on the iPhone
- SystemMessage Manager – unified way to display HUD messages across the application, both auto-disappearing or not
If you are interested you can grab the source and compile it for your project, it will create a standard static library that you can include in your projects. Header files have relevant comments that will make your life easier when dealing with the library.
For any feedback don’t hesitate to write over here or at the github page.
Enough talking, just try it out! And here’s two images of the SystemMessageManager displaying its HUD windows:
Latest ImageMagick
May 1st
Hi,
I’ve compiled the latest ImageMagick for iPhone with the usual png/tiff/jpeg compatibility. Everything is compiled so that it shouldn’t be rejected by Apple. Please let me know if that’s the case.
You can find the latest 6.6.1-5 version here:IM 6.6.1-5
Or if you dare the latest beta 6.6.1-6 here:IM 6.6.1-6
As usual you can find the latest updated working XCode project here:IM_Test project
I’m in talks with the developers of ImageMagick to try and have a “standard” build for iPhone so that everyone can just go there. I will keep you up to date with it.
Please report any issues you might have and especially if now the applications will be accepted by Apple!
Regards,
~C
NexusOne
Feb 16th
Last week, on Friday, I attended the rescheduled-at-the-last-hour Google Android Developers Lab in Zürich and, as a result, I started learning about Android application development, the Android Google SDK and, as a gift, I came back home with a shiny new NexusOne, which is not available in Europe, yet.
I’m now making a list in the typical fashion of a good ol’ Italian-directed western movie both from a (advanced, I daresay) user and a developer perspective. I hope no-one will feel bad about what I write as most of it, to me, are easily acknowledgeable facts, rather than my only suppositions.
Let’s start up without further waiting.
THE GOOD
NexusOne Overall
I must say that is the best non-iPhone iPhone-competitor that I’ve seen, tried and played with (played as in using, not played as in playing mobile games, for which I don’t have time). The size is right about the same as the iPhone (yes, don’t give me shit it’s one millimeter (I DO use the metric system, and all of you should, as well) less thick, and stuff like that). So, for any iPhone user it just fits good in your hand/pocket/wherever-you-carry it. The screen is bright, the manufacturing quality seems good, it has a replaceable battery with all the pros and cons of that (i.e. it fell and of course the shell opened up, the battery came off, etc, I don’t have to tell you all of this, right?). The screen finishing seems different from the iPhone one and oily fingers DO leave more visible traces than on the iPhone. But that’s just noticeable while the screen is switched off.
Android OS 2.1 updated
The OS is stable, it’s fast and it’s good. I like the interface elements, even though they are much different from the iPhone ones. Everything that’s shipping with/on the phone is good, fast and reliable. A few things could be changed, perhaps, but nothing too radical or that would have a major impact on the overall OS. The “notification system” is a well structured way of informing the user of changes or if something happened. Maybe having the date always on on the top bar while no notifications are available would be a nice thing, rather than having to touch the bar to display the date. But maybe that’s even an option, I do not know.
SDK
At the Android Developers Lab we had the pleasure to have a few talks by one of the Android Application Development Gurus: Reto Meier (The guy that wrote this book). And coming from the wonderful iPhone/MacOSX SDK I was impressed by the quality put into the Android SDK. It surely is easy to learn, easy to code against and quite good. A few very good ideas are Alarms (I smell cronjob around them! And I like it!) and Intents for inter-app communication. Please Apple, if you are reading this have something like it on the iPhone, as well!
THE BAD
The Keyboard
It just badly suck. Especially if you come from the iPhone. First of all, like many European user, we tend to know at least two languages. One being our mother tongue, the other being English. And that’s saying “at least two”, many do speak even three or four. It is very common for me, for example, but for many, many (yes Google, if you’re reading this: MANY) other to write in different languages. And sorry to say it but switching dictionary-based-not-so-well-working-word-recognition on the Android is even harder than on old mobile phones (and I DO mean old mobile phones). Basically it just has ONE language for input AND for the system. To change that you need to go all the way to the preferences. It just resolves into not caring about the language-input-recognition. Which isn’t a very good system, either, yet.
Secondly the keys are too packed together. Or the touch sensitivity isn’t that great. Or I do not know what, but on the iPhone I rarely rarely mistype a word, and in that rare occasion it just gets (properly) corrected. On the NexusOne Android phone I keep, keep, keep mistyping words. And they don’t get corrected, or get corrected in the wrong/weirdest way (for Italian input, at least).
Just two examples, first in Italian, second in English. In Italy we use accents. Quite a lot. The future first person singular of the verb “to go” is “andrò”.
Android I type: Andro – it suggests: Andro, androne, Andria, Andromeda, andrò – for it I have to scroll, as well, on the suggestion.
iPhone I type: Abdro – it suggests: andrò
Let’s see with English, where there’s much use of the “‘” character for shortening things around. Let’s write “you’ve”.
Android I type: Youve – it suggests: nothing
iPhone I type: Youve – it suggests: you’ve
Now, this is just two examples, and both use quite annoying things, such as accents, for which normally you would have to tap-and-keep-pressed a letter for the options to come up or the “‘” character which requires on both phones to “switch” keyboard to the punctuation and then back to the letters (which the iPhone is smart enough to do on his own, anyway, getting more points for it, as well), but I happen to use such features much. much. MUCH. And I do bet most of the user will find this “problem” quite annoying.
Enough said: Google, please fix the keyboard: changing input language, understanding what I would’ve wanted to write, user-interaction needed to write.
This is the ONE BAD THING about the Android OS. Unfortunately it is also quite a big issue for smartphones where we usually “write” more than “speak”. Fortunately it is a software-fixable issue. So just fix it! :)
THE UGLY
Apps
Ok, the iPhone has been out for longer, has less fragmentation, whatnot. But come on, some “bigs” can really do a better job with their apps. First of all, the Facebook app, if compared to the iPhone companion is like 1 era away. I won’t say much more, just update it! Shazam is at the same level, what a pity. And that’s just to cite two GOOD apps. The Market is plagued by bad applications that suck much. And they suck more than most iPhone applications, which already suck quite a lot (many of them, at least). This of course has nothing to do with Google, which is actually delivering quite GOOD applications. Keep the good work up, Google. Step it up, developers!
Just one thing related to Application development. InterfaceBuilder, for the iPhone GUI has no rivals. Just think of something, writing GUI for Java is THE nightmare, at the current state of things.
Battery Life
I haven’t played around too much with the phone. But battery draining seems quite fast. I’ve been mostly texting/writing emails and the thing (brand new!) lasts only two/three days. My iPhone 3G which is now one year and a half old, used exactly in the same way + for listening to some music lasts the same or at times more. This is NOT a good signal. So please, engineers, work on this issue. Please.
WRAPPING IT UP
The NexusOne is definitely a good phone. Possibly some Android OS updates which I hope won’t come too late in the future will make it even a better one. The openness of the Market is surely a good thing, but at this time I would still suggest buying and iPhone. That said, I will wait to see enhancements been thrown down the pipe and update you on the situation. I’m sure the Android OS has a bright future, and I’m happy to be using it and to be developing for it. As much as I’m happy that the iPhone is around, so I don’t waste hours to write an email :P
These are just my thoughts.
~C
ImageMagick for iPhone via SnowLeopard
Feb 10th
1.5.2010 – UPDATE: for the latest compiled libraries and test project please refer to: Latest ImageMagick
Hi all ImageMagick developers!
It has been a long time since my last update to my script for building ImageMagick and having it running as a statically compiled library so that you can use it in all your iPhone applications! To make up for the delay I have made some improvements:
- Script now working on Snow Leopard (tested on 10.6.2 against iPhone SDK 3.1.3)
- Script better organized (although I want to make it even better!)
- Script available through github, so if you want to help me updating it, know some bash scripting, and willing to help, just contact me!
- Updated libpng to v1.4.0 and libtiff to v1.9.2
As usual I also link you a .zip containing all the .a universal (iPhone + iPhoneSimulator) libraries that you can use right away in your projects! I’ve also updated the test project, just minor changes, and the new libraries!
I hope you are happy with the update, and I would like to thank:
Verdier Christophe for a much better script stub posted in the comments
Cocoawithlove.com for a good guide on understanding why the heck the iPhoneSimulator libraries weren’t working at all!
Don’t be shy and comment, also pointing me to some cool iPhone Apps that you’ve been working on that use ImageMagick!
~C
Who Am I?
Oct 15th
A new software developed by me and some others, over at caffeineapps.com. It’s a simple and funny game, just take a picture of yourself or some friends, disguise it with our tools and upload it. From that moment on you’re part of the game, anyone in the world could find you.
For more information just look at the application website or try it out on your iPhone, it’s free! Get it from the AppStore
iPhone Augmented Reality Tips
Aug 29th
As I promised earlier on, here’s a small post with some suggestions on how to make AR apps.
When the iPhone OS 3.1 will be released (the sdk and os are now in beta), it will be possible (and approved by Apple) to overlay anything on top of the camera view, exactly to achieve Augmented Reality applications.
At the moment it is not possible to actively analyze the images presented to the user via the camera, unless using some tricks (which may not prove satisfying, i.e. take multiple screenshots of the screen), or jailbraking (or however it’s called the process of removing Apple’s restrictions) the device.
Following are some specs that most probably your application will need to use if it has to display some information based on your current location (GPS) and heading (compass).
In landscape mode:
Screen height: 320 px / 4.99 cm
Screen width: 426 px / 6.64 cm the camera view leaves some space under itself (which might come useful for some buttons/ui components), that’s why it’s not 480 px.
1 cm: 64 pixels
Camera FOV height: 34.6 degrees
Camera FOV width: 50.1 degrees
With these informations you should be able to do all kind of conversion calculations given you have for example latitude and longitude of something you want to display on screen, if you have the height as well you can use it to fine-tune the placements of all the items on the overlay view of the camera.
Hoping that this information can be useful to someone.
ciop ciop
ImageMagick on iPhone – update with TIFF
Jul 28th
>> PLEASE READ THE UPDATE <<
Here I go again with an update to the ImageMagick on iPhone saga.
As requested by a few people here on the site, I’ve added TIFF functionality to the compiled library. If you’re interested in reviewing the all process to compile ImageMagick for the iPhone please refer to my two previous posts where that’s described in detail: first and second.
TIFF is compiled with ZIP functionality, so you can compress your TIFF files.
As usual I’ve provided you with an updated script which now enables the compilation of tiff-3.8.2 alongside jpeg and png to have it supported in ImageMagick.
For the lazy there’s always the compiled static libraries and includes. But remember to take as well the *.xml configuration files for some ImageMagick functionality!
And the IM_Test Xcode project has been updated as well where the TIFF functionality is tested.
I guess I’ve updated everything accordingly. Please let me know if anything isn’t working for you. As usual contacting me here on the site.
ciop ciop
ImageMagick on iPhone – Xcode
Jul 9th
>> PLEASE READ THE UPDATE <<
UPDATE! (30.08.09)
Thanks to Jon Kean (see comments) the downloadable project now shows how to use images with unusual number of bits per component. As usual look at the defines at the top to check the functionality you want.
UPDATE! (14.07.09)
Thanks to Karl (see comments) the downloadable project now shows different ways of integrating ImageMagick with Objective-C UIImages offering both compressed methods, using JPEG compression as an example, and raw-data methods. Look at the define at the top to change which method the program will be using.
Many of you have asked me if I could post an Xcode project example to use the libraries and ImageMagick, and so, here it is.
The code is self-describing so I didn’t comment it much, it’s just a few functions call. All it does in this case is loading an image from an UIImage (Objective-C) into a format that ImageMagick (C) understands and can manipulate. Then it applies an ImageMagick filter (OrderedPosterize), which uses a configuration file (thresholds.xml).
Everything is working fine, and you have the complete set of libraries, headers and configuration files, and a configured XCode project right at hand.
If you still have any problem, don’t hesitate to contact me!
ciop ciop
ImageMagick on iPhone – UPDATE
Jun 26th
>> PLEASE READ THE UPDATE <<
I’ve been busy working on an iPhone project using ImageMagick the last month, and one thing has kept on bugging me: Some functionality just wasn’t working!!!
In particular I discovered that ImageMagick uses some XML configuration files for some of its internal operations. You can find the whole reading about them on ImageMagick site.
After fiddling, deciding to not care, re-deciding that I WANTED THE FUNCTIONALITY here’s the solution (as usual in steps):
-
The Files that need to be copied over are stored, if you use my script to compile ImageMagick under the installation directory:
~/Desktop/tmp_target/imagemagick/lib/ImageMagick-6.5.3/config
~/Desktop/tmp_target/imagemagick/share/ImageMagick-6.5.3/config -
XCode needs to import such files, so that they can be copied over to the destination application. In particular add them to the Resources directory with the usual method for adding files:
Right click on the Resources folder -> Add -> Existing Files…
and select all the.xmlfiles in the two folders above. -
The Code somewhere, like in a function that gets called only once (
viewDidLoad, for instance), this may vary depending on your program, add the two following lines:NSString * path = [[NSBundle mainBundle] resourcePath]; setenv("MAGICK_CONFIGURE_PATH", [path UTF8String], 1);
Done, now ImageMagick knows where to look for the needed configuration files and will work like a breeze for you.
YES! It was this easy. But not to discover, trust me! :P
ImageMagick on iPhone (with jpeg + png)
Jun 9th
>> PLEASE READ THE UPDATE <<
I’m working on some iPhone applications, which need some image filtering. For now, I won’t say more! Stay tuned for the news when it comes out!
Long story short, I soon found the need (ant the challenge was a good one) to get ImageMagick static libraries so that I can use it on the iPhone. Not only that, but with jpeg and png support. That’s what I need.
After a fast search through the net, I couldn’t find a single _GOOD_ post on how to do that. Just some bits and bytes – Nothing complete.
I soon set on a mission to get ImageMagick to work on the iPhone, as a library. And here’s the result of my quest (around 1 day of search, trials and errors, and at last some light!)
Setting
I’m running MacOSX 10.5.7, with the latest MacPorts installed. If you don’t, get it! I have many ports installed, the ones I “think” are important are:
- jpeg
- libpng
Also, I’m testing everything with the latest beta of the iPhoneOS 3.0 – It should be working also for 2.2.1 and the final 3.0 when it comes out.
The Script
I now provide you with a shell script that should do the whole trick of creating the static libraries needed in Xcode for iPhone development.
Just download it, give it run permission (chmod +x ./compile_im.sh), and launch it. It will ask for your password because it needs to copy a file that is not owned by you, the user.
Before complaining that it’s not working, open it, and look at the required directory structure for it to work.
In particular you will need:
- a Desktop folder named cross_compile
- ImageMagick source: ImageMagick
- jpeg source: jpeg
- libpng source: libpng
- Untar ImageMagick source and place it into ~/Desktop/cross_compile/i_m
- Untar/Unzip jpeg/libpng source and place it into: ~/Desktop/cross_compile/i_m/IMDelegates/jpeg-6b and ~/Desktop/cross_compile/i_m/IMDelegates/libpng-1.2.37
– to which I’ve added the MacPorts patches
Now you can run the script :)
Result
The result will be stored under: ~/Desktop/tmp_target. In particular you can find all the header files needed while developing your application under: ~/Desktop/tmp_target/im_libs/includes (divided by library). While all the static libraries are inside ~/Desktop/tmp_target/im_libs/:
- libjpeg.a
- libpng.a
- libMagickCore.a
- libMagickWand.a
Please note that the script joins both the i386 and the arm build inside one single .a static library to ease up developing (for testing both on the Simulator and on the device itself. When finishing up the application you may want to put only the arm library to make the overall application lighter.
XCode configuration
Step 1
To work with your libraries you need to put some easy adjustments to your Project in XCode. I’ve found that the best thing to do, especially in a shared environment with multiple developers, to just put everything inside the XCode project. To do so do:
- Project->Add To Project->Select all the .a libraries->Click ‘ADD’
- Project->Add To Project->Select the folders inside the ~/Desktop/tmp_target/im_libs/include->Click ‘ADD’
Step 2
Click on Project->Edit Project Settings and edit (in the Build:
- Other Linker Flags: -lMagickCore -lMagickWand -lz -lbz2 -ljpeg -lpng
- Header Search Paths: $(SRCROOT) – make it Recursive
- Library Search Paths: $(SRCROOT) – make it Recursive
- On the lower left click on the small-wheel and select: Add User-Defined Setting
- Key: OTHER_CFLAGS
- Value: -Dmacinsoth=1
This should be enough to make you start.
For the Lazy
If you’re lazy, don’t manage or for whatever other reason you can just download the whole compiled package
Last note
In case the script doesn’t work, you have questions/suggestions/support please don’t hesitate to contact me, and in case you need help with the script please send me the FULL output in a file.
./compile_im.sh > file_to_send.txt




