Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


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!