Write metadata to mp3 local file - ios

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.

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.

Related

How to export and share a .gltf file as .usdz file in iOS through code? [duplicate]

I am creating an app where users can scan objects in 3D, I have a scene which I can easily save in documents directory and share it in .scn format, but I want to share this .scn file as .usdz file via UIActivityController.
Basically I am using this library https://github.com/StandardCyborg/StandardCyborgCocoa
In this library, a scene file is saved as .gltf format, but I want to share this .gltf file which is not supported on iOS devices. Apple only support .usdz file format. So, I want to convert this .gltf file into .usdz file before sharing.
I have been searching different solutions over internet for a week, but nothing is working till now.
Can anyone help me to resolve this issue?
Any help is greatly appreciated.
It's not documented, but SCNScene's write method works with a .usdz URL, at least since iOS 14.7. This is what I'm using in my app.

How to convert convert .CAF file into .MP3 in iOS?

I am recording audio file. It is recorded with .caf extension.
How can I convert this format into .mp3 format?
There is a open source project lame . The challenge would be making it work for iphone. This would give a direction towards cross compiling for ios.
There is also an iOSMp3Recorder available on GIT and one another example
Record and audio conversion in internet.
I hope above examples may help you.
Using Lame, you can do this. Ther is no default function for this. It will also reduce the file size also. For 60 second audio file .caf will take approx 5mb - 10mb but after converting to .mp3 it will take 0.6mb to 0.7mb. Set 'Enable Bitcode' to 'NO' in build setting for new xocde, otherwise you will get error.
For sample code use this LINK.

Open a CBZ/CBR file in IOS

I am looking to integrate opening/viewing CBZ/CBR file in iOS6 (A simple viewer like UIWebView that reads PDF file will be fine as well).
Are are there any libraries (Commercial or free) that are available for opening these file types?
Thanks in Advance
CBR files are renamed .rar files and CBZ files are renamed .zip files, so you can look for a solution from there. I've never come across a library file specifically targeted for them, but that might not exclude the possibility of one existing, but as they're just standard compression files renamed to make them more portable between CBR/CBZ readers you should be okay with standard decompression libraries.
The library will spit out a number of image files when the decompression has finished, if you extract one with a standard decompression tool you'll see how they'll be presented.

Is there a way to extract the file path of audio files in the Media Library?

I'm working on a music player for iOS, and I was wondering if there was a way to extract the file path of audio files inside the iPod/Media Library on iOS. I've read multiple articles, and it seems you can only extract an URL which can be only used with the AV framework player.
So can you extract the file name of audio files in the Media Library and play these files using an external audio library?
Thanks!

Set artwork for music file in iOS iTunes Library (Jailbreak)

There is a good open-source library that uses Apple's private frameworks to add audio file to the iTunes library on a jailbroken iOS device, libipodimport. What it's missing is the ability to also add artwork when adding a music file (one contributor checked in code that should do this, but the author later removed it as it didn't work).
Does anyone know what was missing from the code in libipodimport (see previous link), or perhaps an alternative way of adding artwork files to a music file?
The contributor to libipodimport told me the missing line that made the artwork adding work:
// metad is a SSDownloadMetadata object, see libipodimport for rest of code
[metad setFullSizeImageURL:[NSURL fileURLWithPath:[userInfo objectForKey:kIPIKeyArtworkPath]]];
It seems to only work with jpeg files, not png files.
The library libipodimport will most likely be updated by the author in the near future.

Resources