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

Can you hold on to a high-speed car, train or plane with your bare hands?

In movies and TV series, we often see scenes like...

iOS 17.5 released, sideloading is finally here!

Early this morning, Apple pushed the first beta s...

Nokia's return to Android: This launcher is pretty good

Nokia's move to launch an Android phone shocke...

WeChat Search Launches “Service Navigation Page”

IT Home reported on February 7 that according to ...

From 0 to 1, how does a new brand cold start on Bilibili?

With more than 200 million young users, from the ...

Wobbly tablet computer

The tablet market is undergoing a seismic change....

CATL vs BYD: Who will be the final winner?

Another daily limit, another daily limit! After t...

Rolls-Royce's first SUV official spy photos revealed

Recently, Rolls-Royce released two official spy p...

The Bubble and Truth of Internet+

Since the release of the government report at the...