@crossbind/plugin-react-native-ios-helper 2.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/ios/CrossbindModule.h +4 -0
- package/ios/CrossbindModule.mm +33 -0
- package/package.json +20 -0
- package/react-native-crossbind-ios-helper.podspec +23 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @crossbind/plugin-react-native-ios-helper
|
|
2
|
+
|
|
3
|
+
## 2.0.0-beta.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Aligned on the 2.0.0-beta.50 baseline. No source change; the version exists so every package in
|
|
8
|
+
the workspace names the same release.
|
|
9
|
+
|
|
10
|
+
## 1.0.0
|
|
11
|
+
|
|
12
|
+
### Major Changes
|
|
13
|
+
|
|
14
|
+
- 🚀 first stable release
|
|
15
|
+
|
|
16
|
+
## 1.0.0-beta.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- chore: add initial version of CHANGELOGS files
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Buğra Sarı and crossbind contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @crossbind/plugin-react-native-ios-helper
|
|
2
|
+
**crossbind React Native plugin iOS helper**
|
|
3
|
+
A tool for seamless C++ integration with React Native and Expo.
|
|
4
|
+
|
|
5
|
+
<a href="https://www.npmjs.com/package/@crossbind/plugin-react-native-ios-helper">
|
|
6
|
+
<img alt="NPM version" src="https://img.shields.io/npm/v/@crossbind/plugin-react-native-ios-helper?style=for-the-badge" />
|
|
7
|
+
</a>
|
|
8
|
+
<a href="https://github.com/crossbind/crossbind/blob/main/LICENSE">
|
|
9
|
+
<img alt="License" src="https://img.shields.io/github/license/crossbind/crossbind?style=for-the-badge" />
|
|
10
|
+
</a>
|
|
11
|
+
<a href="https://crossbind.dev/docs/guide/integrate-into-existing-project/react-native">
|
|
12
|
+
<img alt="Docs - React Native" src="https://img.shields.io/badge/Docs_-_React%20Native-20B2AA?style=for-the-badge" />
|
|
13
|
+
</a>
|
|
14
|
+
<a href="https://crossbind.dev/docs/guide/integrate-into-existing-project/expo">
|
|
15
|
+
<img alt="Docs - Expo" src="https://img.shields.io/badge/Docs_-_Expo-20B2AA?style=for-the-badge" />
|
|
16
|
+
</a>
|
|
17
|
+
|
|
18
|
+
## Integration
|
|
19
|
+
To integrate crossbind into your project using React Native or Expo, you can utilize the @crossbind/plugin-react-native-ios-helper plugin. Start by installing these package with the following command:
|
|
20
|
+
|
|
21
|
+
NPM
|
|
22
|
+
```sh
|
|
23
|
+
npm install @crossbind/plugin-react-native-ios-helper --save-dev
|
|
24
|
+
```
|
|
25
|
+
or YARN
|
|
26
|
+
```sh
|
|
27
|
+
yarn add @crossbind/plugin-react-native-ios-helper --dev
|
|
28
|
+
```
|
|
29
|
+
or PNPM
|
|
30
|
+
```sh
|
|
31
|
+
pnpm add @crossbind/plugin-react-native-ios-helper --save-dev
|
|
32
|
+
```
|
|
33
|
+
or BUN
|
|
34
|
+
```sh
|
|
35
|
+
bun add @crossbind/plugin-react-native-ios-helper --dev
|
|
36
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#import "CrossbindModule.h"
|
|
2
|
+
#import <React/RCTLog.h>
|
|
3
|
+
#import <React/RCTBridge+Private.h>
|
|
4
|
+
#import <React/RCTUtils.h>
|
|
5
|
+
#include <jsi/jsi.h>
|
|
6
|
+
|
|
7
|
+
namespace emscripten {
|
|
8
|
+
namespace internal {
|
|
9
|
+
__attribute__((used)) void _embind_initialize_bindings(facebook::jsi::Runtime& rt, std::string path);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
@implementation CrossbindModule
|
|
16
|
+
@synthesize bridge = _bridge;
|
|
17
|
+
|
|
18
|
+
RCT_EXPORT_MODULE(RNJsiLib)
|
|
19
|
+
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(start)
|
|
20
|
+
{
|
|
21
|
+
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge;
|
|
22
|
+
jsi::Runtime* runtime = (jsi::Runtime*)cxxBridge.runtime;
|
|
23
|
+
NSString *mainBundlePath = [[NSBundle mainBundle] bundlePath];
|
|
24
|
+
emscripten::internal::_embind_initialize_bindings(*runtime, std::string([mainBundlePath UTF8String]));
|
|
25
|
+
return @true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (void)setBridge:(RCTBridge *)bridge
|
|
29
|
+
{
|
|
30
|
+
_bridge = bridge;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@crossbind/plugin-react-native-ios-helper",
|
|
3
|
+
"version": "2.0.0-beta.50",
|
|
4
|
+
"description": "crossbind React Native plugin ios helper: A tool for seamless C++ integration with React Native and Expo.",
|
|
5
|
+
"homepage": "https://github.com/crossbind/crossbind/tree/main/plugins/react-native-ios-helper#readme",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/crossbind/crossbind.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"crossbind-plugin",
|
|
13
|
+
"react-native",
|
|
14
|
+
"expo",
|
|
15
|
+
"bind",
|
|
16
|
+
"c++",
|
|
17
|
+
"ios",
|
|
18
|
+
"mobile"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
#folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "react-native-crossbind-ios-helper"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = "crossbind Authors"
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
15
|
+
s.source = { :http => "https://crossbind.dev" }
|
|
16
|
+
s.source_files = "ios/**/*.{h,hpp,c,cpp,m,mm}"
|
|
17
|
+
|
|
18
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
19
|
+
install_modules_dependencies(s)
|
|
20
|
+
else
|
|
21
|
+
s.dependency "React-Core"
|
|
22
|
+
end
|
|
23
|
+
end
|