Cupid 1.0.7

Cupid 1.0.7

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2016
SPMSupports SPM

Maintained by Shannon Wu.



Cupid 1.0.7

  • By
  • Shannon Wu

Cupid

Just like openshare and MonkeyKing, Cupid helps you post messages or do OAuth to Social Networks. And more service providers is on the schedule. In fact, the network interface is the same as MonkeyKing. So why a new share SDK?

  1. This library is coming with much more extensibility.
  2. Most apps have their own network interface, so it is not necessary to maintain another network service instance.
  3. You don’t need to register at the app launch methods; I think that is a waste of memory, many people never share anything.
  4. This library used many structs to construct the information channel, and use enums to construct information payload! No more singletons to reside in memory!
  5. Protocols to extend custom functionality.

You can check this article in Chinese to learn more about share architecture in our coming new version client.

Not like demo of many library, this library’s demo’s logic is very similar to our architecture in our in programming new version client. The MainViewController is just like share sheet, though our client is coming with a much more beautiful interface. The ShareManager is our central hub for communication between the library and our app logic. The NotificationManager is used for notification. So this demo does not show all the functionality of this library

If you want to share to Alipay, you must configure the app id and the bundle id to match your register to Alipay. If you have any questions, feel free to contact me or open an issue.

Features

  1. [x] Share content to QQ, WeChat, Weibo, Pocket, Paste board, Alipay.
  2. [x] OAuth to QQ(support web OAuth), WeChat, Weibo(Support web OAuth), Pocket(Support web OAuth).
  3. [x] Subclass ShareActivity to create custom share UIActivity.
  4. [x] Create your own service provider to offer more functionality.
  5. [x] Optionally use your own network framework to do OAuth and share.
  6. [ ] Code refactoring to make the web OAuth interface more customizable.
  7. [ ] Code refactoring to make this library more elegant.

A quick peek of the demo, but just with the interface screenshot. Download it to try!

screenshot

Requirements

Swift 2.0+, iOS 8.0+

Installation

It’s recommended to use CocoaPods or Carthage.

Usage

You can check the Cupid Demo to learn its usage, and also I recommend you to read this article to learn how we integrate this library into our own production code base.

Contact

Shannon Wu

Twitter: @inatu_

Weibo: inatu

E-mail: [email protected]

Credits

Great thanks to the creators and contributors of MonkeyKing, many methods are directly from it.

License

Cupid is available under the MIT License license. See the LICENSE file for more info.