Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Added support for Carthage & Swift Package Manager. Project now supp… #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dcilia
Copy link

@dcilia dcilia commented Jul 31, 2017

  • Added support for Carthage & Swift Package Manager.
  • Project now supports a universal framework called ProgressKit.
  • Added Swift Playground to demo UI elements, removed demo projects
  • Other platforms can now be easily added (scaffolding is there)
  • Updated README.md

I did not modify the Podspec . @kaunteya -> you can merge this PR in, and then modify and push an updated Podspec with a new a tag.

Source files are at:
spec.source_files = 'Sources/*.*

…rts a universal framework called ProgressKit. Added Swift Playground to demo UI elements.
@kaunteya
Copy link
Owner

kaunteya commented Aug 1, 2017

@dcilia Thank you for the pull request. Replacing demo app with playground was really a good idea.
I pulled your code and it is giving me error no such module 'ProgressKit'

Also what version of Swift have you used here?



static var allTests = [
("testExample", testExample),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an artifact of the template test class Xcode makes. This can be deleted.

@dcilia
Copy link
Author

dcilia commented Aug 4, 2017

@kaunteya are you using the ProgressKit.xcworkspace to build and run?

@dcilia
Copy link
Author

dcilia commented Aug 4, 2017

Swift Version 3 in the build settings (using Xcode 8.3.3) - look at SWIFT_VERSION

@kaunteya
Copy link
Owner

kaunteya commented Aug 7, 2017

@dcilia I am trying this on Xcode 8.3.3. I also checked the Swift version. It is Swift 3. It still shows

Playground execution failed: error: Demo-macOS.playground:4:8: error: no such module 'ProgressKit' import ProgressKit ^

screen shot 2017-08-07 at 10 51 44 am

@kaunteya
Copy link
Owner

@dcilia updates?

@dcilia
Copy link
Author

dcilia commented Aug 16, 2017

@kaunteya ---> try building the framework first; choose the destination as Mac or iOS Simulator and build. Then the playground should work.

@dcilia
Copy link
Author

dcilia commented Sep 29, 2017

@kaunteya just checking in, were you able to get it to work?

@kaunteya
Copy link
Owner

kaunteya commented Sep 29, 2017

@dcilia I am trying it on Xcode 9. Frame work build successfully. But play ground was not working

screen shot 2017-09-29 at 9 00 41 pm

Let me know how I can fix this..

@kaunteya
Copy link
Owner

kaunteya commented Oct 3, 2017

@dcilia Updates?

@dcilia
Copy link
Author

dcilia commented Oct 5, 2017

@kaunteya I see from the screenshot you aren't running on the simulator , try building the framework first with the macOS in the destination scheme. Once you start adding progress UI for iOS etc, you can build the framework with the iOS simulator as the destination device.

Are you on slack? email me directly if you want to pair.

@kaunteya
Copy link
Owner

kaunteya commented Oct 5, 2017

@dcilia Its working now.

@kaunteya
Copy link
Owner

kaunteya commented Oct 6, 2017

Hey @dcilia. Can you clarify the reason why the macOS demo app was replaced by Playground.

The crux of ProgressKit is that you can create progress views with few lines of code.
Users are basically expected to create the components of ProgressKit in storyboard/nib files, which the demo app demonstrated very well.

In this PR I see 3 problems

  1. ProgressViews are created using code only. How do we demonstrate their use in storyboard?
  2. Only one view can be viewed at once and viewing other view involves code change.
  3. Playground shows only one variant of each view. In macOS demo app I had created a variations of different size, colors and combinations of every ProgressView.

Let me know your views.

@dcilia
Copy link
Author

dcilia commented Oct 6, 2017

@kaunteya
Sure - given the power of the Playground and ease of use in spinning it up is the primary reason. With demo apps, you have incompatibilities with versions of Xcode, setup provisioning (even to run on the simulator ie: bundleId). I think the Playgrounds encourage exploration with immediate results.

That being said, I understand you want to highlight the fact that its simple to use in a nib / storyboard. My suggestion would be to instead create additional documentation in the form of a guide to highlight all the different great ways you can use this framework. This will allow potential and current users to obtain the relevant information you feel would be helpful.

Your other questions:

  1. You should be able to add a Storyboard/nib to the Resources of the Playground.

  2. I commented out the code paths for different views because Playgrounds automatically run; let the user decide how much they want to run the Playground (you can change this)

  3. I didn't even know you did that - I looked at those GIF files on the readme, maybe thats a better approach to highlighting? If you want to share techniques or how you did something, I would suggest to add it as documentation in the form of a tutorial/guide.

Cheers 👍

@kaunteya
Copy link
Owner

kaunteya commented Oct 10, 2017

@dcilia
I see the trade offs as

Mac app + Story board approach

  1. Demo is very close to how the SDK would actually be used.
  2. Changing the bundle ID to run the app takes not more than 10 seconds. So that does not count as an over head

Playground

  1. Readily works.
  2. Demonstration is in the form of code.(Not visual as the way it happens in XIB)

Both methods have their ups and downs.

So considering the use case of ProgressKit. Its reason of existence is that you can straight away drag a view and by just manipulating some IBOutlets you can have a smooth animated progress views.

Dont you think we should demonstrate in way how it is expected to be used by people. I mean that is the whole purpose of having a demo app.

So there would be 2 types of users.

  1. Quickly view the readme and determine what type of progressview is required by quickly glancing at the gif in README. They would straight away drag a view in storyboard and bind a outlet and they are done.

  2. Look at the readme. Integrate the SDK. Now they are not sure how to properly integrate it. Then they clone the SDK and see if there is a demo of how it is being used.

Conclusion
The readme and playground are not of much difference. They give an abstract understanding of the SDK. Every info that playground gives is already there in the README. But the person who clones the SDK is expecting a much detailed information, which I think Demo app is better at.

On top of that creating a separate documentation would be an overhead.

Let me know your views..

@dcilia
Copy link
Author

dcilia commented Oct 10, 2017

All valid tradeoffs, as the creator of this project its your vision 👍. My understanding is that you have reservations around the use of the demo app / playground, which I leave to your decision whether to merge. (I would not be offended if you want to just close this pull request 👍 ). Cheers

@sindresorhus
Copy link

Any chance the Carthage and SPM support could be added without the other opinionated changes?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants