Some solutions for iOS ARC and MRC mixed encoding

Some solutions for iOS ARC and MRC mixed encoding

1. ARC & MRC mixed development

What should I do if I encounter a third-party library developed using MRC during project development?

For example: ASI

1> Try to use Xcode's conversion tool (high failure rate)

2> In the compilation options, add the -fno-objc-arc tag to the MRC program, indicating that the file is compiled using MRC.

Remark:

(1) The RegexKitLite used in the demonstration also needs to import the libicucore.dylib dynamic library

(2) If you want to add ARC files to the MRC project, you can use the -fobjc-arc flag.

3> Compile MRC's third-party library directly into a static library for use

Note: When compiling a static library, you cannot add a dynamic library reference

illustrate:

RegexKitLite is a regular expression category added to NSString

*** In the project, if the static library used contains classification, you need to add the -ObjC option in the Other Link Flag

<<:  Google returns to China

>>:  Five core points: How to carry out refined operations of mobile games

Recommend

How to create a hit product on Xiaohongshu? Xiaohongshu’s hot-selling guide!

As a gathering place for the new generation of co...

New media operation: How to build your own internal and external matrix?

In this article, the author will talk to you abou...

Apple iOS 15 official version WeChat voice "press and hold to speak" has a delay

IT Home reported on October 12 that the official ...

Xiaohongshu operation and promotion strategies and content skills!

This article explains the operation of Xiaohongsh...

Smart TV industry changes: Amazon rises while Sony sinks

More and more Internet companies are beginning to...

How to better cultivate users' ability and habits to pay?

Today we are going to talk about a common and rel...

Internet in 2016: From traffic to productivity

Faced with the "abdication of the gods"...

Practical methodology for community operation!

This article is a review article. The main task w...

How does Apple do marketing after 12 years in China?

The post "22-year-old Bilibili UP host He To...