opa334 / Choicy

Advanced tweak configurator for iOS 10 and up
MIT License
351 stars 74 forks source link

Unreliability on iOS 15+ when an app is launched in background by the system #31

Closed miosx closed 1 year ago

miosx commented 1 year ago

Launch without tweaks sometimes won't work. Especially when you run an app for the first time After respring. But then run it again and it succeeds

Fugu15Max beta8

miosx commented 1 year ago

[test app] https://apps.apple.com/us/app/id794862904 if Launch with tweaks, it says detected jailbreak. if Launch without tweaks succeeds, it says nothing. I do Launch without tweaks everytime, but sometimes it says detected jailbreak. so, maybe there is a bug in Choicy or Fugu15MAX.

siberianspot commented 1 year ago

[test app] https://apps.apple.com/us/app/id794862904 if Launch with tweaks, it says detected jailbreak. if Launch without tweaks succeeds, it says nothing. I do Launch without tweaks everytime, but sometimes it says detected jailbreak. so, maybe there is a bug in Choicy or Fugu15MAX.

This happens due the changes was made in 1.4.9 version. It seems that 1.4.9-2 preserves the same mechanism, but you could give it a try. When i noticed that Choicy started skipping some injections, i checked the code and downgraded to 1.4.8. And so far there hasn’t a time to make a PR :(

PS I’m on rootful 16.4.1 so its not a rootless issue. Its about why’s filtering by extension doesn’t work for every AppStore Apps

opa334 commented 1 year ago

This has nothing to do with Choicy 1.4.9.

If you look at the diff, all changes of Choicy 1.4.9 were in the preference bundle, none of the main logic has changed.

The problem is that in iOS 15 and above there is a mechanism that loads apps in the background, these launches are not going through SpringBoard though and that's why the Choicy hook does not catch them and cannot disable tweaks. A new runningboardd hook is likely needed for that, I have tried this in the past but couldn't find the flow that it uses for background launching apps and it's really hard to observe as it happens randomly, I do plan on addressing it in a future update however. So when an app is launched in the background, tweaks will load even if you disabled it in Choicy settings.

miosx commented 1 year ago

@opa334 Thanks for the explanation

siberianspot commented 1 year ago

This has nothing to do with Choicy 1.4.9.

If you look at the diff, all changes of Choicy 1.4.9 were in the preference bundle, none of the main logic has changed.

The problem is that in iOS 15 and above there is a mechanism that loads apps in the background, these launches are not going through SpringBoard though and that's why the Choicy hook does not catch them and cannot disable tweaks. A new runningboardd hook is likely needed for that, I have tried this in the past but couldn't find the flow that it uses for background launching apps and it's really hard to observe as it happens randomly, I do plan on addressing it in a future update however. So when an app is launched in the background, tweaks will load even if you disabled it in Choicy settings.

Thanks for info! But 1.4.8 recognizes many more tweaks (so I thought 1.4.9 just ignores them doing this new app/extension checking). So far I have not noticed any unauthorized injection, but I have not looked for it intentionally though. It’s good to know now. I will try to catch any strange app launches

miosx commented 1 year ago

1.4.10 fix this issue.

opa334 commented 1 year ago

This has nothing to do with Choicy 1.4.9. If you look at the diff, all changes of Choicy 1.4.9 were in the preference bundle, none of the main logic has changed. The problem is that in iOS 15 and above there is a mechanism that loads apps in the background, these launches are not going through SpringBoard though and that's why the Choicy hook does not catch them and cannot disable tweaks. A new runningboardd hook is likely needed for that, I have tried this in the past but couldn't find the flow that it uses for background launching apps and it's really hard to observe as it happens randomly, I do plan on addressing it in a future update however. So when an app is launched in the background, tweaks will load even if you disabled it in Choicy settings.

Thanks for info! But 1.4.8 recognizes many more tweaks (so I thought 1.4.9 just ignores them doing this new app/extension checking). So far I have not noticed any unauthorized injection, but I have not looked for it intentionally though. It’s good to know now. I will try to catch any strange app launches

1.4.8 does not detect more tweaks than 1.4.9. That logic also has not changed.