Jump to content

2 posts in this topic

Recommended Posts

Posted

 Hello, I have decrypted a game for IOS and have it in an ipa file on my desktop. I'd like to know how to remove a UI alert Controller when the file is decrypted. Better yet if possible how will i be able to trick the app into thinking i'm offline when i'm not. Thanks I appreciate all help and answers.

Posted (edited)

@@Koofguy

I mean you can implement a custom class which is derived from UIAlertController this way and use it instead. Defer the settings of actions to the UIAlertController and instead you would capture the action items in you're derived class and in viewDidLoad set the actions that you have saved to the action UIAlertController's actions

It is not possible to remove actions from a UIAlertController once added. The actions property can return an array of the added actions, but is a get only and can not be set. Actions are added with the addAction(_ : ) method, but there is not a corresponding removeAction(_ : ) method.

 

 

public class MutableUIAlertController : UIAlertController {

var mutableActions:[UIAlertAction] = []

override public func addAction(action: UIAlertAction) {
mutableActions.append(action)
}

public func removeAction(action:UIAlertAction) {
if let index = mutableActions.indexOf(action) {
mutableActions.removeAtIndex(index)
}
}

override public func viewDidLoad() {
for action in mutableActions {
super.addAction(action)
}
super.viewDidLoad()
}
}

 

The rest I leave to you my friend  (y) 

Updated by XxGam3Ma2t3rxX

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines