Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Rob Inman
Rob Inman
4,516 Points

Using an SDK written in Objective-C with Swift apps

Hello, I am currently going through Pasan's Swift and iOS courses. Mobile app development is an entirely new world for me so there is a lot to take in.

One of the things I've come across is an SDK that is written in Objective-C. I'm wanting to use this SDK as part of my app for learning/demo purposes. The SDK's documentation says that it can work in Swift-based apps without problem. Googling around, it definitely appears that when using Xcode, the two languages play nicely together. Unfortunately, I just don't know where to begin. The SDK's documentation doesn't explain how to use it within Swift-based apps.

What is the process of using Objective-C .m and .h files within Swift? Are there any big gotchas I need to be aware of? Any good resources to look at?

Thank you!