• 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: Can't convert to swift 3 and support <iOS 10?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't convert to swift 3 and support <iOS 10?


  • Subject: Re: Can't convert to swift 3 and support <iOS 10?
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 09 Sep 2016 09:48:59 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sPF1AdWEHB:SMTPCORP

On Sep 9, 2016, at 02:19 , Rick Mann <email@hidden> wrote:
>
> Problem is, that only exists on iOS 10.

That’s not exactly it. Your code is presumably in an extension of the new URL type, which is implemented as a more-or-less transparent value-type wrapper around the reference type NSURL. As such, type URL has its own API, which is congruent with the NSURL API on most points, except for a few things that don’t translate well into Swift. Since getResourceValue uses an “unsafe” pointer for its first parameter (unsafe because it’s an inout parameter being passed via an Obj-C ABI), the URL implementation doesn’t provide a direct equivalent.

Everything that’s happening behind the scenes is actually being done by the real NSURL class, or by reimplementing code in the Swift Foundation module, or by the compiler translating your source code in a non-obvious way. Your code should work fine on older versions of iOS.

Note that if your deployment target is set earlier than iOS 10.0, the compiler should flag code that won’t run on the deployment target, but it doesn’t sound like you’re getting any errors when you use the Swiftified APIs.

_______________________________________________

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


References: 
 >Can't convert to swift 3 and support <iOS 10? (From: Rick Mann <email@hidden>)

  • Prev by Date: Launching iOS 10 supported build using Xcode 7
  • Next by Date: Re: Launching iOS 10 supported build using Xcode 7
  • Previous by thread: Re: Can't convert to swift 3 and support <iOS 10?
  • Next by thread: Launching iOS 10 supported build using Xcode 7
  • Index(es):
    • Date
    • Thread