From 856b8388ba6423823008aa77e4b83a4b9a37983b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 30 Oct 2014 07:47:11 -0700 Subject: SpringBoard kills apps that are being reinstalled. --- MobileCydia.mm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 290cf49..15a4f81 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -709,6 +709,7 @@ static const NSString *UI_; static int Finish_; static bool RestartSubstrate_; +static bool UpgradeCydia_; static NSArray *Finishes_; #define SpringBoard_ "/System/Library/LaunchDaemons/com.apple.SpringBoard.plist" @@ -5167,6 +5168,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { issues_ = [NSMutableArray arrayWithCapacity:4]; + UpgradeCydia_ = false; + for (Package *package in packages) { pkgCache::PkgIterator iterator([package iterator]); NSString *name([package id]); @@ -5278,6 +5281,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [removes addObject:name]; } + if ([name isEqualToString:@"cydia"]) + UpgradeCydia_ = true; + substrate_ |= DepSubstrate(policy->GetCandidateVer(iterator)); substrate_ |= DepSubstrate(iterator.CurrentVer()); } @@ -9362,7 +9368,14 @@ _end - (void) _uicache { _trace(); - system("/usr/bin/uicache"); + + if (UpgradeCydia_ && Finish_ > 0) { + setreugid(0, 0); + system("su -c /usr/bin/uicache mobile"); + } else { + system("/usr/bin/uicache"); + } + _trace(); } -- cgit v1.2.3