[swift-users] CGContext endPage method ambiguous (two candidates) Swift 3/Xcode 8

Joe Groff jgroff at apple.com
Fri Jun 17 11:28:27 CDT 2016


> On Jun 16, 2016, at 1:49 PM, Dave Reed via swift-users <swift-users at swift.org> wrote:
> 
> I've got a project I had been working on using Swift2.2 and decided to migrate to Swift3 (using Xcode 8 beta) before the project gets any bigger. I successfully migrated everything except I have a CGContext for writing to a PDF and calls the endPage() method. For that the compiler responds with "ambiguous use of endPage()" and claims to find two candidates for it.
> 
> Is there a work around for this?

This came up in the WWDC labs this week too. One possible workaround is to wrap the original CGPDFContextEndPage function in your bridging header, then call the wrapper function from Swift.

-Joe

> I submitted it via bugreport.apple.com (# 26815976) but is there a better place to report this?
> 
> Also, while the app won't be ready to release until after iOS 10 is released, I would like to start TestFlight beta testing it before that. After doing the conversion, I remembered that you can't submit builds with beta versions of Xcode to the AppStore. Does this also apply to TestFlight betas? I hope not given that Apple is strongly encouraging everyone to convert their code to Swift 3, but I suspect that is the policy.
> 
> Thanks,
> Dave Reed
> 
> 
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users



More information about the swift-users mailing list