Skip to content

Commit

Permalink
Merge pull request bang590#4 from lexrus/feature/CocoaPods
Browse files Browse the repository at this point in the history
Add CocoaPods support.
  • Loading branch information
bang590 committed May 26, 2015
2 parents 382dadc + 72ef5ff commit 6361c82
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
33 changes: 33 additions & 0 deletions JSPatch.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Pod::Spec.new do |s|
s.name = "JSPatch"
s.version = "0.0.1"
s.summary = "JSPatch bridge Objective-C and JavaScript using the" \
" Objective-C runtime. You can call any Objective-C class" \
" and method in JavaScript by just including a small engine."

s.description = <<-DESC
JSPatch bridge Objective-C and JavaScript using the
Objective-C runtime. You can call any Objective-C class and
method in JavaScript by just including a small engine.
That makes the APP obtain the power of script language:
add modules or replacing Objective-C codes to
fix bugs dynamically.
JSPatch is still in development,
welcome to improve the project together.
DESC

s.homepage = "https://github.com/bang590/JSPatch"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "bang" => "[email protected]" }
s.social_media_url = "http://twitter.com/bang590"

s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/bang590/JSPatch.git", :tag => s.version }

s.source_files = "JSPath/*.{h,m}"
s.public_header_files = "JSPath/*..h"

s.resources = "JSPath/*.js"
s.frameworks = "JavaScriptCore", "Foundation"

end
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# JSPatch
[![Travis](https://img.shields.io/travis/bang590/JSPatch.svg)](https://github.com/bang590/JSPatch)
![CocoaPods Version](https://img.shields.io/cocoapods/v/JSPatch.svg?style=flat)
[![License](https://img.shields.io/github/license/bang590/JSPatch.svg?style=flat)](https://github.com/bang590/JSPatch/blob/master/LICENSE)

JSPatch bridge Objective-C and JavaScript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. That makes the APP obtain the power of script language: add modules or replacing Objective-C codes to fix bugs dynamically.
Expand Down Expand Up @@ -53,8 +54,21 @@ defineClass('AppDelegate', {

## Installation

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like JSPatch in your projects. See the ["Getting Started" guide for more information](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking).

```ruby
# Your Podfile
platform :ios, '7.0'
pod 'JSPatch', '~> 0.0.1'
```

### Manually

Copy `JSEngine.m` `JSEngine.h` `JSPatch.js` in `JSPatch/` to your project.


## Usage

### Objective-C
Expand Down

0 comments on commit 6361c82

Please sign in to comment.