Skip to content

Commit dc7bc84

Browse files
committed
react-native
1 parent f072671 commit dc7bc84

File tree

23 files changed

+6133
-20
lines changed

23 files changed

+6133
-20
lines changed

bindings/lni_nodejs/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
export interface Ip {
77
origin: string
88
}
9-
export declare function sayHello(): string
109
export declare class Fetcher {
1110
constructor()
1211
getIpAddress(): Promise<Ip>

bindings/lni_nodejs/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ if (!nativeBinding) {
310310
throw new Error(`Failed to load native binding`)
311311
}
312312

313-
const { Fetcher, sayHello } = nativeBinding
313+
const { Fetcher } = nativeBinding
314314

315315
module.exports.Fetcher = Fetcher
316-
module.exports.sayHello = sayHello

bindings/lni_nodejs/main.mjs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import { sayHello, Fetcher } from './index.js'
1+
import { Fetcher } from './index.js'
22

3-
console.log('From native', sayHello())
4-
53
const fetcher = new Fetcher()
6-
fetcher.getIpAddress().then((res) => {
7-
console.log('From native', res.origin)
8-
})
4+
const ip = await fetcher.getIpAddress()
5+
console.log('Your IP address is', ip.origin)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>liblni_uniffi.a</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>liblni_uniffi.a</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
22+
</dict>
23+
<dict>
24+
<key>BinaryPath</key>
25+
<string>liblni_uniffi.a</string>
26+
<key>LibraryIdentifier</key>
27+
<string>ios-arm64</string>
28+
<key>LibraryPath</key>
29+
<string>liblni_uniffi.a</string>
30+
<key>SupportedArchitectures</key>
31+
<array>
32+
<string>arm64</string>
33+
</array>
34+
<key>SupportedPlatform</key>
35+
<string>ios</string>
36+
</dict>
37+
</array>
38+
<key>CFBundlePackageType</key>
39+
<string>XFWK</string>
40+
<key>XCFrameworkFormatVersion</key>
41+
<string>1.0</string>
42+
</dict>
43+
</plist>

0 commit comments

Comments
 (0)