• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] developing for the iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] developing for the iPhone


  • Subject: Re: [OT] developing for the iPhone
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 17 Jul 2007 22:25:15 -0700


On Jul 16, 2007, at 4:22 PM, Baiss Eric Magnusson wrote:

Thanks for all the great responses, I have been trying to affect them...

1) Used Miguel Arroz's suggestion for the Application and I was able to trap for the iPhone in the DirectAction:defaultAction()
setDefaultRequestHandler(requestHandlerForKey (directActionRequestHandlerKey()));

2) In DA some small hack (wish I used Wonder):

String userAgent = (String)_request.headerForKey( "user-agent" );
boolean iPhone = userAgent.regionMatches( true, 13, "iPhone", 0, 6 );
return (iPhone) ? pageWithName("MainMobile") : pageWithName ("Main");


3) I super-classed Main, moved all the java code there, and have two WOComponent's which only do:

		session.setDeviceType( n );		// 0 normal, 1 is iPhone

So, that during Navigation I can choose special iPhone WOComponent's if I need to.

4) I don't do a good job of creating pretty HTML, yet.

5) Mike Schrag suggests:
 Just put your phone on wifi on the same network as your machine

Now I really need to know how to do the above, debugging by deploying is <...>.
The iPhone is on the same router/network as the development machine.


The URL  shown by the development launch is:
	http://localhost: 60xxx/cgi-bin/WebObjects/trackyourfinances.woa

When I try to connect to the development launch via

	http://<devMachinIP>/cgi-bin/WebObjects/trackyourfinances.woa/-60xxx

from the iPhone I get:

	"The requested application was not found on this server."

I saw
	WODirectConnectEnabled=true

so in <Project/Edit Active Executable/Arguments> I added <WODirectConnectEnabled false>

and now I get, "The requested application was not found on this server." from an attempt to development launch.

I must be close.
What more steps do I have to take to change from being only able to Develop in <Direct Connect> mode?

Sometimes the browser will not see the running application and you will get The requested application was not found on this server. Most of the time, this is a bug in Apache / the woadaptor. Restart Apache to return things to normal:


sudo apachectl restart

If that fails, you may be having problems with inconsistent host names. Edit /System/Library/WebObjects/JavaApplications/wotaskd.woa/ Contents/Resources/Properties and add

WOHost=<IP Address>

You might also need to set Apache to use

ServerName <IP Address>


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: [OT] developing for the iPhone (From: Baiss Eric Magnusson <email@hidden>)

  • Prev by Date: Re: Deployment: ERExtensions initialized or not
  • Next by Date: sql for qualifier that spans two databases
  • Previous by thread: Re: [OT] developing for the iPhone
  • Next by thread: Trouble bypassing Trust Manager
  • Index(es):
    • Date
    • Thread