Skip to content

Commit

Permalink
release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
snowinszu committed Sep 30, 2024
1 parent a76b902 commit 9fd9f8f
Show file tree
Hide file tree
Showing 29 changed files with 16,356 additions and 65 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: inactivity
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ lib/
# React Native Codegen
ios/generated
android/generated

# jar nad aar
android/libs/*
57 changes: 57 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Built application files
android/*/build/

# Local configuration file (sdk path, etc)
android/local.properties

# Gradle generated files
android/.gradle/

# Signing files
android/.signing/

# User-specific configurations
android/.idea/gradle.xml
android/.idea/libraries/
android/.idea/workspace.xml
android/.idea/tasks.xml
android/.idea/.name
android/.idea/compiler.xml
android/.idea/copyright/profiles_settings.xml
android/.idea/encodings.xml
android/.idea/misc.xml
android/.idea/modules.xml
android/.idea/scopes/scope_settings.xml
android/.idea/vcs.xml
android/*.iml

# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
ios/Pods
ios/build
*project.xcworkspace*
*xcuserdata*

# OS-specific files
.DS_Store
.DS_Store?
._*

android/gradlew
android/build
android/gradlew.bat
android/gradle/

.idea
yarn.lock
.husky
.github
.vscode
.nyc_output
android/.settings
.eslintignore
example/
57 changes: 44 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,59 @@
# react-native-swarmcloud

Official React Native bindings for SwarmCloud's P2P SDKs.
<h1 align="center"><a href="" target="_blank" rel="noopener noreferrer"><img width="250" src="https://www.cdnbye.com/img/logo.png" alt="logo"></a></h1>
<h4 align="center">Official React Native bindings for SwarmCloud's P2P SDKs.</h4>
[![npm](https://img.shields.io/npm/v/react-native-swarmcloud.svg)](https://www.npmjs.com/package/react-native-swarmcloud)
[![npm](https://img.shields.io/npm/l/react-native-swarmcloud.svg)](LICENSE)

## Installation

```sh
npm install react-native-swarmcloud
### Installing (React Native >= 0.60.0)

Install `react-native-swarmcloud`:

```shell script
yarn add react-native-swarmcloud
```

or

```shell script
npm i --save react-native-swarmcloud
```

Go to your **ios** folder and run:

```shell script
pod install
```

## Usage
See [documentation](https://www.swarmcloud.net/rn)

## Request Token
See [here](https://docs.swarmcloud.net/guides/getting-started#for-mobile-app-integration)

```js
import { multiply } from 'react-native-swarmcloud';
## Dashboard
Register your AppId at https://dash.swarmcloud.net, where you can view p2p-related information.

// ...
## Issue & Feature Request
- If you found a bug, open an issue.
- If you have a feature request, open an issue.

const result = await multiply(3, 7);
```
## Related Projects
- [hlsjs-p2p-engine](https://github.com/cdnbye/hlsjs-p2p-engine) - Web Video Delivery Technology with No Plugins.
- [ios-p2p-engine](https://github.com/cdnbye/ios-p2p-engine) - iOS Video P2P Engine for Any Player.
- [android-p2p-engine](https://github.com/cdnbye/android-p2p-engine) - iOS Video P2P Engine for Any Player.
- [flutter-p2p-engine](https://github.com/cdnbye/flutter-p2p-engine) - Official Flutter bindings for SwarmCloud's P2P SDKs.

## FAQ
We have collected some [frequently asked questions](https://www.swarmcloud.net/faq). Before reporting an issue, please search if the FAQ has the answer to your problem.

## Contact Us
Email:[email protected]
<br>
Telegram: @cdnbye
<br>
Skype: live:86755838

## Contributing

Expand All @@ -27,7 +62,3 @@ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the
## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
5 changes: 5 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'])
// implementation(name: 'datachannel', ext: 'aar')
implementation("com.squareup.okhttp3:okhttp:3.12.13")
implementation("com.orhanobut:logger:2.2.0")
implementation("com.google.code.gson:gson:2.9.0")
}

if (isNewArchitectureEnabled()) {
Expand Down
7 changes: 7 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.swarmcloud">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

</manifest>
5 changes: 5 additions & 0 deletions android/src/main/AndroidManifestNew.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
</manifest>
Loading

0 comments on commit 9fd9f8f

Please sign in to comment.