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

  • Home
  • SEARCH
  • 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 8870381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:42:49+00:00 2026-06-14T17:42:49+00:00

I wish to convert an instance of object_setInstanceVariable(self, [key UTF8String], *(id**)addr); to ARC. When

  • 0

I wish to convert an instance of

object_setInstanceVariable(self, [key UTF8String], *(id**)addr);

to ARC. When I try to use Xcode built-in Objective-C ARC converter I get the following error:

‘object_setInstanceVariable’ is unavailable: not available in automatic reference counting mode

How should I handle this problem? I know I can put –fno-objc-arc as Compiler flag, but I would very much like to use ARC instead, if it’s possible (I have a lot of targets that I otherwise would have to manually change the Compiler flag for).

(The code is originally taken from NSObject+NSCoding and Archiver by Mike Mayo at Rackspace Mobile Apps)

  • 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-06-14T17:42:50+00:00Added an answer on June 14, 2026 at 5:42 pm

    Source: https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html

    The only other method to do this is:

    void object_setIvar(id object, Ivar ivar, id value);
    

    You need the Ivar value beforehand, which can be obtained via class_getInstanceVariable(Class class, char* name).

    Overall this will achieve the same effect as before, whilst now being ARC compatible.

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

Sidebar

Related Questions

I wish to convert a single string with multiple delimiters into a key=>value hash
I am a java devloper and I wish to convert following code to java
I have a BMP image and I wish to convert it into a Bitmap
I wish to edit ini files over web server, decided to use django, been
I wish to convert a Color Object into a human readable String. To clarify
I wish to convert a string to md5 and to base64. Here's what I
I have an array of 300 image filenames and wish to convert each filename
I have a tinyint column in the database and I wish to convert it
I have an array of byte that I wish to convert into a hex
Hi I have a big string like this : 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 I wish to convert

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.