I am facing one issue while I am adding personal non ARC framework in my ARC project. Many errors are there like ARC forbids Objective-C objects in structs. For this I dont want to opt for this solution: "__unsafe_unretained". I want to know from you all expert people that is there any way so that I can add my non arc framework in ARC enabled project?
Asked
Active
Viewed 933 times
0
-
disbale ARC for non ARC framework. – Mayank Jain Apr 10 '14 at 06:43
-
do you have the framework code? – Rajesh Apr 10 '14 at 06:43
-
mayank: How to do that? Rajesh: Yes I have framework code – Inder Apr 10 '14 at 06:45
-
Try with this link: http://stackoverflow.com/questions/7967415/could-i-build-a-arc-framework-and-use-it-in-a-non-arc-project – pankaj asudani Apr 10 '14 at 06:46
2 Answers
4
First you need to add compiler flags in Xcode ->Targets -> Build Phases -> Compile Sources
.
Just double click on the column of the row under compiler flag, here you can select multiple file by using cmd and then can disable the ARC for framework, u need to add the -fno-objc-arc
in every perticular file.
Now clean and build the project and run, it'll work fine..

Bhanu
- 1,249
- 10
- 17
-
to set this flag for many files select all (with shift or command) and press enter to open options popover. – sage444 Apr 10 '14 at 06:58
-
-
I dont want to do this. This is file specific approach. How to do this for framework? I have one framework e.g "stack.framework" and I have added that in my project. That framework is non arc and my project is arc. Now tell me how to do this step. Frameworks .m files will not come to my project. – Inder Apr 10 '14 at 07:03
0
go to your project's target-> build phases->compile sources->file you want to disbale ARC-> double click on file and write -fno-objc-arc

Mayank Jain
- 5,663
- 7
- 32
- 65
-
I dont want to do this. This is file specific approach. How to do this for framework? I have one framework e.g "stack.framework" and I have added that in my project. That framework is non arc and my project is arc. Now tell me how to do this step. Frameworks .m files will not come to my project. – Inder Apr 10 '14 at 07:04