Question

I´m reading metadata from mp3 file, by this way iOS AVFoundation: How do I fetch artwork from an mp3 file? and works perfectly.

when the file is mp3 and doesn´t have artwork, or title, i'm getting NULL values.

I need, when the file haven't metadata like artwork or title, to write my own metadata in the mp3 file, put my own artwork and my own title.

How i can write metadata in mp3 local files on iOS7?

Thanks in advance.

Was it helpful?

Solution

Well as no one answered.

I found the solution, I including this library in the project: https://github.com/rjyo/libid3-ios, which allows you to edit the ID3 tags of any mp3 file.

Some modifications I had to do to make it work properly with xCode5 and iOS7.

Instead - Step 4 (Quick Start (Xcode 4) repo instructions):

Add the following to Link Binary With Libraries list

  • libiconv.2.4.0.dylib
  • Libstdc++.6.0.9.dylib
  • libz.1.2.5.dylib
  • libid3.a

Once you've successfully added the libid3-ios libraries in your project, read this question iOS use ID3Lib to edit ID3 tags from mp3 files in the NSDocsDir, for understand the libid3 API faster.

Remember you should use .mm extension instead of .m for objective-c containing c++ code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top