Noro
Noro

Reputation: 1663

How to force exit iOS application using Monotouch?

How to force exit iOS application using Monotouch?When network not available I want to exit application. Thanks for your advice.

Upvotes: 1

Views: 2354

Answers (2)

madoke
madoke

Reputation: 873

I use the following code in my app:

UIApplication.SharedApplication.PerformSelector(new Selector("terminateWithSuccess"), null, 0f);

It is not recommended by apple to use such selectors, however they did not reject my application.

Upvotes: 3

drekka
drekka

Reputation: 21883

You cannot do this with native iOS coding (Objective C) so I would not expect that you can do it with anything else. Check out this question Exit application in iOS 4.0

Upvotes: 1

Related Questions