Skip to content

Commit

Permalink
Intial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rf1804 committed Sep 11, 2018
0 parents commit c5f4a75
Show file tree
Hide file tree
Showing 11 changed files with 464 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log


# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Mohamad Arif Raja

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.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# react-native-wescan

## Getting started

`$ npm install react-native-wescan --save`

### Mostly automatic installation

`$ react-native link react-native-wescan`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
2. Go to `node_modules``react-native-wescan` and add `RNWescan.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNWescan.a` to your project's `Build Phases``Link Binary With Libraries`
4. Run your project (`Cmd+R`)<


## Usage
```javascript
import RNWescan from 'react-native-wescan';

// TODO: What to do with the module?
RNWescan;
```

26 changes: 26 additions & 0 deletions RNWescan.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "RNWescan"
s.version = package["version"]
s.summary = package["description"]
s.description = <<-DESC
RNWescan
DESC
s.homepage = "https://github.com/author/RNWescan"
s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
s.author = { "author" => "author@domain.cn" }
s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/author/RNWescan.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m}"
s.requires_arc = true

s.dependency "React"
#s.dependency "others"
end


6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

import { NativeModules } from 'react-native';

const { RNWescan } = NativeModules;

export default RNWescan;
11 changes: 11 additions & 0 deletions ios/RNWescan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif

@interface RNWescan : NSObject <RCTBridgeModule>

@end

13 changes: 13 additions & 0 deletions ios/RNWescan.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

#import "RNWescan.h"

@implementation RNWescan

- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();
}
RCT_EXPORT_MODULE()

@end

Loading

0 comments on commit c5f4a75

Please sign in to comment.