Skip to content

Compile errors on Xcode 4.2 with default build settings. #715

irodrigo17 opened this Issue Jan 5, 2013 · 3 comments

3 participants


There are some compile errors on Xcode 4.2, at least with the default build settings, but they're easily fixed.

Not sure if you care about supporting Xcode 4.2, or if this compile errors can be avoided by using compiler flags, I just happen to be using an old MacBook with Snow Leopard at this moment and need to use AFNetworking too.

Here's a list of the issues, but I already fixed all of them on this fork so if you want a patch I can provide it.

  • Use of instancetype.
  • Properties with unspecified ownership or storage attribute {stong, weak, assign, copy}.
  • A method not declared in any interface.
@mattt mattt added a commit that referenced this issue Jan 6, 2013
@mattt mattt [Issue #715] Fixing warnings generated by earlier versions of Xcode (…
…/cc Ignacio Rodrigo)

Minor reformatting
mattt commented Jan 6, 2013

Hi @irodrigo17. Thanks for letting me know about the Xcode 4.2 warnings. The second two warnings were honest mistakes on my part, and have been patched in b7ec928. As for the use of instancetype, this is intentional; I'm fine with dropping compatibility with earlier versions of Xcode with this.

If you are using earlier versions of Xcode, I would advise using AFNetworking 1.0.x or 0.10.x, depending on how far back you're going.

@mattt mattt closed this Jan 6, 2013
guykogus commented Jan 6, 2013

@mattt for instancetype you can use
#if __has_feature(instancetype)
no? I initially put that in for the instancetype pull request, but it looks a bit ugly.


Hey @mattt, thanks for the response and for the fix.
Sadly I'll have to use my own fork until I can upgrade to Xcode 4.5 again, but this is just a small personal project so I'll be fine. Great job here btw!

@ocollet ocollet added a commit to Bunch/AFNetworking that referenced this issue Jan 21, 2013
@ocollet ocollet Merge remote-tracking branch 'afnetworking/master' into HEAD
* afnetworking/master: (231 commits)
  Rename the `username` variable to `user`
  Use NSURL methods instead of CFURL functions
  Fixing center alignment
  Fixing link to diagram in README
  Adding AFNetworking architecture diagram
  Updating list of implemented NSURLConnectionDelegate method
  [Issue #719] Adding shouldUseCredentialStorage property to AFURLConnectionOperation /thanks Xihe Yu
  Marking connection parameter in connection:needNewBodyStream: as __unused
  Re-ordering NSURLConnectionDelegate method implementations
  Minor reformatting
  [Issue #715] Fixing warnings generated by earlier versions of Xcode (/cc Ignacio Rodrigo)
  Fix request stream exhaustion error by copying the original NSInputStream
  Adding AFHTTPClient -setDefaultCredential:
  Adding credential property to AFURLConnectionOperation
  Added single quote to the chars to escape
  Bumping version to 1.1.0
  Updating Changelog for 1.1.0
  Asynchronously posting all notifications by dispatching to main
  dispatches network request start / end notifications asynchronously
@greghe greghe pushed a commit to skillz/AFNetworking that referenced this issue Sep 3, 2015
@mattt mattt [Issue #715] Fixing warnings generated by earlier versions of Xcode (…
…/cc Ignacio Rodrigo)

Minor reformatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.