Facing new challenges everyday

Unrar4iOS – A port of unrar to iOS platform

November 15th, 2010

Recently I started a project which must understand the CBR format, for those that doesn’t know, CBR is a comics file format, which consists of several image files archived in RAR archive format.

In order to be able to read CBR archive contents and uncompress them I need to port unrar library to iOS, after some quick research I found an existing work done in this way, it’s pretty old, but gave me some insight about how to start.

I decided to start a static library project on XCode, the work started by copying the entire sources of unrar library and try build the project, at first time I got several compiler errors, I could fix few of them, after some hours fixing compiler errors I started to take a look on makefile found here, this makefile helped a lot me here and the project could be successfully compiled.

My next step was create a example project, I could get some a better idea about how to work with unrar library by taking a look on the sources of this project, after some hours reading the sources I could list archive contents and few days later extract one file from archive as stream.

Now with static library and example project working as expected, it’s time to polish a little, I wrote a small Objective-C class called Unrar4iOS, this class act as wrapper class of unrar cpp code, with this class the work with unrar library became a much more easier task, after get this class working as expected I researched a little to figure out how to package the static library as framework, you can find some good info about how do it here.

The final result is a github project called Unrar4iOS, got there and clone or fork it!

Share

6 Comments »

  1. Renepep says

    Hi rogerio,
    Tried your port and while it works flawlessly on simulator :) , It crashes on the device with NSObject selector not found error… even the example included in the project suffers the same fate. Any help would really really be helpful.

    April 7th, 2011 | #

  2. rogerio says

    Fixed and the changes has been pushed to github.

    May 1st, 2011 | #

  3. maxuan says

    Dear, extracting function is not yet complete, and when to achieve?
    “unrarFileTo: (NSString *) path overWrite: (BOOL) overwrite”

    May 4th, 2011 | #

  4. rogerio says

    I need help from you and the others developers to implement missing features, thanks!

    July 3rd, 2011 | #

  5. Martin says

    I find a leak memory with the framework, is very importan because when extract a weight cbr all of these data keep in memory

    September 21st, 2011 | #

  6. Joshua says

    Can u plz tell me how to unrar a password protected file?

    May 24th, 2012 | #

Leave a comment

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad:

 

RSS feed for these comments. | TrackBack URI

Visitors Around the World

Polls

How Is My Site?

View Results

Loading ... Loading ...

Categories

Meta

Links

Advertising

hosted by easy2use.net