Darren
Darren

Reputation: 10408

Cycript script to run app in background

I have a cycript backboardd script that works great on iOS 7 for modifying an app to continue running in the background.

app = [BKProcess processForPid:$PID];
alive = [[BKProcessAssertion alloc] initWithReason:7 identifier:"AppKeepAlive"];
[alive setFlags:0xF];
[sc addAssertion:alive];

This is all that's needed. However on iOS 8 this does't work as BKProcess is now BKSProcess and BKProcessAssertion is now BKSProcessAssertion and they have different methods. There doesn't seem to be a way to attach the assertion to the app like on iOS 7.

Can some please help me get this working under iOS 8.

Upvotes: 0

Views: 530

Answers (1)

b3ll
b3ll

Reputation: 11

There is, however when I used this I simply used the initializer with the required PID.

- (id)initWithPID:flags:reason:name:withHandler:

Check out the BKSProcessAssertion header for reference.

If you want to see an implementation for reference, check out MessageBox (now deprecated, but for reference):

Upvotes: 1

Related Questions