Showing posts with label iPhone. Show all posts
Showing posts with label iPhone. Show all posts
2012-02-17
Static Framework Template for Xcode
Did I already mention this? Best thing since sliced bread: A template for creating a static framework for iOS in Xcode. Awesome.
Labels:
iPhone,
objective c,
XCode
2012-02-16
Boost on iPhone with nil clash fix
I have set up a github repo that contains boost 1.48.0 with the nil fix from boost ticket #5010 here: https://github.com/root42/boostoniphone-with-objc-nil-fix
This repo is based on the ones by Pete Goodliffe and mz2.
This repo is based on the ones by Pete Goodliffe and mz2.
Labels:
boost,
c++,
iPhone,
objective c
2011-02-19
Controlling MPD with the iPhone
I just installed mpd on an OpenWRT router. It works great and I can recommend using MPoD for controlling it. The whole thing looks like this then:


2011-02-16
Alignment of double values on ARM architectures
Consider the following code:
Looks harmless enough, doesn't it? But here is the problem: It's not necessarily portable or well behaving code. After debugging for about three hours, I found out something interesting. Namely that on ARM platforms, such as the iPhone, double values on the stack need to be stored at 8 byte aligned memory addresses. This was some existing code I was using, so it took me a while to get to this function and to its problem. Single precision float values have no such restriction, by the way. There are two workarounds in the above case. 1) Write a small for-loop that casts the double value to a uint8_t * and copy the double value byte-wise, or 2) use malloc to copy the value. I did the for-loop, since I thought that maybe the malloc call has too much overhead. I guess you could also cast the double to a uint32_t * pointing to two 32 bit words. Anyway, take care when doing such drastic casts. Some platforms might want alignment for some datatypes!
class C {
...
uint8_t *data;
size_t size;
...
void writeDouble(double v)
{
...
reinterpret_cast<double*>(this->data)[this->size] = v;
this->size += sizeof(double);
...
}
};
Looks harmless enough, doesn't it? But here is the problem: It's not necessarily portable or well behaving code. After debugging for about three hours, I found out something interesting. Namely that on ARM platforms, such as the iPhone, double values on the stack need to be stored at 8 byte aligned memory addresses. This was some existing code I was using, so it took me a while to get to this function and to its problem. Single precision float values have no such restriction, by the way. There are two workarounds in the above case. 1) Write a small for-loop that casts the double value to a uint8_t * and copy the double value byte-wise, or 2) use malloc to copy the value. I did the for-loop, since I thought that maybe the malloc call has too much overhead. I guess you could also cast the double to a uint32_t * pointing to two 32 bit words. Anyway, take care when doing such drastic casts. Some platforms might want alignment for some datatypes!
2011-01-24
Mobile blog
Finally. My blogs now also support mobile devices with rendering suitable for small screens. All thanks to Blogger, who have introduced a beta version of the mobile templates via their beta program. You can force the template on every blog by appending "?m=1" to the blog URL. On your own blog, you can just enable it in your blog's mobile settings via draft.blogger.com. Here's how my blog looks in the mobile version:


2010-10-10
ICE train power outlets confuse iPhone
Currently travelling with the german ICE train. The iPhone is plugged in, and I notice the following: the touch events are noisy and jittered. Unplug: all ok. Plug in again: flaky. I guess the 230V line here is of very low quality. I am using the Apple transformer, by the way.
Labels:
iPhone
2010-08-06
How to make Hybrid Apps that run on 3.1 and higher devices (iPod, iPad and iPhone)
This fantastic blog entry helps you to actually use the UserInterfaceIdiom message, which is only available in iOS 3.2 and higher. This way, you can actually build a hybrid iPad / iPhone app that even runs on the original iPhone, which only comes with iOS 3.1 at best.
2010-07-21
Mystery calls by my iPhone
In the last couple of days my iPhone made a couple of ghost calls. I.e. it called some people from my address book, without me doing the actual calls. I think I found the reason for that now. When you hit the home button for several seconds, an iPhone 3GS with iOS 3.x or 4.x will go into voice command mode. This even works when the phone is keylocked. The voice function is not so robust and will misinterpret quite a few background sounds, noises and voices for commands. I couldn't yet make 100% sure that this is how it happened, but it seems to be the only possibility so far, since my phone is always keylocked, when I carry it in my pocket. So I figure the home button was accidentally pressed, and thus the voice command was activated. Will try to investigate this further...
2010-07-10
Wishlist item for the iPhone: Clickable Maps Icons
What annoys me most in the maps application of the iPhone: You cannot tap or click on symbols. E.g. when you tap a bus-icon in the maps.google.com website, you will get a popup with the name of the bus stop and the lines that go there. This is not possible on the iPhone. I also use the fantastic Fahrplan application, however if you do not know the name of the bus stop you want to go to, you're out of luck.
Labels:
iPhone
2010-07-06
me.com woes
I have been using me.com for a while now, and am relatively happy with it. The automatic sync of the data between my work laptop and my iPhone is absolutely priceless. Now I've upgraded to the family account to share the (for my needs) ample 40 GB with two friends. Turns out, the other two accounts can only get 5 GB of storage. Ouch. That sort of sucks. Right now, 10 GB cannot be used at all, cause they are reserved for two more people. Why am I then paying for the extra storage anyhow?
2010-05-28
Mobile Multi Display has hit the AppStore
One of the projects I have been working on at the lab has made it to the iPhone AppStore. It's the Mobile Multi Display, and you can find more information about it on its website: http://www.graphics.rwth-aachen.de/software/mmd/.
2010-04-16
Making transparent iPhone-Sim Screenshots
This is a real time saver: Cmd-Shift-4, hit the space bar, select the iPhone simulator window. This makes a nice transparent screenshot, like this:

2010-04-11
Syncing iPod Touch and iPhone with Linux
Ok, so I just tried out the new libimobiledevice. Installation was a breeze, using the provided OpenSUSE repository. A first run of ideviceinfo returned successfully detailed information about the attached iPod Touch. I also upgraded libgpod4. But Amarok 2.3 did not show a thing. Mounting of the iPod needed to be done manually using "ifuse ~/my-ipod-dir". Supposedly, this happens automatically with Gnome, usin gvfs. But since I am using KDE, this is at the moment a no-go. Ok, so Amarok fails at this point in time. What about gtkpod? It works, although it throws some mysterious error message ("Eweiterte Informationen werden nicht verwendet" -- wtf?), and that program is dog-slow. I though iTunes is bad, but this program is really, really slow as a snail. But here a proof of concept that I was able to sync to albums to the device:

What I did not yet try is syncing contacts, notes and bookmarks. With gtkpod, you need to specify a program to do that. No idea which one that is supposed to be. Keeping my MobileMe contacts in sync with my Linux desktop would be nice, though. Also, syncing from within Amarok is mandatory for me, but does not work currently. So let's wait and hope the situation gets better with time. So far I will continue to sync my device with OS X.

What I did not yet try is syncing contacts, notes and bookmarks. With gtkpod, you need to specify a program to do that. No idea which one that is supposed to be. Keeping my MobileMe contacts in sync with my Linux desktop would be nice, though. Also, syncing from within Amarok is mandatory for me, but does not work currently. So let's wait and hope the situation gets better with time. So far I will continue to sync my device with OS X.
Labels:
iPhone,
iPod Touch,
Linux
2010-03-28
iPhone / iPhoto syncing woes
I just tried to download a couple of images from my iPhone, using iPhoto '08. No luck. Suddenly the iPhone was not listed anymore in iPhoto! It turned out that something on the iPhone was broken / corrupt. When I looked at the device using the Image Capture program, I got this:

As you can see the devices section lists 24 images on the phone, but the photo list is empty. Deleting the pictures on the device restored the functionality. If you need the photos badly, you can forward them to your email or MobileMe account, and then delete them.
Sometimes it is so much better to just have a plain filesystem with photos, instead of some advanced database, that might break...
2010-02-25
Angry Birds
I have to make some advertisement for a funny little iPhone game: Angry Birds. The idea: green pigs stole some eggs, now the birds are angry! Use those Kamikaze birds as ballistic missiles to destroy the pigs! Nice physics engine. Also available on the N900, and costs only 79 Eurocents. Here's a shot:

Subscribe to:
Posts (Atom)