> On Jun 17, 2016, at 12:28 PM, Joe Groff <jgr...@apple.com> wrote:
> 
> 
>> On Jun 16, 2016, at 1:49 PM, Dave Reed via swift-users 
>> <swift-users@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’ve never mixed Objective-C/C and Swift in the same project but I think I find 
some documentation online for doing this. Unfortunately, my call to endPage is 
in a framework and it appears frameworks cannot use bridging headers (got the 
error "using bridging headers with framework targets is unsupported”).

I guess I’ll have to wait for this to be fixed before I can use that part of 
the app again. Not a major crisis since I’m still a few months away from it 
being done (which is why I made the change to Swift 3 now). Hopefully it will 
get fixed reasonably soon since I suspect it’s some sort of minor typo.

Thanks,
Dave

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to