Help please!

Discussion in 'iOS Programming' started by adr96, Dec 28, 2011.

  1. adr96 macrumors newbie

    Joined:
    Dec 18, 2011
    #1
    Since last post, I've progressed a lot. I found a friend that knows how to develop for iOS very well, and I'm working with him. He has asked to me if I could write the code of a button( when it's pressed, it kills all apps running on the iDevice) Any ideas? I need it pls!
     
  2. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #2
    Apps are sandboxed so there is probably no such way, but I'll let others with more iOS experience chime in.
     
  3. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #3
    I would have the button activate a wifi connected method of destroying the iDevice (perhaps dropping into a steel furnace or something). Take all appropriate safety precautions. Works only once per device, so make sure to borrow a large number of your friends devices for testing.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Without jailbreaking, such an app is not possible.

    P.S. I also wanna suggest you use less-generic titles for your threads. It's a courtesy to all those you seek help from.
     
  5. adr96 thread starter macrumors newbie

    Joined:
    Dec 18, 2011
    #5
    OK. Thank you for answer my silly questions!
     
  6. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #6
    If its possible to kill the currently running app (I don't think it is,) then it might be capable to also kill all the apps you've written that are running on the device...

    I believe you can have give your app a special URL. If your other apps know its special URL, then can send it messages. So you could make one app that sends all your other apps a special special message to terminate. I don't really see the value of such an app though...

    Edit: Silly me! I forgot! Just run a loop until you receieve the highest level of memory warning. At that point, the device will have run out of RAM for other apps, and so have terminated them automatically. If your app keeps allocing stuff, the system will kill it, too.
     
  7. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #7
    Oh my, first, Apple would never approve, second, I would literally kill a Developer if he would try to do something like that ot my device.. sigh.
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    You sure about that?
     
  9. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #9
    No, I haven't actually tested any of what I said, but if I wanted to make an app that terminated every open app on the iPhone, I think that's where I would start.
     
  10. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #10
    And you think such an app would get approval into the app store ? Because if it doesn't, and you're still stuck jailbreaking to run your app, might as well just use kernel syscalls like kill and other such things...
     
  11. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #11
    Oh, I wouldn't expect it to be approved into the app store. I just wanted to come up with a solution without jail breaking the iPhone.
     
  12. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #12
    iOS kills the app if it takes too much memory. I forget where I read it but its somewhere in the developer documentation.
     
  13. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #13
    If the iOS system finds out there is being used too much RAM, it will kill apps in the background who are using too much memory, this could be your own app, or others, but you can never be too sure it will actually kill the rest, because if you are using too much memory, iOS will kill your own app first.
    So without jailbreaking it's a nogo, but apparently OP isn't interested anymore.
     

Share This Page