+ Reply to Thread
Results 1 to 4 of 4

Thread: iOS Cocoa-Touch Client: ARC errors when building with iOS 5.1 SDK

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iOS Cocoa-Touch Client: ARC errors when building with iOS 5.1 SDK

    Hi,

    I get a lot of errors when trying to build an iOS 5 project in Xcode:
    Code:
    /src/ThriftGetUserVariablesResponse.m
    /src/ThriftGetUserVariablesResponse.m:29:17: 'retain' is unavailable: not available in automatic reference counting mode
    /src/ThriftGetUserVariablesResponse.m:29:17: ARC forbids explicit message send of 'retain'
    /src/ThriftGetUserVariablesResponse.m:31:22: 'retain' is unavailable: not available in automatic reference counting mode
    /src/ThriftGetUserVariablesResponse.m:31:22: ARC forbids explicit message send of 'retain'
    /src/ThriftGetUserVariablesResponse.m:41:19: ARC forbids explicit message send of 'retain'
    (and so on and so forth)
    I noticed that Jiropole mentioned ARC settings here here, but I can't find them.
    Help would be much appreciated

    Vlad

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,219
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Have you read this article in the manual yet? I'm not sure whether it gives the information you need, but it would be a start.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have done all the steps there with no luck, but I figured it out after all.
    To build for iOS 5 with project-wide ARC enabled you have to add the compiler flag -fno-objc-arc to all the files not compatible with ARC.
    To do that go to the project settings, build phases, compile sources and select all the incompatible files, press enter and add -fno-objc-arc in the box.

    Thanks,
    Vlad

  4. #4
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,219
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Glad you got it figured out, and shared the info. I'll get it added to the manual for easy reference.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts