I am making an app in swift
, but I had to use a library that is only in objective-c
, so I had to create a file .h
and another file.m
The problem is that from the file .m
I have to call a function AppDelegate
that is in swift
but I don't know how to call it, because it tells me that AppDelegate
it is not declared.
How can I do it??
Indeed I have not done the test, but according to the documentation it is possible that both codes coexist in the same project.
I leave you the Apple documentation: https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
Greetings.
There is a header that is generated automatically when you compile.
ModuleName depends on the name of your project. If your project is called TestProyect, then it will be TestProyect-Swift.h