diff --git a/.gitignore b/.gitignore index 09dfede..09e2e94 100644 --- a/.gitignore +++ b/.gitignore @@ -1,63 +1 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - -# Code Injection -# -# After new code Injection tools there's a generated folder /iOSInjectionProject -# https://github.com/johnno1962/injectionforxcode - -iOSInjectionProject/ +/.theos diff --git a/Makefile b/Makefile index 181e04c..e1682e7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -ARCHS = armv7 arm64 +ARCHS = armv7 arm64 arm64e include $(THEOS)/makefiles/common.mk TWEAK_NAME = InstantAssistant diff --git a/Tweak.xm b/Tweak.xm index 4234c50..afb1a54 100644 --- a/Tweak.xm +++ b/Tweak.xm @@ -5,8 +5,11 @@ %hook OPAVoicePlateController -(OPAVoicePlateController *)init{ OPAVoicePlateController *origself = %orig; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didTapOnGlifView) name:UIApplicationDidBecomeActiveNotification object:nil]; - [self didTapOnGlifView]; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didTapOnGlifView) name:UIApplicationDidBecomeActiveNotification object:nil]; + [self didTapOnGlifView]; + }); return origself; } %end diff --git a/control b/control index 9e4fc31..3e187aa 100644 --- a/control +++ b/control @@ -1,7 +1,7 @@ Package: com.gilshahar7.instantassistant Name: InstantAssistant Depends: mobilesubstrate -Version: 1.1 +Version: 1.3 Architecture: iphoneos-arm Description: Always launches the Google Assistant in "listening mode" Maintainer: gilshahar7