You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I ran into unsurmountable issues getting the framework running where a name clash happens with any class within the module when importing as a framework (ie: Cocoapods). For example, we have an Event class (since our domain models everyday events) and Swift gets tripped up on being able to specify that an event is an Observable.Event as opposed to your own Event.
The reason for this is that both the module is called Observable as well as a framework class exists called Observable. This is apparently an anti-practice in Swift to have the module use the same name as any of its existing classes. Event typealiasing gets tripped up by this (ie: ""typealias ObservableEvent = Observables.Event"")
PROPOSAL: Rename the framework to "Observables" (or something similar). Unfortunately I think this is the only way out of this (without renaming the Observable class itself)
I have made all the changes required on the fork here: #21. Would appreciate you accepting this and renaming the project (Cocoapod will likely require a new pod, GitHub has a rename option at the top of the project Settings page). I know it's not the nicest thing to rename the project but you really want people to be able to integrate your project seamlessly using Cocoapods etc and not just copying the files in, and it'll solve any problems like this going forward. So hopefully someone else doesn't waste a full day chasing this down as I did. :)
Cheers!
The text was updated successfully, but these errors were encountered:
Hi there, I ran into unsurmountable issues getting the framework running where a name clash happens with any class within the module when importing as a framework (ie: Cocoapods). For example, we have an Event class (since our domain models everyday events) and Swift gets tripped up on being able to specify that an event is an Observable.Event as opposed to your own Event.
The reason for this is that both the module is called Observable as well as a framework class exists called Observable. This is apparently an anti-practice in Swift to have the module use the same name as any of its existing classes. Event typealiasing gets tripped up by this (ie: ""typealias ObservableEvent = Observables.Event"")
PROPOSAL: Rename the framework to "Observables" (or something similar). Unfortunately I think this is the only way out of this (without renaming the Observable class itself)
I have made all the changes required on the fork here: #21. Would appreciate you accepting this and renaming the project (Cocoapod will likely require a new pod, GitHub has a rename option at the top of the project Settings page). I know it's not the nicest thing to rename the project but you really want people to be able to integrate your project seamlessly using Cocoapods etc and not just copying the files in, and it'll solve any problems like this going forward. So hopefully someone else doesn't waste a full day chasing this down as I did. :)
Cheers!
The text was updated successfully, but these errors were encountered: