My project is mixed with Swift and Objective-C. I want to access a swift method from the file that is under "Project 1"(refer to the image) in the Objective-C file that is under "Project 2". Is it possible? If possible, how to access it?
Asked
Active
Viewed 21 times
0
user3310076
- 123
- 12
-
1did you search stackoverflow already? in short, yes its possible and there are a lot answers.. one of them [here](https://stackoverflow.com/questions/24078043/call-swift-function-from-objective-c-class) – Ol Sen Oct 19 '20 at 23:58
-
@OlSen Yes, I did, but all are within one project. – user3310076 Oct 20 '20 at 12:34
-
ha, indeed. For sure a project needs to have access to a module or library to call methods from it. If you think of project1 would be a lib and this lib would be made part of project2 and project3 then it could work. You basically build your own framework to be implemented/linked in different projects – Ol Sen Oct 20 '20 at 16:22