• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ARC code in a non ARC app. iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC code in a non ARC app. iOS


  • Subject: Re: ARC code in a non ARC app. iOS
  • From: Greg Parker <email@hidden>
  • Date: Tue, 23 Feb 2016 15:33:46 -0800

> On Feb 23, 2016, at 3:25 PM, Alex Zavatone <email@hidden> wrote:
>
> Would it be recommended to package my ARC code with ARC turned off and package that in a framework and then link to that from the non ARC app that will need to load it?

Building a separate dylib or static archive is not necessary, but it might be the simplest way to get the project settings correct. Writing custom build flags for each of your source files is likely to be error-prone.

You can add a check to your ARC source files that will cause a compiler error if ARC is mistakenly off:

    #if !__has_feature(objc_arc)
    #   error This file must be compiled with ARC enabled.
    #endif


--
Greg Parker     email@hidden     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: ARC code in a non ARC app. iOS
      • From: Alex Zavatone <email@hidden>
References: 
 >ARC code in a non ARC app. iOS (From: Alex Zavatone <email@hidden>)
 >Re: ARC code in a non ARC app. iOS (From: Greg Parker <email@hidden>)
 >Re: ARC code in a non ARC app. iOS (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: ARC code in a non ARC app. iOS
  • Next by Date: Re: ARC code in a non ARC app. iOS
  • Previous by thread: Re: ARC code in a non ARC app. iOS
  • Next by thread: Re: ARC code in a non ARC app. iOS
  • Index(es):
    • Date
    • Thread