Coder Social home page Coder Social logo

linekit's Introduction

LineKit

Build Status

Share to Naver Line from your apps.

LineKit now support sharing text, and images friends, and groups. Sharing to timeline is also supported.

Also, an UIActivity subclass is also provided for use with UIActivityController.

Currently, LineKit supports Line version > 2.0, and should works on iOS > 4.0 with ARC-enabled.

Usage

LineKit provides a helper method to check if Line is installed on current device.

if (![Line isLineInstalled]) {
  // Prompt error
}

To share text to Line, you can simply call:

[Line shareText:@"Hello Line!"];

To share image to Line, you can call:

[Line shareImage:[UIImage named:@"avatar.png"]];

To add friend or official account, use:

[Line addFriend:@"hPtAUZX6w5"];

To show shop detail (usually stickers), try:

[Line showShopDetail:@"2"];

You can redirect user to App Store to download Line app via:

[Line openLineInAppStore];

UIActivity

To use LineKit with UIActivityViewController is simple and recommended:

UIActivityViewController *controller = 
  [[UIActivityViewController alloc] initWithActivityItems:items
                                    applicationActivities:@[[[LKLineActivity alloc] init]]];

iOS 7

Due to iOS 7 limitation, custom UIPasteboard objects couldn't be shared across apps without the same namespace (i.e. jp.naver.*)

So for iOS 7, general UIPasteboard object is used for image sharing. Be careful that users might lose paste data.

Sample Project

The Xcode project under LKExample folder is a sample app to demonstrate the usages of LineKit.

Installation

We recommend you to install via CocoaPods. However, if you want to install manually, you can follow the instructions below.

  1. Download the latest codes from GitHub
  2. Add LineKit folder to your Xcode project.

Thanks

Thanks @bcylin for some part of codes for LKLineActivity.

Thanks @trisix for LKLineActivity images.

License

LineKit is available under the MIT license.

Copyright (C) 2014 Richard Lee

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

linekit's People

Contributors

bcylin avatar dlackty avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.