BTNotificationEnabler
BTNotificationEnabler copied to clipboard
Added basic Do Not Disturb functionality
This contains the functionality described in #4.
I need someone to test this, as I am not able to verify if it works on my own.
I can do it if you can either tell me how to build it (last time I did something, I spent days trying to get a cross-compile setup working) or if you can send me a build.
Does 08edbd42db provide adequate instructions?
When you compile as to the exact instructions, the following errors are logged:
In file included from BulletinHandler.xm:14: /Users/matt/BTNotificationEnabler/theos/include/substrate.h:17:63: error: redefinition of default argument IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL)); ^ ~~~~ /Users/matt/BTNotificationEnabler/theos/include/substrate.h:17:63: note: previous definition is here IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL)); ^ ~~~~ BulletinHandler.xm:16:43: error: use of undeclared identifier 'MSHookIvar' NSMutableArray *interestingSections = MSHookIvar<NSMutableArray *>(self, "fInterestingSections"); ^ BulletinHandler.xm:16:54: error: unexpected interface name 'NSMutableArray': expected expression NSMutableArray *interestingSections = MSHookIvar<NSMutableArray *>(self, "fInterestingSections"); ^ BulletinHandler.xm:16:70: error: expected expression NSMutableArray *interestingSections = MSHookIvar<NSMutableArray *>(self, "fInterestingSections"); ^ BulletinHandler.xm:16:72: error: expression result unused [-Werror,-Wunused-value] NSMutableArray *interestingSections = MSHookIvar<NSMutableArray *>(self, "fInterestingSections"); ^~~~ 5 errors generated.
I just got that myself, although I found out XCode didn't update properly and was still at 4.5.2 so I'm upgrading to 4.56 now
Oh! That is because the version of substrate.h
that comes bootstrapped with Theos is incomplete. To fix this, you can get the real substrate.h
. Run the following from the repository directory:
mkdir substrate
cd substrate
curl -LO http://apt.saurik.com/debs/mobilesubstrate_0.9.4001_iphoneos-arm.deb
ar x mobilesubstrate_0.9.4001_iphoneos-arm.deb
tar xvf data.tar.gz
cd ..
cp substrate/usr/include/substrate.h theos/include
rm -r substrate
Although those commands didn't work (I just ended up with alias' that lead no where), seems this file is it - https://raw.github.com/kennytm/iphone-private-frameworks/master/substrate.h
Has anyone tested this functionality yet?
Didn't seem to work for me.. That said, the notification popped up on the screen as well so it seems Pushover is bypassing DND.
Whoops, just did more reading and DND only works when the device is locked. I tested again with the screen locked however and the notification was still pushed to my Pebble.
Okay. It appears as if BBSettingsGateway
is having trouble connecting to its backing XPC service and retrieving the current DND status.
Any progress on this?
Just for those who can't download the do not disturb patch and successfully build it, use the following build steps (assuming you're starting from scratch):
git clone -b donotdisturb git://github.com/conradev/BTNotificationEnabler.git cd BTNotificationEnabler git submodule update --init curl -O http://cloud.github.com/downloads/rpetrich/ldid/ldid.zip unzip ldid.zip make mv ldid theos/bin rm ldid.zip curl -O https://raw.github.com/kennytm/iphone-private-frameworks/master/substrate.h rm theos/include/substrate.h mv substrate.h theos/include make package
Still not working because BulletinBoard.framework
in the BTMap
service cannot connect to its backing XPC service.
Haven't tried to figure out why yet