Open icon indicating copy to clipboard operation
Open copied to clipboard

open crash in ios6.x

Open haohaodlam opened this issue 12 years ago • 7 comments

open crash in ios6.x

haohaodlam avatar Feb 16 '13 08:02 haohaodlam

Any chance this get's fixed ? Using Open in terminal on iOS 6.x and always keep Springboard to crash. Thanks for your effort.

itskemo avatar Feb 18 '13 12:02 itskemo

iOS 6.0bete in itouch4 iOS 6.1 in ipad2 wifi old cpu always keep Springboard to crash

haohaodlam avatar Feb 18 '13 14:02 haohaodlam

Yes, this does not work on iOS 6.0+, yes I will get around to fixing it.

conradev avatar Feb 18 '13 15:02 conradev

please fix it. I will donate for it :D

Orochica avatar Mar 07 '13 11:03 Orochica

@conradev Any idea what's causing the crash?

torarnv avatar Mar 13 '13 15:03 torarnv

Hi,

I was playing around a bit in order to find a fix for this problem. It seems the problem is with the libdisplaystack. A possible workaround is to use the SBUIController Object instead of the libdisplaystack. The Tweak.xm should look like this (tested on iOS 6.1.2, iPhone 4S):

#import <SpringBoard/SpringBoard.h>
#import <AppSupport/CPDistributedMessagingCenter.h>
#import <SpringBoard/SBUIController.h>

%hook SBApplicationController

- (id)init {
    if ((self = %orig)) {

        CPDistributedMessagingCenter *messagingCenter = [CPDistributedMessagingCenter centerNamed:@"com.conradkramer.open.server"];
        [messagingCenter runServerOnCurrentThread];

        [messagingCenter registerForMessageName:@"open" target:self selector:@selector(handleOpenCommand:withUserInfo:)];
    }

    return self;
}


%new(@@:@@)
- (NSDictionary *)handleOpenCommand:(NSString *)name withUserInfo:(NSDictionary *)userInfo {

    NSString *identifier = [userInfo objectForKey:@"identifier"];
    SBApplication *application = [self applicationWithDisplayIdentifier:identifier];

    if (application) {

        // open application
        [[%c(SBUIController) sharedInstance] activateApplicationAnimated: application];

        return [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:0] forKey:@"status"];

    } else {

        return [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:1] forKey:@"status"];

    }

}

%end

But there is one downside to using SBUIController: It only launches the application when the device is opened on the homescreen. For me this is enough, so I won't dig further into this. But I thought it might be useful for anybody who is willing to and/or as a first bug fix version for the people waiting for the "open" command. ;)

Best regards, Christian

regcs avatar Mar 19 '13 02:03 regcs

@regcs please send me one copy of your "open" to [email protected], i need this "open" command on iOS6. thank you.

willbin avatar Apr 07 '13 07:04 willbin