JavaScriptBridge icon indicating copy to clipboard operation
JavaScriptBridge copied to clipboard

seems to segfault in 7.1

Open bunions1 opened this issue 11 years ago • 3 comments

Seems to segfault at this line in JSBFoundation.m:

class_addProtocol([NSRegularExpression class], @protocol(JSBNSRegularExpression)); context[@"NSRegularExpression"] = [NSRegularExpression class];

bunions1 avatar Mar 23 '14 18:03 bunions1

Sorry, JavaScriptCore.framework change significantly in iOS 7.1. I'm still working on to fix those issues.

kishikawakatsumi avatar Mar 23 '14 18:03 kishikawakatsumi

I was able to continue on using a 7.0 simulator. Thanks for the great library. I was able to string together JavasScriptBridge, ios-webkit-debug-proxy, and jsSlime to get a live ios repl in emacs, which I think is extremely cool.

I made a screen capture demo here: https://www.youtube.com/watch?v=2NPewlcA2wM&feature=youtu.be

bunions1 avatar Mar 24 '14 01:03 bunions1

i've the same problem

In the meantime i've applied the workaround described below:

JSBUIKit.m

#ifndef __IPHONE_7_1
    class_addProtocol([UITextInputStringTokenizer class], @protocol(JSBUITextInputStringTokenizer));
    context[@"UITextInputStringTokenizer"] = [UITextInputStringTokenizer class];
#endif

JSBFoundation.m

#ifndef __IPHONE_7_1
    class_addProtocol([NSRegularExpression class], @protocol(JSBNSRegularExpression));
    context[@"NSRegularExpression"] = [NSRegularExpression class];
#endif

#ifndef __IPHONE_7_1
    class_addProtocol([NSTimer class], @protocol(JSBNSTimer));
    context[@"NSTimer"] = [NSTimer class];
#endif

#ifndef __IPHONE_7_1
    class_addProtocol([NSURLProtocol class], @protocol(JSBNSURLProtocol));
    context[@"NSURLProtocol"] = [NSURLProtocol class];
#endif

bsorrentino avatar Apr 06 '14 21:04 bsorrentino