0

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.

Darren
  • 10,182
  • 20
  • 95
  • 162

1 Answers1

1

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):

b3ll
  • 11
  • 2
  • Thanks, however the init method returns a `BKSProcessAssertion` object who's `valid` property is `false`. I think maybe MessageBox was written for – Darren Nov 30 '15 at 23:15
  • 1
    You need to also ensure that you've got the entitlements hacked to allow SpringBoard to assign BKSProcessAssertions as it's usually backboardd that does this. https://github.com/b3ll/MessageBox/blob/master/Tweak.xmi#L38-L63 – b3ll Dec 01 '15 at 20:42