First, all code has to be in the same swift version. That being said, one way you could solve the problem is by sticking to Swift 2.3 and then setting your Extension Target's Use Legacy Swift Language Version to "Yes".
You can find that option while Xcode 8 is open as follows:
- Select your (container) app project root in the Project Navigator (on the left-hand side)
- On the right-hand side, select your extension under the TARGETS section
- Once the extension is selected, click on the Build Settings tab
- Scroll down and find Use Legacy Swift Language Version and set it to Yes
- You can now build the project