Re: plugman iOS + compiler flags

2013-07-03 Thread Filip Maj
Hey guys

Heads up Ive committed the compiler flag support to plugman and it is now
deployed to npm as 0.8.1.

I will be working today to incorporate this new plugman into cordova-cli.

On 6/21/13 1:55 PM, "Carlos Santana"  wrote:

>I will take look into detecting incompatible ARC files that will
>potentially give compiler errors.
>
>So far what I had found is to look if code is using invalid functions
>(i.e. retain and release)
>Taking into consideration that file could be using macro to have dual path
>based on
>
>#if !__has_feature(objc_arc)
>
>--Carlos
>
>
>
>
>On Friday, June 21, 2013, Filip Maj wrote:
>
>> That would be cool, have at it Carlos :D
>>
>> On 6/21/13 12:11 PM, "Carlos Santana"  wrote:
>>
>> >+1 on the be able to inject compiler options per file from xml
>> >
>> >On the same area, what about coding a small script/tool to analyze a
>> >plugin
>> >folder and generate the plugin.xml section containing the list of files
>> >that need the flag?
>> >
>> >--Carlos
>> >
>> >
>> >On Fri, Jun 21, 2013 at 3:00 PM, Shazron  wrote:
>> >
>> >> Also, Andrew Grieve did propose it here in proposal #2:
>> >>
>> >>
>> >>
>> 
>>http://markmail.org/thread/tskkqinboyp5cjdg#query:+page:1+mid:ojea6mtsrtx
>> >>x6f2a+state:results
>> >>
>> >> Awesome, I'll file it
>> >>
>> >>
>> >> On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:
>> >>
>> >> > 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
>> >> > >don't
>> >> > >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:
>> >> https://issues.apache.org/jira/browse/CB-2180
>> >> > >
>> >> > >More info here:
>> >> > >
>> >> >
>> >>
>> >>
>> 
>>http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-counti
>> >>n
>> >> > >g-arc-and-cordova-plugins/
>> >> > >
>> >> > >For pre-compiled binaries it's no problem (say the TestFlightSDK
>> >>ships
>> >> > >with
>> >> > >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
>> >> > >attribute.
>> >> > >
>> >> > >
>> >> > >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
>> >> > >>plugin.xml
>> >> > >> definition.  Generally it's been going well, however one problem
>> >>I've
>> >> > >>come
>> >> > >> 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
>> >> > >>being
>> >> > >> 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:
>>
>
>
>-- 
>Carlos Santana
>



Re: plugman iOS + compiler flags

2013-06-21 Thread Carlos Santana
I will take look into detecting incompatible ARC files that will
potentially give compiler errors.

So far what I had found is to look if code is using invalid functions
(i.e. retain and release)
Taking into consideration that file could be using macro to have dual path
based on

#if !__has_feature(objc_arc)

--Carlos




On Friday, June 21, 2013, Filip Maj wrote:

> That would be cool, have at it Carlos :D
>
> On 6/21/13 12:11 PM, "Carlos Santana"  wrote:
>
> >+1 on the be able to inject compiler options per file from xml
> >
> >On the same area, what about coding a small script/tool to analyze a
> >plugin
> >folder and generate the plugin.xml section containing the list of files
> >that need the flag?
> >
> >--Carlos
> >
> >
> >On Fri, Jun 21, 2013 at 3:00 PM, Shazron  wrote:
> >
> >> Also, Andrew Grieve did propose it here in proposal #2:
> >>
> >>
> >>
> http://markmail.org/thread/tskkqinboyp5cjdg#query:+page:1+mid:ojea6mtsrtx
> >>x6f2a+state:results
> >>
> >> Awesome, I'll file it
> >>
> >>
> >> On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:
> >>
> >> > 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
> >> > >don't
> >> > >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:
> >> https://issues.apache.org/jira/browse/CB-2180
> >> > >
> >> > >More info here:
> >> > >
> >> >
> >>
> >>
> http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-counti
> >>n
> >> > >g-arc-and-cordova-plugins/
> >> > >
> >> > >For pre-compiled binaries it's no problem (say the TestFlightSDK
> >>ships
> >> > >with
> >> > >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
> >> > >attribute.
> >> > >
> >> > >
> >> > >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
> >> > >>plugin.xml
> >> > >> definition.  Generally it's been going well, however one problem
> >>I've
> >> > >>come
> >> > >> 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
> >> > >>being
> >> > >> 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:
>


-- 
Carlos Santana



Re: plugman iOS + compiler flags

2013-06-21 Thread aaron barnes

Holy sh*t guys, that's some fast work.


Much obliged,


--aaron


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


Filed: https://issues.apache.org/jira/browse/CB-3967

On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:

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 
don't 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: https://issues.apache.org/jira/browse/CB-2180


More info here:

http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-countin

g-arc-and-cordova-plugins/

For pre-compiled binaries it's no problem (say the TestFlightSDK ships 
with 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 
attribute.


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 
plugin.xml definition. Generally it's been going well, however one 
problem I've come 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 being 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:




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

© 2007-2011 MarkLogic Corporation. All rights reserved.Home 
|Browse |FAQ 
|Advertising 
|Blog 
|Feedback 
|MarkMail^(TM) Legalese 
|About MarkLogic Server 



Re: plugman iOS + compiler flags

2013-06-21 Thread Filip Maj
Thanks Shaz!

On 6/21/13 12:20 PM, "Shazron"  wrote:

>Filed: https://issues.apache.org/jira/browse/CB-3967
>
>
>On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:
>
>> 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
>> >don't
>> >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:
>>https://issues.apache.org/jira/browse/CB-2180
>> >
>> >More info here:
>> >
>> 
>>http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-counti
>>n
>> >g-arc-and-cordova-plugins/
>> >
>> >For pre-compiled binaries it's no problem (say the TestFlightSDK ships
>> >with
>> >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
>> >attribute.
>> >
>> >
>> >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
>> >>plugin.xml
>> >> definition.  Generally it's been going well, however one problem I've
>> >>come
>> >> 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
>> >>being
>> >> 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:
>> >>
>> >> > >>compilerFlags="-fno-objc-arc"/**>
>> >>
>> >> 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
>> >>
>> >>
>> >>
>>
>>



Re: plugman iOS + compiler flags

2013-06-21 Thread Shazron
Filed: https://issues.apache.org/jira/browse/CB-3967


On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:

> 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
> >don't
> >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: https://issues.apache.org/jira/browse/CB-2180
> >
> >More info here:
> >
> http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-countin
> >g-arc-and-cordova-plugins/
> >
> >For pre-compiled binaries it's no problem (say the TestFlightSDK ships
> >with
> >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
> >attribute.
> >
> >
> >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
> >>plugin.xml
> >> definition.  Generally it's been going well, however one problem I've
> >>come
> >> 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
> >>being
> >> 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:
> >>
> >>  >>compilerFlags="-fno-objc-arc"/**>
> >>
> >> 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
> >>
> >>
> >>
>
>


Re: plugman iOS + compiler flags

2013-06-21 Thread Filip Maj
That would be cool, have at it Carlos :D

On 6/21/13 12:11 PM, "Carlos Santana"  wrote:

>+1 on the be able to inject compiler options per file from xml
>
>On the same area, what about coding a small script/tool to analyze a
>plugin
>folder and generate the plugin.xml section containing the list of files
>that need the flag?
>
>--Carlos
>
>
>On Fri, Jun 21, 2013 at 3:00 PM, Shazron  wrote:
>
>> Also, Andrew Grieve did propose it here in proposal #2:
>>
>> 
>>http://markmail.org/thread/tskkqinboyp5cjdg#query:+page:1+mid:ojea6mtsrtx
>>x6f2a+state:results
>>
>> Awesome, I'll file it
>>
>>
>> On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:
>>
>> > 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
>> > >don't
>> > >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:
>> https://issues.apache.org/jira/browse/CB-2180
>> > >
>> > >More info here:
>> > >
>> >
>> 
>>http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-counti
>>n
>> > >g-arc-and-cordova-plugins/
>> > >
>> > >For pre-compiled binaries it's no problem (say the TestFlightSDK
>>ships
>> > >with
>> > >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
>> > >attribute.
>> > >
>> > >
>> > >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
>> > >>plugin.xml
>> > >> definition.  Generally it's been going well, however one problem
>>I've
>> > >>come
>> > >> 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
>> > >>being
>> > >> 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:
>> > >>
>> > >> > > >>compilerFlags="-fno-objc-arc"/**>
>> > >>
>> > >> 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
>> > >>
>> > >>
>> > >>
>> >
>> >
>>
>
>
>
>-- 
>Carlos Santana
>



Re: plugman iOS + compiler flags

2013-06-21 Thread Carlos Santana
+1 on the be able to inject compiler options per file from xml

On the same area, what about coding a small script/tool to analyze a plugin
folder and generate the plugin.xml section containing the list of files
that need the flag?

--Carlos


On Fri, Jun 21, 2013 at 3:00 PM, Shazron  wrote:

> Also, Andrew Grieve did propose it here in proposal #2:
>
> http://markmail.org/thread/tskkqinboyp5cjdg#query:+page:1+mid:ojea6mtsrtxx6f2a+state:results
>
> Awesome, I'll file it
>
>
> On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:
>
> > 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
> > >don't
> > >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:
> https://issues.apache.org/jira/browse/CB-2180
> > >
> > >More info here:
> > >
> >
> http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-countin
> > >g-arc-and-cordova-plugins/
> > >
> > >For pre-compiled binaries it's no problem (say the TestFlightSDK ships
> > >with
> > >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
> > >attribute.
> > >
> > >
> > >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
> > >>plugin.xml
> > >> definition.  Generally it's been going well, however one problem I've
> > >>come
> > >> 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
> > >>being
> > >> 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:
> > >>
> > >>  > >>compilerFlags="-fno-objc-arc"/**>
> > >>
> > >> 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
> > >>
> > >>
> > >>
> >
> >
>



-- 
Carlos Santana



Re: plugman iOS + compiler flags

2013-06-21 Thread Shazron
Also, Andrew Grieve did propose it here in proposal #2:
http://markmail.org/thread/tskkqinboyp5cjdg#query:+page:1+mid:ojea6mtsrtxx6f2a+state:results

Awesome, I'll file it


On Fri, Jun 21, 2013 at 11:58 AM, Filip Maj  wrote:

> 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
> >don't
> >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: https://issues.apache.org/jira/browse/CB-2180
> >
> >More info here:
> >
> http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-countin
> >g-arc-and-cordova-plugins/
> >
> >For pre-compiled binaries it's no problem (say the TestFlightSDK ships
> >with
> >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
> >attribute.
> >
> >
> >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
> >>plugin.xml
> >> definition.  Generally it's been going well, however one problem I've
> >>come
> >> 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
> >>being
> >> 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:
> >>
> >>  >>compilerFlags="-fno-objc-arc"/**>
> >>
> >> 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
> >>
> >>
> >>
>
>


Re: plugman iOS + compiler flags

2013-06-21 Thread Filip Maj
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
>don't
>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: https://issues.apache.org/jira/browse/CB-2180
>
>More info here:
>http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-countin
>g-arc-and-cordova-plugins/
>
>For pre-compiled binaries it's no problem (say the TestFlightSDK ships
>with
>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
>attribute.
>
>
>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
>>plugin.xml
>> definition.  Generally it's been going well, however one problem I've
>>come
>> 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
>>being
>> 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:
>>
>> >compilerFlags="-fno-objc-arc"/**>
>>
>> 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
>>
>>
>>



Re: plugman iOS + compiler flags

2013-06-21 Thread Shazron
Of course it should be considered. We did discuss this briefly, but I don't
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: https://issues.apache.org/jira/browse/CB-2180

More info here:
http://shazronatadobe.wordpress.com/2012/09/05/automatic-reference-counting-arc-and-cordova-plugins/

For pre-compiled binaries it's no problem (say the TestFlightSDK ships with
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
attribute.


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 plugin.xml
> definition.  Generally it's been going well, however one problem I've come
> 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 being
> 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:
>
> 
>
> 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
>
>
>


Re: plugman iOS + compiler flags

2013-06-21 Thread Filip Maj
It makes sense to me although I'd like to hear what other committers think
about this as well.

Related question: are there any other platforms where compiler flags would
be helpful/useful? 

On 6/21/13 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
>plugin.xml definition.  Generally it's been going well, however one
>problem I've come 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 being 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:
>
>
>
>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
>
>