IOS usage Summary of rar Unrar4iOS, and iosunrar4ios

Source: Internet
Author: User

IOS usage Summary of rar Unrar4iOS, and iosunrar4ios

The author's recent company project has to implement the rar decompression function. After searching online for a long time, it seems that there is very little information about rar decompression. However, many people recommend a third-party open-source framework named "Unrar4iOS, so I downloaded and tried to use the open-source framework and found some problems in the use process. I would like to make a summary here, so that later people will not take some detours.

1. armv7s is not supported; 2. in the compiled framework, Unrar4iOS. h and Unrar4iOS. some methods, such as-(BOOL) unrarFileTo :( NSString *) path overWrite :( BOOL) overwrite; the implementation of this method is empty, that is, nothing is done (although the original author finally updated two files but did not re-compile the framework); 3. for the second question, someone may say that the Unrar4iOS. h and Unrar4iOS. mm, can the two files be zoomed into the project again? The answer is "if the other link flags in your project is not set to-ObjC, this can be done. Otherwise, an error with repeated identifiers will be reported ". To solve the above problems, I originally wanted to re-compile a framework with the latest source code to support armv7s, but dragged the source code into other projects to report various compilation errors. Due to time problems, I finally gave up, if any of you have compiled the latest framework, you are welcome to leave a message or open-source code. (I would be grateful to the majority of coders ). Now let's talk about how I did it. In fact, I also used the method mentioned in the third question mentioned above, our main project other link flags has set-ObjC, which is a fact in front of us. I cannot modify the configuration of the main project to integrate this framework (too many modifications are involved ), you can only start with the repeated identifier. Now that you have already done so, I just need to modify it (step back ), however, if I do this, the first problem cannot be solved. I can only give up armv7s, and the language is always too pale, next, I will teach you how to integrate the framework into your project step by step to ensure that no error is reported. Step 1: Download the source code. Link: examples-> Frameworks-> Unrar4iOS. framework, drag them into your project and select copy, as shown in:
If ARC is enabled for your project, an error may be reported. Delete autorelease.
If you run it again, an error is returned because raros. hpp and dll. the header file of hpp is included in the framework. Therefore, we need to introduce the two headers in the angle brackets "<>". After modification, the headers are as follows: run again, we will also find some problems with the ARC. just delete the release and so on. Now, your project should be compiled successfully on the simulator. Try compiling with a real machine, YES, it will report the previously mentioned armv7s Error modification method: Change YES in the first red box to NO, and delete arm64 and armv7s In the second red box, keep only armv7. do not forget to add libz. dylib now you can check your project configuration. If the other link flags shown is not configured with the-ObjC flag, you can now successfully use Unrar4iOS on the simulator and real machine. framework. If you set the-ObjC flag like me, continue to the next step. If-ObjC is set, you will see the following error message indicating that the identifier is repeated because the Unrar4iOS we dragged in. the mm implementation file and the file in the framework repeat the specific solution is to first Unrar4iOS and Unrar4iOS. mm files are deleted from the project and re-added after modification. My practice is to rename these two files as "KWUnrar4iOS. h and KWUnrar4iOS. mm "and set KWUnrar4iOS. modify the two "CallbackProc" in mm to "CallbackProcc". After completing this step, you can add these two files to the project again. The modified project structure is as follows: the real machine compilation is OK, at this point I finally completed all the steps, below I release my own demo link https://github.com/zzltjnh/Unrar4iOSDemo
Decompression of encrypted rarfile

This is a program problem. a crc error is a self-check program that comes with the program. It can automatically check whether the program you have installed is consistent with the original program. Otherwise, a CRC error will occur.
In this case, I will summarize:
1. An error occurred while downloading thunder, or there was a problem with thunder itself. Reload thunder.
2. WINRAR has its own problems. I have also encountered this problem. You only need to reinstall WINRAR.
3. If there is a problem with the partition to be stored, you 'd better scan the disk.
4. Memory problems. After all, these files first pass through the memory and then to the hard disk. Generally, small files occupy less memory space and are not damaged, A large file occupies a larger part of the memory and may use damaged parts, which may cause file damage. It may also be incompatible or broken. In particular, this problem is most likely caused by two memories. You can check the bios of the motherboard or make it a single channel.
5. The file is infected with viruses. The current installer and compressed files are verified. If any problem occurs, the file cannot be used normally.

Suggestion:
Try to use a single thread of IE to download large files (especially those files with CRC errors ). If an error occurs, the relationship with thunder is extremely small. You have to check the partition location and memory. If conditions permit, you are advised to change the Internet Express or reinstall the system. If the system cannot be reinstalled, It is a hardware problem!
1. Your hard disk has a physical bad track, which has nothing to do with whether the NTFS format is used.
2. There is a problem with your hard drive transmission data cable. (try another line)
3. There is a problem with the hard disk data interface on your motherboard. (try another interface)
If this is the first problem, you can use this to check and fix it:
Www.crsky.com/soft/5535.html
If this is not the case, it will only be low.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.