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

IDC: China's IoT IT spending will reach nearly US$298.12 billion in 2026

IDC recently released the 2022 V2 version of the ...

Angry Birds announces phasing out Windows Phone: no more updates

Windows Phone, Android and iOS are generally recog...

Guiyang sauna bath, tea tasting massage, what services do you know?

Guiyang sauna and bath, do you know what services...

Top 6 latest Christmas advertisements in 2020, the creativity is amazing!

As a traditional Western festival, Christmas has ...

Kuaishou beauty industry advertising research report!

Paying for beauty has become a daily routine for ...

60 Problem Solving Strategies for Programmers

Basic guidelines 1. First of all, when writing co...

Code to handle iOS horizontal and vertical screen rotation

1. Monitor screen rotation direction When dealing...

Liu Kunkun's 2021 Zero-Based Commercial Illustration Course, Phase 3 [HD]

Liu Kunkun's 2021 Zero-Based Commercial Illus...

Time is running out for Windows Phone to turn around

Microsoft has been particularly active recently, ...

Transform a 6 cm cockroach into a cyborg, what can it do? Exploration and rescue

Cyborg, this term often appears in science fictio...