cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: plugman iOS + compiler flags
Date Fri, 21 Jun 2013 18:58:22 GMT
Sweet, let's file an issue as a feature request for this and I'll do my
best to get this in time for 3.0.

On 6/21/13 11:54 AM, "Shazron" <> wrote:

>Of course it should be considered. We did discuss this briefly, but I
>think we added it as a feature request in time for 3.0.0.
>What I did recommend however, is for plugins to use the
>__has_feature(objc_arc) macro to support both ARC and non-ARC. This way,
>including it in any kind of project setting it would work - without adding
>this flag. Pre-3.0.0, ARC is _not_ enabled by default in the project
>template (for plugin compatibility reasons), but in 3.0.0 we are enabling
>it in the default template:
>More info here:
>For pre-compiled binaries it's no problem (say the TestFlightSDK ships
>libTestFlight.a), and for small plugins to convert to use the macro, but I
>can see it being a problem if we had to include the Facebook SDK with its
>gajillion files that may or may not be ARC (since converting them may be a
>maintenance nightmare for newer versions).
>For that last scenario, I would recommend having that new compiler flags
>On Fri, Jun 21, 2013 at 11:37 AM, aaron barnes <> wrote:
>> I've really been enjoying the cordova cli/plugin.xml definition.
>> I've been porting a bunch of old plugins to work with plugman's
>> definition.  Generally it's been going well, however one problem I've
>> across a few times particularly when trying to apply it to old code or
>> adapting 3rd party code is that the code isn't ARC compliant.  The
>> preference would obviously be to make the code arc-compliant, but not
>> a pro in objective c, it's often easier to just add '-fno-objc-arc' as a
>> compiler flag for the file in xcode.
>> It would be great to add as an option for iOS builders, I'm thinking
>> something like:
>> <source-file src="src/ios/LegacyCode.m"
>> in plugin.xml
>> which would then insert something like :
>> 93803FD21768C79200CB4E50 /* LegacyCode.m in Sources */ = {isa =
>> PBXBuildFile; fileRef = 93803FCF1768C79200CB4E50 /* LegacyCode.m */;
>> settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }
>> into the project.pbxproj.
>> would anybody else find this useful as a feature-request?  can it be
>> considered?
>> --aaron

View raw message