Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

MacRumors

macrumors bot
Original poster
Apr 12, 2001
54,666
16,829



185514-multiltouch_200.png



Forum member, arkmannj, discovered how to emulate multi-touch in the iPhone Simulator that accompanies the iPhone SDK.

- Option-Click: Allows you to pinch in and out, and rotate.
- Option-Shift-Click: Allows you to perform a two finger drag.

Meanwhile, we've heard that OpenGL is not supported on the iPhone Simulator, which means developers working on OpenGL applications will have to wait for Apple to start distributing the $99/year developer licenses to be able to test code on the actual iPhone.

Article Link
 

sebastianlewis

macrumors regular
Jan 2, 2007
177
0
San Francisco
When browsing in the Safari App, websites don't automatically detect it as MobileSafari, so when I load Google.com or Facebook for example, I get the regular version instead of the MobileSafari optimized version.

Sebastian
 

Chris Grande

macrumors regular
Jun 17, 2003
248
117
Probably because this is the user agent it sends:
"Aspen Simulator; U; Apsen 1_2 like Mac OSX:en_us"
 

Izzard

macrumors newbie
Mar 8, 2008
6
1
Please! "Discovered"? By reading the bloody documentation? Whatever next? An article to tell us someone has "discovered" you can drag the simulator to a new position on screen? This was even demonstrated when the simulator was first revealed. Come on!
 

Izzard

macrumors newbie
Mar 8, 2008
6
1
anyone notice the new animation when locking the simulator iPhone from the home screen? Or am I crazy?

That's only because locking a real iPhone involves it going into standby and then being brought out of standby. The animation is just a placeholder for those two actions.

Remember, it's a simulator, not an emulator.
 

sebastianlewis

macrumors regular
Jan 2, 2007
177
0
San Francisco
Probably because this is the user agent it sends:
"Aspen Simulator; U; Apsen 1_2 like Mac OSX:en_us"

Hmm, doesn't make much sense does it? This could be used by web developers who don't own an iPhone to simulate how it would look on the iPhone without getting the stretched out view that Safari gives you when you change the user agent.

Sebastian
 

sebastianlewis

macrumors regular
Jan 2, 2007
177
0
San Francisco
I was wondering how they would simulate the multi-touch. How about simulating the accelerometer? Shake the computer if you have a macbook?

And have the HDD stop spinning making the computer completely unresponsive? I'll pass, thanks. Even though the sudden motion sensor has been put to many creative uses, it's primary use is to tell the HDD to stop spinning if you drop your computer, and in my one "test" of that, it didn't work very well and I had to have the HDD replaced the next day.

Also note that the sudden motion sensor is named as such for a reason, it's supposed to detect "sudden motion" and not precise movements, it's not an accelerometer.

Sebastian
 

projectle

macrumors 6502a
Oct 11, 2005
525
57
Well, perhaps Apple is doing away with the MobileSafari moniker and is instead merging the codebase with the new safari that they have been pushing out to developers over the past month or however long that has been.
Sorry, I really don't remember when all that was going on, just that

Especially considering that there are now computers out that work with Multi-Touch.

Sure seems pretty reasonable to keep them the same as Apple has already admitted that they are using an identical version of their kernel on the iPhone as they are on their computers.
 

mduser63

macrumors 68040
Nov 9, 2004
3,041
30
Salt Lake City, UT
Also note that the sudden motion sensor is named as such for a reason, it's supposed to detect "sudden motion" and not precise movements, it's not an accelerometer.

Sebastian

The sudden motion sensor is an accelerometer. There are apps available that take full advantage of it for continuous tilt sensing along all three axes.
 

Jeremy1026

macrumors 68020
Nov 3, 2007
2,212
1,014
I was wondering how they would simulate the multi-touch. How about simulating the accelerometer? Shake the computer if you have a macbook?

Tried it, didn't work (didn't shake it, but did tilt and spin, nothing on the accelerometer graph in the simulator)
 

OS X Dude

macrumors 65816
Jun 30, 2007
1,012
320
UK
I simply refuse to make a game on iPhone, and have to wait til June AND pay £50 to test if it works! They should update the simulator, else there will be a lack of games come launch day.

Although, someone who paid as a dev and got v2.0 beta firmware can load it onto their iPhone and test it I think....
 

winterspan

macrumors 65816
Jun 12, 2007
1,008
0
MobileSafari user agent and Google iPhone RSS reader

Well, perhaps Apple is doing away with the MobileSafari moniker and is instead merging the codebase with the new safari that they have been pushing out to developers over the past month or however long that has been. Sorry, I really don't remember when all that was going on, just that.
Especially considering that there are now computers out that work with Multi-Touch.
Sure seems pretty reasonable to keep them the same as Apple has already admitted that they are using an identical version of their kernel on the iPhone as they are on their computers.

I would assume mobileSafari is much more optimized for a smaller memory footprint. and it is running on the ARM architecture.
Regardless of the primary code, it's incredibly important for Apple to make sure MobileSafari keeps a distinct user agent from regular Safari, otherwise web sites will be unable to detect the iPhone, and will not be able to serve reformatted websites.

For those who haven't used it or don't have an iPhone/Touch, Google has an incredible website implementation for the iPhone/Touch, especially their RSS reader. Their RSS reader has a very clean, elegant interface and is incredibly fast loading and optimized for Mobile Safari.

In addition, what I think is the best feature around, is the fact that if you click on an RSS article link, Google takes you to an optimized version of any website that fits perfectly within the iPhone browser. it even follows you to other pages on the same site as well. Now of course you can turn this off and have google go to the real website, but it's a great feature. it makes it very simple and quick to browse all my daily reads. Everyone needs to try this out.
 

sebastianlewis

macrumors regular
Jan 2, 2007
177
0
San Francisco
The sudden motion sensor is an accelerometer. There are apps available that take full advantage of it for continuous tilt sensing along all three axes.

Damn, should have looked it up first, but yeah you're right. Regardless, the SMS serves a purpose already and Apple didn't put them into laptops to be used for an iPhone simulator.

Well, perhaps Apple is doing away with the MobileSafari moniker and is instead merging the codebase with the new safari that they have been pushing out to developers over the past month or however long that has been.
Sorry, I really don't remember when all that was going on, just that

Especially considering that there are now computers out that work with Multi-Touch.

Sure seems pretty reasonable to keep them the same as Apple has already admitted that they are using an identical version of their kernel on the iPhone as they are on their computers.

MobileSafari and Safari are already using WebKit, they don't differ in that respect, although I think the MobileSafari WebKit is slightly older, unless it was updated in the firmware updates. They differ in the UI and the device they're used on, but looking at the root/branches there doesn't seem to be an iPhone specific version of WebKit, so it's probably safe to assume it's using a pre-existing one and most likely of the 3.0 branch.

Sebastian
 

LinuxGigolo

macrumors member
Oct 25, 2002
71
0
Pittsburgh, PA
Damn, should have looked it up first, but yeah you're right. Regardless, the SMS serves a purpose already and Apple didn't put them into laptops to be used for an iPhone simulator.

To be completely honest, you don't know what Apple put the motion sensor in the 'Books for. The advertised purpose may have been to lock the heads on the HD when it detects sudden motion, but there could very well have been additional uses that they envisioned. When iTunes first came out, the iPod didn't exist. When the iPod was introduced, iTunes became its interface to the computer. It would be wrong to say that 'iTunes already serves a purpose, and Apple didn't put it on Macs to be used as an iPod interface'.
 

Columbo X

macrumors member
Jun 10, 2007
62
0
UK
OpenGL on the simulator

Yeah, it's a shame about the simulator not supporting OpenGL. I hope they get around to updating it to handle tilting as well - a 3D iPhone that can be grabbed and rotated on the desktop shouldn't be too difficult. I know the SDK is in beta, but as it stands it's nigh on impossible to develop and test OpenGL based apps/games unless you're one of the select developers in the US. I hope Apple don't take too long in letting others test on the device itself.
 

ert3

macrumors 6502a
Dec 10, 2007
802
0
when has a vm ever supported 3d though.

lets remember that the iPhone emulator is really more of a VM with a hit compiler tuned to the iPhone's clock speed.
 

megfilmworks

macrumors 68020
Jul 1, 2007
2,046
16
Sherman Oaks
It will appear in xcode when you build and run.

Anyone having trouble with rotating the Aspen sim from the menu pulldown?
Anyone having trouble getting the Aspen sim to play or output audio?
 

iJed

macrumors 6502
Sep 4, 2001
264
10
West Sussex, UK
when has a vm ever supported 3d though.

lets remember that the iPhone emulator is really more of a VM with a hit compiler tuned to the iPhone's clock speed.

It doesn't look like its a VM at all. All the apps run on Aspen Simulator are just native apps running on Mac OS X. You will see them running under top or ps. It looks like the Aspen Simulator is nothing more than a Mac OS X build of the iPhone/iPod touch APIs with a fancy iPhone like front end for testing on.

I bet this is why there is no OpenGL ES support too. OpenGL ES must differ enough from standard Mac OS X OpenGL to make a simple wrapper difficult to implement. Maybe this will come in the future though but its probably a lot more complex than just a simple recompile of the iPhone Objective-C frameworks.

Note that the iPhone simulator is also most certainly not an emulator. It cannot run native iPhone applications.
 

Compile 'em all

macrumors 601
Apr 6, 2005
4,110
229
Please! "Discovered"? By reading the bloody documentation? Whatever next? An article to tell us someone has "discovered" you can drag the simulator to a new position on screen? This was even demonstrated when the simulator was first revealed. Come on!

I approve of this post.
 

sebastianlewis

macrumors regular
Jan 2, 2007
177
0
San Francisco
To be completely honest, you don't know what Apple put the motion sensor in the 'Books for. The advertised purpose may have been to lock the heads on the HD when it detects sudden motion, but there could very well have been additional uses that they envisioned. When iTunes first came out, the iPod didn't exist. When the iPod was introduced, iTunes became its interface to the computer. It would be wrong to say that 'iTunes already serves a purpose, and Apple didn't put it on Macs to be used as an iPod interface'.

Regardless, yes there may be some future use cases for it, but right now the SMS serves a purpose: if you drop it will [theoretically] kick in and stop the HDD, if you're using it for a puppet show instead or as a way to test iPhone games accelerometer controls instead, then when you drop it it won't be useful for protecting your computer at all. But since the simulator is incapable of this "feature" there's no point in arguing about it is there?

Sebastian
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.