Last active
June 15, 2024 04:00
-
-
Save MTACS/31887e33b5661f885f986a566340c490 to your computer and use it in GitHub Desktop.
Always show battery icon on wired CarPlay connections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CAR* classes have been renamed to DB (DashBoard.framework) on iOS 16 | |
// Note that this only shows the default battery with no inline percentage on iOS 16, use a tweak like Ampere (v1.3+) to enable the percentage | |
// iOS >= 16 | |
%hook DBEnvironmentConfiguration | |
- (BOOL)isConnectedWirelessly { | |
return YES; | |
} | |
%end | |
// iOS < 16 | |
%hook CAREnvironmentConfiguration | |
- (BOOL)isConnectedWirelessly { | |
return YES; | |
} | |
%end |
Hi there @MTACS i found this while trying to find out how to show the battery level when plugged into CarPlay. Would this help me out? If so, how would I do that? Or do I need to jailbreak? Thanks in advance!
Hey, a jailbreak would be needed to override these, it would also be possible if you had access to the unit hosting CarPlay, I’m not sure how available the APIs are though
Thanks for the quick reply! I see. I have an aftermarket Android head unit, so I might have access, but life's a bit too busy for me to go down that rabbit hole right now. 😅😅
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there @MTACS i found this while trying to find out how to show the battery level when plugged into CarPlay. Would this help me out? If so, how would I do that? Or do I need to jailbreak? Thanks in advance!