Sharing code between original iOS App and App Extension

ios, ios-app-extension, ios8-extension, xcode

Solution

Nothing should be copied. Just add required files to compile sources for your extension:

Problem

Sharing class between iOS app and extension app I want to use a custom class in both my app and the extension app. If I just have the class in the main app folder, the extension doesn't pick up on it. I tried making a copy of it and putting it into the extension folder, but I of course get a `invalid redeclaration of [my class]` error. What's the best solution for this? It's just one class, not multiple resources.

Original source

Related problems