Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7638213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:07:11+00:00 2026-05-31T08:07:11+00:00

I made a static library that was coded using ARC. I plan to distribute

  • 0

I made a static library that was coded using ARC. I plan to distribute this library for other people to use. I understand that nothing needs to be done to include an ARC static library in a non-ARC project, but what about including ARC header files? For example, the headers for my ARC static library declare properties as weak and strong but when I try to include these headers in a non-ARC project, the compiler freaks out.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:07:12+00:00Added an answer on May 31, 2026 at 8:07 am

    For strong, you can just use retain. They’re identical.

    weak is trickier, and while I know several ways that should work, I’m not certain the best way to handle it.

    First, make sure you actually need it. If you’re supporting iOS4, you can’t have weak anyway, so the issue is moot. My gut feeling is that I’d probably just avoid weak and make all these problems go away. weak is nice, but it’s not that big a deal to avoid in most cases.

    That said, there are some approaches that will work. The best is probably to declare weak accessors without properties in the header. Instead of this:

    @property (nonatomic, readwrite, weak) id delegate;
    

    Do this:

    - (id)delegate;
    - (void)setDelegate:(id)aDelegate;
    

    Then you can still declare a weak property inside your implementation file. The caller can still use dot notation for this, BTW.

    It’s possible that you’ll get a compile error here, since setDelegate: technically takes a __strong id. If that’s the case, just hand-implement setDelegate:

    - (void)setDelegate:(id)aDelegate {
      _delegate = aDelegate;
    }
    

    Haven’t tested it, but that should work. You might also declare the ivar _delegate to be __weak in the @implementation block rather than declaring it as a weak property.

    Like I said; I haven’t tested any of this out. Please post your findings if it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an application that's using a static library I made. One .cpp file
I made a custom Static Library that I use in an iOS project. When
I have a static library that i made for encryption an XML serialization with
I'm trying to use SVG graphics in QIcons. I have a static library that
I have trouble linking a static library that is made out of a few
I made a static library with GCC. Building of the library was OK. When
I have Core static library, a few Component static libraries that relays on the
I'm attempting to use the EGOPhotoViewer as a static library in my project, such
Always was interested why are Array.Sort() and Array.IndexOf() methods made static and similar ArrayList.Sort()
I have made a java swing GUI. Now I want to display a static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.