You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not an issue, but I just wanted to let you know that I'm adding complete folders to my Bundle (by adding them as folder, not as group) and then using this code to access them:
server["/public/(.+)"]=directory("HTML/")func directory(dir:String)->(HttpRequest->HttpResponse){return{ request in
if let localPath = request.capturedUrlGroups.first {print(localPath)
if let filesPath =NSBundle.mainBundle().pathForResource(dir + localPath, ofType:""){print(filesPath)
if let fileBody =NSData(contentsOfFile: filesPath){returnHttpResponse.RAW(200,"OK",nil, fileBody)}}}returnHttpResponse.NotFound
}}
Where HTML/ is the blue folder added to my iOS project.
A typical iOS application bundle contains the application executable and any resources used by the application (for instance, the application icon, other images, and localized content) in the top-level bundle directory.
Hi,
This is not an issue, but I just wanted to let you know that I'm adding complete folders to my Bundle (by adding them as folder, not as group) and then using this code to access them:
Where
HTML/
is the blue folder added to my iOS project.So by going to http://url-to-iphone:port/public/index.html i'm accessing
index.html
inside theHTML/
-folderThe text was updated successfully, but these errors were encountered: