NSURLRequest hanging SpringBoard

可紊 提交于 2019-12-19 09:22:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!