0

Sorry for the stupid question.

I have one class file MyClass.h and MyClass.m.

Can i Set ARC for MyClass.h and Manual Reference count MyClass.m.

I have seen one sample library creation code. In that they maintained files as i mentioned above.

But i could not even run the sample source.

Is it proper way to do like that.

user123456789
  • 81
  • 1
  • 8

1 Answers1

0

Can you please post a link to the sample library code that you are using? Or provide sample code you are using. According to this answer a class has to be fully ARC or non-ARC so you can't have a header for a class set as using ARC and the implementation file as manual reference counting which makes sense if you are using properties which you have to define as retain/assign/copy for MRC or strong/weak in ARC.

If you want to use full ARC and MRC classes in your project, the best way would probably be creating the whole project using ARC and then setting the

-fno-objc-arc

compiler flag for the files that do not use ARC. Look at this answer for info on setting the compiler flag.

Community
  • 1
  • 1
Igor N
  • 381
  • 2
  • 6