This code…
NSURL *clientURL = [[NSBundle mainBundle] URLForResource:@"index" withExtension:@"html" subdirectory:@"client"];
…works in the iPhone Simulator but does not appear to be working in a non-sandboxed application deployed to /Applications/ on an actual iPhone.
The application runs after transferring/ldid signing and other functions work but doing this on the device:
NSLog(@"Client path: %@", [clientURL path]);
returns
Client path: (null)
So I cannot load the HTML file in the UIWebView.
How can I fix this? Could it be a permissions problem? (the app runs as root).
Fixed. This was a permissions error.
After I transferred the app to /Applications/ on the device, I used this command:
And now everything works just as it should.