问题
I have a MobileSubstrate addon that hooks springboard (not in the actual objective c code, but with the plist). It contains a UIWebView, which loads a NSURLRequest. This NSURLRequest is here:
NSString *urlAddress = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
This NSURLRequest hangs springboard. I did LOTS of testing, and I am 100% sure that this NSURLRequest hangs springboard, and not any other element of the MobileSubstrate Tweak.
I await your advice and/or solutions.
UPDATE: I'm going to try threading the loading of the page. If that doesn't work, I'll report back.
回答1:
It's not your code, it's using UIWebView in SpringBoard. SpringBoard somehow doesn't react well to doing that. Same with using system(). It's a known problem, but afaik there has been no solution yet.
来源:https://stackoverflow.com/questions/6935550/nsurlrequest-hanging-springboard