Reputation: 205
I saw some replies to exact question. Most replies asking to include "-fno-objc-arc".
Let me try to explain the issue.
I have a framework "MobileCommunicationLibrary.framework" which uses lot of non ARC stuff like 1) class which subclass NSAutoReleasePool 2) uses retain, release
This framework has a headerfile "MobileCommunicationLibrary.h" which I need to import in the ARC application and lot of other headerfiles which MobileCommunicationLibrary.h has dependency like "VNSAutoReleasePool.
Now I am developing an iOS application "TestIQLNative". This has class "AppDelegate.h" and "AppDelegate.m" which uses ARC stuff like weak property and synthesizing it. This class has to use ARC compiling or compiler flag has to be "-fobjc-arc"
Also, I need to import <MobileCommunicationLibrary/MobileCommunicationLibrary.h> to AppDelegate.h to use methods provided by the framework.
When I import I am getting lot of errors related to retain, release, NSAutoReleasePool etc as they are non ARC.
I wont be able to put "-fno-objc-arc" for AppDelegate.m as that would give error complaining synthesizing weak property allowed only in ARC.
Can someone help?
< Errors and my Build phase >
< One of the errors in the header file which uses non ARC code in header files >
< Framework header files and including one header file in Appdelegate.h >
< Framework Header file required by application >
Upvotes: 3
Views: 1250
Reputation: 1105
You don't put that linker flag into the View controller's class, but rather set the flag on the imported library you're using. You accomplish this by:
Hope this helps.
Upvotes: 2