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

Yu Sheng: Number portability from a software design perspective

[[256813]] The issue of "number portability&...

A complete breakdown of Luckin Coffee’s private domain

Recently, Luckin Coffee released its financial re...

Eleven ways to make your IT career bottleneck-free

The following eleven highly practical measures ar...

After teasing 22 apps, Wandoujia launched a grand art marketing campaign...

As one of the earlier Android app stores to be la...

How to efficiently achieve active user growth?

“ Retention analysis is an important method and a...

How do operators control user behavior?

It would be a great thing if we could get users t...

15 tips for selling products through short videos!

Selling goods through short videos has already be...

Castration, sex change... "drug girl" trapped in a man's body

In this world, besides men and women, there is al...

How to plan a community event with no experience?

Based on the author's thoughts and ideas from...