3

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.

Eman yalpsid
  • 511
  • 1
  • 5
  • 8
  • It's obviously your substrate addon. Your code is fine. Maybe you should post the addon. – Matt S. Aug 14 '11 at 17:47
  • 1
    Putting this on a background thread is not an option - it's UIKit stuff - and unnecessary because UIWebView will perform what it can in the background and in a non-blocking fashion (although it's not always great at doing that). If you really want to prove to yourself that this code is correct, then put it in a sample project without your MobileSubstrate Tweak and see if it works. – Rob Reuss Dec 12 '11 at 20:55

1 Answers1

0

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.

YllierDev
  • 571
  • 4
  • 16