How Do I Embed A CSV File into an IOS App? SwiftUI

Viewed 82

I am a beginner amateur so go easy on me.

I am using this to get my csv file: let csvFile: CSV = try! CSV(url: URL(fileURLWithPath: "/Users/joedodson/Documents/classroomappstuff/appproject/appproject/mondaybruh.csv")

and then I parse it in the swift project.

HOWEVER, this only works for me on my computer.

For someone else, they get a "no such file or directory" ERROR

So how do I store the CSV file in the app itself instead of getting it from my computer?

THANKS!

0 Answers
Related