1 Seperate the bundle and sandbox directory, and each time you run the app, the uuid will be changed in both path, bellow demo shows document, home and main bundle
2014-09-29 22:53:15.060 HelloWorld[993:157357] /var/mobile/Containers/Data/Application/9B0DF5DF-0009-4197-9286-085391FB27D3/Documents
2014-09-29 22:53:15.062 HelloWorld[993:157357] /var/mobile/Containers/Data/Application/9B0DF5DF-0009-4197-9286-085391FB27D3
2014-09-29 22:53:15.062 HelloWorld[993:157357] /private/var/mobile/Containers/Bundle/Application/DDCCC2B2-0BDA-4E93-85AB-C7374136039E/HelloWorld.app
2 XCode will get exception while webview try to read a PDF in main bundle, and show an error:
DiskImageCache: Could not resolve the absolute path of the old directory.
But app won't crash, some message said change loadData to loadRequest, but it don't work, no solution found now.
NSString *documentsDirectory = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"pdf"];
// NSData *data = [NSData dataWithContentsOfFile:documentsDirectory];
// NSData *data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:documentsDirectory]];
// NSString *sMimeType = @"application/pdf";
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:webView];
// [webView loadData:data MIMEType:sMimeType textEncodingName:@"utf-8" baseURL:nil];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:documentsDirectory]]];
相关推荐
tk2dUiManager.OnMouseWheelChange -> OnScrollWheelChange to stop Unity warning during iOS build because function name starts with OnMouse. textInput.SetFocos / IsFocus Sprite handles disable themselves...
Adjusting this value allows developers to manage changes in the library’s API without breaking existing applications that depend on it. ##### DYLIB_CURRENT_VERSION (Current Library Version) This ...
Books in this program will receive periodic updates to address significant software changes for 12 to 18 months following the original publication date via a free Web Edition. Learn more at ...
The history of changes in each source file list all developers having contributed (When no name is given, the change is by F. Piette). I can't list all contributors here but I want to specially ...
Datum、Litware Inc.、Fabrikam 和 Misc. Questions。这五个主题涵盖了 Microsoft 365 的各个方面,包括身份验证、授权、设备管理、安全性和合作等。 考试题目 考试题目共有 312 道,涵盖了各种题型,包括多选题...
To configure the Flutter SDK on Windows, you need to add the Flutter bin directory to your system's `PATH` variable. This can be done through the System Properties dialog or by editing the environment...
8. azalea_perf3-dragonboard 9. octopus_dev-tina 10. octopus_dev-dragonboard 11. astar_evb-tina 12. azalea_perf1-tina 13. azalea_perf1-dragonboard 14. astar_parrot-tina 15. astar_parrot-...