Re: iphone SDK session duration
Re: iphone SDK session duration
- Subject: Re: iphone SDK session duration
- From: Luke the Hiesterman <email@hidden>
- Date: Tue, 28 Apr 2009 17:13:08 -0700
On Apr 28, 2009, at 5:10 PM, Bess Ho wrote:
Sorry for the delay in response. I'll need more help.
I follow suggestions on using applicationDidFinishLaunching: and
applicationWillTerminate: methods on AppDelegate.
It won't print NSLog when I stop the app on Console and throw errors
when I leave the app on simulator by pressing the home button to
exist the app like the device.
I didn't get any warnings or errors on building the project.
I used NSLog(@"Session: %.1f", [now timeIntervalSinceDate:then]);
Please help!
project code:
http://code.google.com/p/iphonebuilder/downloads/list
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Starting Session
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Ending Session
}
Errors on console when I exit the app on simulator
*** -[NSObject timeIntervalSinceReferenceDate]: unrecognized
selector sent to instance 0x521fe0
2009-04-28 17:07:32.283 sessiontime[22584:20b] CoreAnimation:
ignoring exception: *** -[NSObject timeIntervalSinceReferenceDate]:
unrecognized selector sent to instance 0x521fe0
Just looking at this I can tell you the problem is the now object is
not an NSDate - it's an NSObject. You need to create a valid NSDate.
Luke
On Wed, Apr 22, 2009 at 9:57 AM, Luke the Hiesterman <email@hidden
> wrote:
What's wrong with the NSDate solution below?
Luke
On Apr 21, 2009, at 10:49 PM, Bess Ho wrote:
I couldn't get any working responses from iphone developer forum or
iphone meetup group. I am hoping that this group with more
experience cocoa developers with understanding on MVC model, Xcode.
On Tue, Apr 21, 2009 at 6:47 PM, Luke the Hiesterman <email@hidden
> wrote:
Sounds like you've already answered your question.
Luke
On Apr 21, 2009, at 4:00 PM, Bess Ho wrote:
Is this appropriate mailing list to ask iphone SDK questions?
How do you measure session duration on a utility application with 3
ViewControllers?
Use NSDate to mark the starting and ending the session and print
the time
lapsed on NSLog.
--
Bess Ho
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Bess Ho
--
Bess Ho
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden