Reputation: 6781
I wrote a Swift framework that contains all of my model objects and networking layer. For example, my framework contains a Restaurant
type:
struct Restaurant {
let name: String
}
When the simulator is selected, everything compiles and runs fine.
When the physical device is selected, I get compile time errors. All the code I'm referencing in my custom framework cannot be recognized. This only happens if I try to build / run on my physical device; Everything will compile and run with no problems if I switch back to the simulator.
I tried to clean out my derived data, clean my project, and build/run my project. So far, it hasn't been working. Any advice / suggestions appreciated.
Update: I am also using Cocoapods
Upvotes: 0
Views: 154
Reputation: 3133
The iOS Simulator and real devices runs on different architecture. You have to build a universal framework that uses both architectures. You can read about how to do it here http://arsenkin.com/ios-universal-framework.html
Upvotes: 2