evermeer / EVCloudKitDao

Simplified access to Apple's CloudKit
Other
645 stars 65 forks source link

Carthage Support #61

Open mingsai opened 8 years ago

mingsai commented 8 years ago

Hi,

I really want to use this component. I just don't like using Cccoapods. Can this be used via Carthage (preferred)? Or (in the future) SPM when Swift 3.0 is released?

evermeer commented 8 years ago

At the moment there is no support for Carthage and SPM. I don't think it's very difficult to add support for this, but I don't have any experience with it. The only thing you would need is the 6 files from the AppMessage/CloudKit folder plus the pod folder from the EVReflection library (dependency). You could also copy them manually into your project. I will add Carthage and SPM support to my todo list. Any help is welcome.

mingsai commented 8 years ago

Hi,

Medium has a short article on how to add a Carthage Framework with some files from your existing project. The SPM seems a bit tougher as it only works with Swift source files but I did find the instructions for developing an SPM. I can try to walk through the instructions on Medium along with one or two steps they've not fully covered. I found these on the main Carthage page:

Declare the frameworks compatibility by adding the following to the README.md: Carthage compatible

git tag version

Make scheme shared ( Product > Scheme > Edit Scheme )

I can walkthrough the Carthage packaging steps on both libraries and see how it goes.

evermeer commented 7 years ago

Carthage support is added in https://github.com/evermeer/EVReflection/pull/225

jstheoriginal commented 7 years ago

Hey @evermeer I'm trying to add Carthage support to EVCloudKitDao but just hit one final snag.

Because EVReflection now breaks out the CloudKit subspec framework into a new EVReflection_CloudKit.framework file, the imports for EVReflection in EVCloudData.swift and EVCloudKitDao.swift no longer work when I use Carthage to first import its dependencies. The import EVReflection lines need to be changed to EVReflection_CloudKit instead to build. This works for Carthage now, but CocoaPods would break since it doesn't have an EVReflection_CloudKit framework.

Any ideas how to fix this final hiccup?

I'm thinking the only way is to not have separate EVReflection and EVReflection_CloudKit frameworks for Carthage support in EVReflection.

Unless there's a way to rename a framework with CocoaPods so it can be changed from EVReflection to EVReflection_CloudKit?