I’ve got a bit of a foggy head this morning so perhaps I’m just not thinking 
clearly. We are moving our code from Obj-C to swift. All new code is in Swift. 
We are hitting an issue with a circular import however.

So here is an example:

App Delegate is still in ObjC, but all new code is written in an extension in 
Swift. The goal is to move more and more code into Swift and eventually turn it 
around where the app delegate is a Swift class with an objective C extension.

The App Delegate.swift refers to classes that are written in Objective C - our 
main View Controllers.
We are writing a new super class for our main view controllers in Swift, but 
the view controllers themselves are still ObjC (for now). 

So you have a Swift extension, calling an objective C subclass of a swift super 
class.

Hopefully you see the problem: Swift has to compile first to generate its 
-Swift.h file, but it can’t compile since the header for the main view 
controllers refer to a Swift super class (so no forward declarations), and the 
main view controller headers don’t work until the -Swift file is generated.

So I’m curious if anyone else has had to hit that scenario and what was your 
solution (besides rewriting everything into Swift…which is kind of what I’ve 
been doing, but now I’ve hit large classes I’m not into that yet).


Also, how do I change my email address for this list without 
unsubscribing/resubscribing - or is that the only way?



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to