As the iSpeechSDK is written for Objective-C, I tried to import it in my existing iOS project using a bridging-header. I've copied all the associated headers and frameworks. However, I'm still unable to call the Objective-C class. See the attached screenshot. Let me know how I can resolve this issue.
Asked
Active
Viewed 170 times
2 Answers
1
I finally got it to work by following Renan Kosicki's answer in https://stackoverflow.com/a/24293717/4275096. My header file wasn't created at the correct location.
0
This was actually an error as a result of a circular reference. You should have to import a class in your view controller , and that classes header file was importing the swift header
In your viewcontrollor.swift :
import iSpeechSDk
import .... // Add your class
Hope this helps !!

Mayank Patel
- 3,868
- 10
- 36
- 59
-
iSpeechSDK is in Objective-C. I'm unable to import it in this manner. It says "No such module 'iSpeechSDK'". – mechdon Jan 09 '16 at 12:56
-
In which class you want to import your objejective c class ? – Mayank Patel Jan 09 '16 at 12:56
-
Yes, I'm importing this into my Swift project via a bridging-header – mechdon Jan 09 '16 at 12:57
-
What you have to do is goto your view controller in swift you can add this in your swift class.. you don't have to add this in objective c class – Mayank Patel Jan 09 '16 at 12:58
-
As mentioned, I tried but it doesn't recognise the module 'iSpeechSDK'. I assume I may not have imported it properly using the bridging-header. – mechdon Jan 09 '16 at 13:04
-
First clarify one thing where you want to use iSpeechSDK ? – Mayank Patel Jan 09 '16 at 13:04
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/100232/discussion-between-mayank-patel-and-mechdon). – Mayank Patel Jan 09 '16 at 13:05