i use htm file for some work in program. in simulator i defined local file like this ;
var a = dic["acil_adi"]?.asString()
var path = NSBundle.mainBundle().pathForResource(a,
ofType: ".htm")
var url = NSURL(fileURLWithPath:path!)
var request = NSURLRequest(URL:url)
println("\(url)")
var theWebView:WKWebView = WKWebView(frame:self.view.frame)
theWebView.loadRequest(request)
self.view.addSubview(theWebView)
but when i send this app to device (iPhone 5s)
error appears : file:///private/var/mobile/Containers/Bundle/Application/2E9F7BCA-D57E-4C47-8BBC-6CBF2FF2B2E1/Receteler.app/Akciger_odemi_Akut_Kalp_Yetmezligi.htm Could not create a sandbox extension for '/'
this is my htm files folders on project. i added them "add files to project" from desktop
can you help me why i take an error ?
cause of wrong import file or about bundle ? i don't know objective-c very well so if you give me advice with swift i will be very happy.
thank you