Using .mp3 files in Swift Playgrounds project

Hello, I have an issue with importing some .mp3 files into a swift playground project (in Xcode, not in the Playground app). They worked fine in the Xcode project, but for some reason playgrounds isn't able to find them. I imported them the exact same way as I did in the Xcode project.

Is this just .mp3 files? Or do you see the same problem with other files types? For example, if you add some simple text (.txt) files, can you access them?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Please reply in a reply rather than in the comments; see Quinn’s Top Ten DevForums Tips for an explanation as to why.

It's just the .mp3 files I'm having this issue with.

Interesting.

As a next step I recommend that you add a .txt file next to your .mp3 file and then add code to get the URL for that file and print its path. Do those point into the same directory?

If so, use Terminal to list than directory to see if both files are present.

And if you issue is that you can’t get a URL for the .mp3 file, list the directory you got for the .txt file and see whether the .mp3 is there or not.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, I did some research on this issue and it seems to be related to the platform's restrictions. I don't think there's an actual way to get around them, so I'll just stick to other features.

Using .mp3 files in Swift Playgrounds project
 
 
Q