I've googled about 2-3 hours and tried out several things but I'm not able to get this working:
What I like to achieve
The goal is to split UI code and business logic. The business logic should be capusled in a seperate framework. A Cocooa Touch Framework. So the business logic can be reused in a WatchKit App for example.
How I tried to do that
- Create a new Xcode Project -> Choose Single View Application.
- Add a new Target -> Choose Cocoa Touch Framework.
- Run pod init.
- Add some pods in the Podfile for each target.
- Run pod install.
- Implement some code in the UI and Framework
This runs perfectly on the simulator. As soon I will run it on the device the following error appears in the debugger:
dyld: Library not loaded: @rpath/SwiftAddressBook.framework/SwiftAddressBook Referenced from: /private/var/mobile/Containers/Bundle/Application/48E58889-78D4-4D71-B8DA-154ADEB98894/Pod Error Framework.app/Frameworks/PodErrorKit.framework/PodErrorKit Reason: image not found
I do not know how to solve that. Any suggestions?
I'm using:
- cocoapods 0.38.2
- Xcode 6.4 (6E35b)
- Deployment Target iOS 8
I've uploaded the Project (just a fake project, but the same error) to github. You can view it here.
Xcode 6.4
, nothing to do with Swift 2.0 – Kink