Results 1 to 3 of 3
Discuss App Crashes about 6-7 seconds after running in the background at the iPhone Developer Exchange - Hackint0sh.org; I guys, for some reason when I try to run some code in the background, ...
  1. #1
    Rookie Array

    Join Date
    Nov 2008
    Posts
    14
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default App Crashes about 6-7 seconds after running in the background

    I guys, for some reason when I try to run some code in the background, about 5 or 6 seconds after I click the home button, it crashes. The wierd part is that it does NOT happen when I am running the debug console.

    Unofficial SDK 2.0
    iPhone 3G jailbroke
    xCode 3.0

    Code:
    //
    //  UntitledApp.m
    //  Untitled
    //
    
    #import "UntitledApp.h"
    
    @implementation UntitledApp
    
    @synthesize window;
    @synthesize mainView;
    
    - (void)applicationDidFinishLaunching:(UIApplication *)application {	
    	// Create window
    	window = [[UIWindow alloc] initWithContentRect: [UIHardware fullScreenApplicationContentRect]];
        
    	// Set up content view
    	mainView = [[UIView alloc] initWithFrame: [UIHardware fullScreenApplicationContentRect]];
    	[mainView setBackgroundColor:[UIColor whiteColor]];
    	[window setContentView: mainView];
        
    	// Show window
    	[window makeKeyAndVisible];
    }
    
    - (void)applicationSuspend:(struct __GSEvent *)fp8
    {
    	
    }
    
    - (void)applicationDidResume
    {
    	[self terminate];
    }
    
    
    - (void)dealloc {
    	[mainView release];
    	[window release];
    	[super dealloc];
    }
    
    @end
    Any ideas why?



  2. #2
    Newbie Array

    Join Date
    Dec 2008
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I have the same problem using the Open Tool Chain, XCode, Open Tool Chain XCode Project Template, SDK 2.1 and a 1 Gen iPhone.

    After my 'applicationSuspend' method is executed the app hangs around in the process monitor for 5 or 6 seconds and then dies. I have tried starting off a pthread but this doesn't help. No problem when using the debugger until I kill the debugging session, at which point the process dies.

  3. #3
    Newbie Array

    Join Date
    Dec 2008
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    ... and there is no problem using Backgrounder.app to put my application into the background ...

 

 

Similar Threads

  1. Running Apps in the Background
    By iMAChack in forum iOS 4.x (iPhone OS 4.x)
    Replies: 9
    Last Post: 07-23-2011, 11:23 PM
  2. Replies: 2
    Last Post: 12-28-2009, 12:28 AM
  3. ipod crashes/stops playing after 15 seconds
    By seseberg in forum iOS 3.x (iPhone OS 3.x)
    Replies: 0
    Last Post: 07-03-2009, 05:55 PM
  4. Replies: 39
    Last Post: 01-05-2008, 12:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 06:39 AM.
twitter, follow us!