OP has the problem with Derived Data folder. If someone still gets this error even by cleaning up Derived Data, keep reading
You are getting this error because the framework isn't compiled for i386 architecture(architecture for simulator).
You need to compile two different frameworks. One for the simulator and one for the devices.
However, there is way to create a Universal Framework(which works for both) but you need to do a little work for that.
Here is a link to the tutorial :
https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c
or this :
Xcode 6 iOS Creating a Cocoa Touch Framework - Architectures issues