#What's the right way to reference files in the Public directory?
1 messages · Page 1 of 1 (latest)
Oh, it's looking for Public under sources/myapp/Public. I tried doing .copy("../../Public") and now swift run says "Found unhandled resource at /Users/rmann/Projects/Personal/BuzzwordBingo/bingo/Public"
But it works. However, Xcode does not seem to copy the directory.
Rather, it copies into Build/Products/Debug/bingo_bingo.bundle/Contents/Resources/Public, which is not referenced by inApp.directory.publicDirectory
Have you set the custom working directory in Xcode?
You can also initialize File Middleware with a bundle: FileMiddleware(bundle: .module), just make sure your Public folder is in the target's folder, and you have a .copy("Public") step
I hadn't because annoyingly you can't set it to something like $(PROJECT_DIR). But I guess I can hard-code it.