react-native-candle 0.1.0
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/README.md +188 -0
- package/ReactNativeCandle.podspec +45 -0
- package/app.plugin.js +1 -0
- package/ios/Sources/CandleLinkSheetWrapperView.swift +53 -0
- package/ios/Sources/CandleLinkViewModel.swift +67 -0
- package/ios/Sources/HostingViewController.swift +56 -0
- package/ios/Sources/RNCandle.swift +155 -0
- package/ios/Sources/UIApplication++.swift +14 -0
- package/lib/commonjs/index.js +49 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/specs/RNCandle.nitro.js +6 -0
- package/lib/commonjs/specs/RNCandle.nitro.js.map +1 -0
- package/lib/module/index.js +38 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/specs/RNCandle.nitro.js +4 -0
- package/lib/module/specs/RNCandle.nitro.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +22 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +21 -0
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/index.d.ts +22 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +21 -0
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/ios/ReactNativeCandle+autolinking.rb +60 -0
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +56 -0
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +173 -0
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +58 -0
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.mm +33 -0
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.swift +30 -0
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +139 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +263 -0
- package/nitrogen/generated/ios/swift/PresentationBackground.swift +40 -0
- package/nitrogen/generated/ios/swift/PresentationStyle.swift +40 -0
- package/nitrogen/generated/ios/swift/Service.swift +56 -0
- package/nitrogen/generated/ios/swift/ToolCall.swift +46 -0
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/PresentationBackground.hpp +78 -0
- package/nitrogen/generated/shared/c++/PresentationStyle.hpp +78 -0
- package/nitrogen/generated/shared/c++/Service.hpp +94 -0
- package/nitrogen/generated/shared/c++/ToolCall.hpp +73 -0
- package/package.json +111 -0
- package/plugin/withIosDeploymentTarget.js +46 -0
- package/src/index.ts +73 -0
- package/src/specs/RNCandle.nitro.ts +39 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/RNCandle.nitro.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PresentationBackground, PresentationStyle, Service } from "./specs/RNCandle.nitro";
|
|
2
|
+
export declare function presentCandleLinkSheet({ service, cornerRadius, customerName, showSandbox, showDynamicLoading, presentationBackground, presentationStyle, onSuccess, }: {
|
|
3
|
+
service?: Service;
|
|
4
|
+
cornerRadius?: number;
|
|
5
|
+
customerName?: string;
|
|
6
|
+
showSandbox?: boolean;
|
|
7
|
+
showDynamicLoading?: boolean;
|
|
8
|
+
presentationBackground?: PresentationBackground;
|
|
9
|
+
presentationStyle?: PresentationStyle;
|
|
10
|
+
onSuccess: (account: string) => void;
|
|
11
|
+
}): void;
|
|
12
|
+
export declare function unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
13
|
+
export declare function getLinkedAccounts(): Promise<string>;
|
|
14
|
+
export declare function getFiatAccounts(): Promise<string>;
|
|
15
|
+
export declare function getActivity(span?: string): Promise<string>;
|
|
16
|
+
export declare function deleteUser(): Promise<void>;
|
|
17
|
+
export declare function getAvailableTools(): Promise<string>;
|
|
18
|
+
export declare function executeTool(tool: {
|
|
19
|
+
name: string;
|
|
20
|
+
arguments: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAEjB,OAAO,EACR,MAAM,wBAAwB,CAAC;AAKhC,wBAAgB,sBAAsB,CAAC,EACrC,OAAmB,EACnB,YAAiB,EACjB,YAAY,EACZ,WAAmB,EACnB,kBAAyB,EACzB,sBAAkC,EAClC,iBAA2B,EAC3B,SAAS,GACV,EAAE;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAYP;AAED,wBAAsB,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAEvD;AAED,wBAAsB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhE;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAEhD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAElB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HybridObject } from "react-native-nitro-modules";
|
|
2
|
+
export type Service = "robinhood" | "cash_app" | "venmo" | "apple" | "demo" | "default";
|
|
3
|
+
export type PresentationBackground = "default" | "blur";
|
|
4
|
+
export type PresentationStyle = "sheet" | "fullScreen";
|
|
5
|
+
export type ToolCall = {
|
|
6
|
+
name: string;
|
|
7
|
+
arguments: string;
|
|
8
|
+
};
|
|
9
|
+
export interface RNCandle extends HybridObject<{
|
|
10
|
+
ios: "swift";
|
|
11
|
+
}> {
|
|
12
|
+
candleLinkSheet(isPresented: boolean, service: Service, cornerRadius: number, customerName: string | undefined, showSandbox: boolean, showDynamicLoading: boolean, presentationBackground: PresentationBackground, presentationStyle: PresentationStyle, onSuccess: (account: string) => void): void;
|
|
13
|
+
getLinkedAccounts(): Promise<string>;
|
|
14
|
+
unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
15
|
+
getFiatAccounts(): Promise<string>;
|
|
16
|
+
getActivity(span: string | undefined): Promise<string>;
|
|
17
|
+
deleteUser(): Promise<void>;
|
|
18
|
+
getAvailableTools(): Promise<string>;
|
|
19
|
+
executeTool(tool: ToolCall): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=RNCandle.nitro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNCandle.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/RNCandle.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,OAAO,GACf,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,YAAY,CAAC;AAEvD,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,QAAS,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;IAC9D,eAAe,CACb,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,OAAO,EAC3B,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACnC,IAAI,CAAC;IACR,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PresentationBackground, PresentationStyle, Service } from "./specs/RNCandle.nitro";
|
|
2
|
+
export declare function presentCandleLinkSheet({ service, cornerRadius, customerName, showSandbox, showDynamicLoading, presentationBackground, presentationStyle, onSuccess, }: {
|
|
3
|
+
service?: Service;
|
|
4
|
+
cornerRadius?: number;
|
|
5
|
+
customerName?: string;
|
|
6
|
+
showSandbox?: boolean;
|
|
7
|
+
showDynamicLoading?: boolean;
|
|
8
|
+
presentationBackground?: PresentationBackground;
|
|
9
|
+
presentationStyle?: PresentationStyle;
|
|
10
|
+
onSuccess: (account: string) => void;
|
|
11
|
+
}): void;
|
|
12
|
+
export declare function unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
13
|
+
export declare function getLinkedAccounts(): Promise<string>;
|
|
14
|
+
export declare function getFiatAccounts(): Promise<string>;
|
|
15
|
+
export declare function getActivity(span?: string): Promise<string>;
|
|
16
|
+
export declare function deleteUser(): Promise<void>;
|
|
17
|
+
export declare function getAvailableTools(): Promise<string>;
|
|
18
|
+
export declare function executeTool(tool: {
|
|
19
|
+
name: string;
|
|
20
|
+
arguments: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAEjB,OAAO,EACR,MAAM,wBAAwB,CAAC;AAKhC,wBAAgB,sBAAsB,CAAC,EACrC,OAAmB,EACnB,YAAiB,EACjB,YAAY,EACZ,WAAmB,EACnB,kBAAyB,EACzB,sBAAkC,EAClC,iBAA2B,EAC3B,SAAS,GACV,EAAE;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAYP;AAED,wBAAsB,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAEvD;AAED,wBAAsB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhE;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAEhD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAElB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HybridObject } from "react-native-nitro-modules";
|
|
2
|
+
export type Service = "robinhood" | "cash_app" | "venmo" | "apple" | "demo" | "default";
|
|
3
|
+
export type PresentationBackground = "default" | "blur";
|
|
4
|
+
export type PresentationStyle = "sheet" | "fullScreen";
|
|
5
|
+
export type ToolCall = {
|
|
6
|
+
name: string;
|
|
7
|
+
arguments: string;
|
|
8
|
+
};
|
|
9
|
+
export interface RNCandle extends HybridObject<{
|
|
10
|
+
ios: "swift";
|
|
11
|
+
}> {
|
|
12
|
+
candleLinkSheet(isPresented: boolean, service: Service, cornerRadius: number, customerName: string | undefined, showSandbox: boolean, showDynamicLoading: boolean, presentationBackground: PresentationBackground, presentationStyle: PresentationStyle, onSuccess: (account: string) => void): void;
|
|
13
|
+
getLinkedAccounts(): Promise<string>;
|
|
14
|
+
unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
15
|
+
getFiatAccounts(): Promise<string>;
|
|
16
|
+
getActivity(span: string | undefined): Promise<string>;
|
|
17
|
+
deleteUser(): Promise<void>;
|
|
18
|
+
getAvailableTools(): Promise<string>;
|
|
19
|
+
executeTool(tool: ToolCall): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=RNCandle.nitro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNCandle.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/RNCandle.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,OAAO,GACf,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,YAAY,CAAC;AAEvD,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,QAAS,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;IAC9D,eAAe,CACb,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,OAAO,EAC3B,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACnC,IAAI,CAAC;IACR,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* linguist-generated
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#
|
|
2
|
+
# ReactNativeCandle+autolinking.rb
|
|
3
|
+
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
# https://github.com/mrousavy/nitro
|
|
5
|
+
# Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
# This is a Ruby script that adds all files generated by Nitrogen
|
|
9
|
+
# to the given podspec.
|
|
10
|
+
#
|
|
11
|
+
# To use it, add this to your .podspec:
|
|
12
|
+
# ```ruby
|
|
13
|
+
# Pod::Spec.new do |spec|
|
|
14
|
+
# # ...
|
|
15
|
+
#
|
|
16
|
+
# # Add all files generated by Nitrogen
|
|
17
|
+
# load 'nitrogen/generated/ios/ReactNativeCandle+autolinking.rb'
|
|
18
|
+
# add_nitrogen_files(spec)
|
|
19
|
+
# end
|
|
20
|
+
# ```
|
|
21
|
+
|
|
22
|
+
def add_nitrogen_files(spec)
|
|
23
|
+
Pod::UI.puts "[NitroModules] 🔥 ReactNativeCandle is boosted by nitro!"
|
|
24
|
+
|
|
25
|
+
spec.dependency "NitroModules"
|
|
26
|
+
|
|
27
|
+
current_source_files = Array(spec.attributes_hash['source_files'])
|
|
28
|
+
spec.source_files = current_source_files + [
|
|
29
|
+
# Generated cross-platform specs
|
|
30
|
+
"nitrogen/generated/shared/**/*.{h,hpp,c,cpp,swift}",
|
|
31
|
+
# Generated bridges for the cross-platform specs
|
|
32
|
+
"nitrogen/generated/ios/**/*.{h,hpp,c,cpp,mm,swift}",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
current_public_header_files = Array(spec.attributes_hash['public_header_files'])
|
|
36
|
+
spec.public_header_files = current_public_header_files + [
|
|
37
|
+
# Generated specs
|
|
38
|
+
"nitrogen/generated/shared/**/*.{h,hpp}",
|
|
39
|
+
# Swift to C++ bridging helpers
|
|
40
|
+
"nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp"
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
current_private_header_files = Array(spec.attributes_hash['private_header_files'])
|
|
44
|
+
spec.private_header_files = current_private_header_files + [
|
|
45
|
+
# iOS specific specs
|
|
46
|
+
"nitrogen/generated/ios/c++/**/*.{h,hpp}",
|
|
47
|
+
# Views are framework-specific and should be private
|
|
48
|
+
"nitrogen/generated/shared/**/views/**/*"
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
|
|
52
|
+
spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
|
|
53
|
+
# Use C++ 20
|
|
54
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
55
|
+
# Enables C++ <-> Swift interop (by default it's only C)
|
|
56
|
+
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
57
|
+
# Enables stricter modular headers
|
|
58
|
+
"DEFINES_MODULE" => "YES",
|
|
59
|
+
})
|
|
60
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeCandle-Swift-Cxx-Bridge.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "ReactNativeCandle-Swift-Cxx-Bridge.hpp"
|
|
9
|
+
|
|
10
|
+
// Include C++ implementation defined types
|
|
11
|
+
#include "HybridRNCandleSpecSwift.hpp"
|
|
12
|
+
#include "ReactNativeCandle-Swift-Cxx-Umbrella.hpp"
|
|
13
|
+
|
|
14
|
+
namespace margelo::nitro::rncandle::bridge::swift {
|
|
15
|
+
|
|
16
|
+
// pragma MARK: std::function<void(const std::string& /* account */)>
|
|
17
|
+
Func_void_std__string create_Func_void_std__string(void* _Nonnull swiftClosureWrapper) {
|
|
18
|
+
auto swiftClosure = ReactNativeCandle::Func_void_std__string::fromUnsafe(swiftClosureWrapper);
|
|
19
|
+
return [swiftClosure = std::move(swiftClosure)](const std::string& account) mutable -> void {
|
|
20
|
+
swiftClosure.call(account);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
25
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* _Nonnull swiftClosureWrapper) {
|
|
26
|
+
auto swiftClosure = ReactNativeCandle::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
27
|
+
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
28
|
+
swiftClosure.call(error);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// pragma MARK: std::function<void()>
|
|
33
|
+
Func_void create_Func_void(void* _Nonnull swiftClosureWrapper) {
|
|
34
|
+
auto swiftClosure = ReactNativeCandle::Func_void::fromUnsafe(swiftClosureWrapper);
|
|
35
|
+
return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
|
|
36
|
+
swiftClosure.call();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// pragma MARK: std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>
|
|
41
|
+
std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec> create_std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_(void* _Nonnull swiftUnsafePointer) {
|
|
42
|
+
ReactNativeCandle::HybridRNCandleSpec_cxx swiftPart = ReactNativeCandle::HybridRNCandleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
43
|
+
return std::make_shared<margelo::nitro::rncandle::HybridRNCandleSpecSwift>(swiftPart);
|
|
44
|
+
}
|
|
45
|
+
void* _Nonnull get_std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_(std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ cppType) {
|
|
46
|
+
std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rncandle::HybridRNCandleSpecSwift>(cppType);
|
|
47
|
+
#ifdef NITRO_DEBUG
|
|
48
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
49
|
+
throw std::runtime_error("Class \"HybridRNCandleSpec\" is not implemented in Swift!");
|
|
50
|
+
}
|
|
51
|
+
#endif
|
|
52
|
+
ReactNativeCandle::HybridRNCandleSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
53
|
+
return swiftPart.toUnsafe();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
} // namespace margelo::nitro::rncandle::bridge::swift
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeCandle-Swift-Cxx-Bridge.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `HybridRNCandleSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::rncandle { class HybridRNCandleSpec; }
|
|
13
|
+
|
|
14
|
+
// Forward declarations of Swift defined types
|
|
15
|
+
// Forward declaration of `HybridRNCandleSpec_cxx` to properly resolve imports.
|
|
16
|
+
namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
|
|
17
|
+
|
|
18
|
+
// Include C++ defined types
|
|
19
|
+
#include "HybridRNCandleSpec.hpp"
|
|
20
|
+
#include <NitroModules/Promise.hpp>
|
|
21
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
22
|
+
#include <NitroModules/Result.hpp>
|
|
23
|
+
#include <exception>
|
|
24
|
+
#include <functional>
|
|
25
|
+
#include <memory>
|
|
26
|
+
#include <optional>
|
|
27
|
+
#include <string>
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
31
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
32
|
+
*/
|
|
33
|
+
namespace margelo::nitro::rncandle::bridge::swift {
|
|
34
|
+
|
|
35
|
+
// pragma MARK: std::optional<std::string>
|
|
36
|
+
/**
|
|
37
|
+
* Specialized version of `std::optional<std::string>`.
|
|
38
|
+
*/
|
|
39
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
40
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) {
|
|
41
|
+
return std::optional<std::string>(value);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// pragma MARK: std::function<void(const std::string& /* account */)>
|
|
45
|
+
/**
|
|
46
|
+
* Specialized version of `std::function<void(const std::string&)>`.
|
|
47
|
+
*/
|
|
48
|
+
using Func_void_std__string = std::function<void(const std::string& /* account */)>;
|
|
49
|
+
/**
|
|
50
|
+
* Wrapper class for a `std::function<void(const std::string& / * account * /)>`, this can be used from Swift.
|
|
51
|
+
*/
|
|
52
|
+
class Func_void_std__string_Wrapper final {
|
|
53
|
+
public:
|
|
54
|
+
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* account */)>&& func): _function(std::make_shared<std::function<void(const std::string& /* account */)>>(std::move(func))) {}
|
|
55
|
+
inline void call(std::string account) const {
|
|
56
|
+
_function->operator()(account);
|
|
57
|
+
}
|
|
58
|
+
private:
|
|
59
|
+
std::shared_ptr<std::function<void(const std::string& /* account */)>> _function;
|
|
60
|
+
};
|
|
61
|
+
Func_void_std__string create_Func_void_std__string(void* _Nonnull swiftClosureWrapper);
|
|
62
|
+
inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) {
|
|
63
|
+
return Func_void_std__string_Wrapper(std::move(value));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// pragma MARK: std::shared_ptr<Promise<std::string>>
|
|
67
|
+
/**
|
|
68
|
+
* Specialized version of `std::shared_ptr<Promise<std::string>>`.
|
|
69
|
+
*/
|
|
70
|
+
using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
|
|
71
|
+
inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() {
|
|
72
|
+
return Promise<std::string>::create();
|
|
73
|
+
}
|
|
74
|
+
inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) {
|
|
75
|
+
return PromiseHolder<std::string>(std::move(promise));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
79
|
+
/**
|
|
80
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
81
|
+
*/
|
|
82
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
83
|
+
/**
|
|
84
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
85
|
+
*/
|
|
86
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
87
|
+
public:
|
|
88
|
+
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_shared<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
89
|
+
inline void call(std::exception_ptr error) const {
|
|
90
|
+
_function->operator()(error);
|
|
91
|
+
}
|
|
92
|
+
private:
|
|
93
|
+
std::shared_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
94
|
+
};
|
|
95
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* _Nonnull swiftClosureWrapper);
|
|
96
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) {
|
|
97
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
101
|
+
/**
|
|
102
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
103
|
+
*/
|
|
104
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
105
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() {
|
|
106
|
+
return Promise<void>::create();
|
|
107
|
+
}
|
|
108
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) {
|
|
109
|
+
return PromiseHolder<void>(std::move(promise));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// pragma MARK: std::function<void()>
|
|
113
|
+
/**
|
|
114
|
+
* Specialized version of `std::function<void()>`.
|
|
115
|
+
*/
|
|
116
|
+
using Func_void = std::function<void()>;
|
|
117
|
+
/**
|
|
118
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
119
|
+
*/
|
|
120
|
+
class Func_void_Wrapper final {
|
|
121
|
+
public:
|
|
122
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_shared<std::function<void()>>(std::move(func))) {}
|
|
123
|
+
inline void call() const {
|
|
124
|
+
_function->operator()();
|
|
125
|
+
}
|
|
126
|
+
private:
|
|
127
|
+
std::shared_ptr<std::function<void()>> _function;
|
|
128
|
+
};
|
|
129
|
+
Func_void create_Func_void(void* _Nonnull swiftClosureWrapper);
|
|
130
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) {
|
|
131
|
+
return Func_void_Wrapper(std::move(value));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// pragma MARK: std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>
|
|
135
|
+
/**
|
|
136
|
+
* Specialized version of `std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>`.
|
|
137
|
+
*/
|
|
138
|
+
using std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ = std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>;
|
|
139
|
+
std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec> create_std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_(void* _Nonnull swiftUnsafePointer);
|
|
140
|
+
void* _Nonnull get_std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_(std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ cppType);
|
|
141
|
+
|
|
142
|
+
// pragma MARK: std::weak_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>
|
|
143
|
+
using std__weak_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ = std::weak_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>;
|
|
144
|
+
inline std__weak_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ weakify_std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_(const std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec>& strong) { return strong; }
|
|
145
|
+
|
|
146
|
+
// pragma MARK: Result<void>
|
|
147
|
+
using Result_void_ = Result<void>;
|
|
148
|
+
inline Result_void_ create_Result_void_() {
|
|
149
|
+
return Result<void>::withValue();
|
|
150
|
+
}
|
|
151
|
+
inline Result_void_ create_Result_void_(const std::exception_ptr& error) {
|
|
152
|
+
return Result<void>::withError(error);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::string>>>
|
|
156
|
+
using Result_std__shared_ptr_Promise_std__string___ = Result<std::shared_ptr<Promise<std::string>>>;
|
|
157
|
+
inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::shared_ptr<Promise<std::string>>& value) {
|
|
158
|
+
return Result<std::shared_ptr<Promise<std::string>>>::withValue(value);
|
|
159
|
+
}
|
|
160
|
+
inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::exception_ptr& error) {
|
|
161
|
+
return Result<std::shared_ptr<Promise<std::string>>>::withError(error);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
165
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
166
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) {
|
|
167
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
168
|
+
}
|
|
169
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) {
|
|
170
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
} // namespace margelo::nitro::rncandle::bridge::swift
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeCandle-Swift-Cxx-Umbrella.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `HybridRNCandleSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::rncandle { class HybridRNCandleSpec; }
|
|
13
|
+
// Forward declaration of `PresentationBackground` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::rncandle { enum class PresentationBackground; }
|
|
15
|
+
// Forward declaration of `PresentationStyle` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::rncandle { enum class PresentationStyle; }
|
|
17
|
+
// Forward declaration of `Service` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::rncandle { enum class Service; }
|
|
19
|
+
// Forward declaration of `ToolCall` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
21
|
+
|
|
22
|
+
// Include C++ defined types
|
|
23
|
+
#include "HybridRNCandleSpec.hpp"
|
|
24
|
+
#include "PresentationBackground.hpp"
|
|
25
|
+
#include "PresentationStyle.hpp"
|
|
26
|
+
#include "Service.hpp"
|
|
27
|
+
#include "ToolCall.hpp"
|
|
28
|
+
#include <NitroModules/Promise.hpp>
|
|
29
|
+
#include <NitroModules/Result.hpp>
|
|
30
|
+
#include <exception>
|
|
31
|
+
#include <functional>
|
|
32
|
+
#include <memory>
|
|
33
|
+
#include <optional>
|
|
34
|
+
#include <string>
|
|
35
|
+
|
|
36
|
+
// C++ helpers for Swift
|
|
37
|
+
#include "ReactNativeCandle-Swift-Cxx-Bridge.hpp"
|
|
38
|
+
|
|
39
|
+
// Common C++ types used in Swift
|
|
40
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
41
|
+
#include <NitroModules/AnyMapHolder.hpp>
|
|
42
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
43
|
+
|
|
44
|
+
// Forward declarations of Swift defined types
|
|
45
|
+
// Forward declaration of `HybridRNCandleSpec_cxx` to properly resolve imports.
|
|
46
|
+
namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
|
|
47
|
+
|
|
48
|
+
// Include Swift defined types
|
|
49
|
+
#if __has_include("ReactNativeCandle-Swift.h")
|
|
50
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
51
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "ReactNativeCandle".
|
|
52
|
+
#include "ReactNativeCandle-Swift.h"
|
|
53
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
54
|
+
#elif __has_include(<ReactNativeCandle/ReactNativeCandle-Swift.h>)
|
|
55
|
+
#include <ReactNativeCandle/ReactNativeCandle-Swift.h>
|
|
56
|
+
#else
|
|
57
|
+
#error ReactNativeCandle's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "ReactNativeCandle", and try building the app first.
|
|
58
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeCandleAutolinking.mm
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
+
#import "ReactNativeCandle-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridRNCandleSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface ReactNativeCandleAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation ReactNativeCandleAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::rncandle;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"RNCandle",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<margelo::nitro::rncandle::HybridRNCandleSpec> hybridObject = ReactNativeCandle::ReactNativeCandleAutolinking::createRNCandle();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeCandleAutolinking.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
public final class ReactNativeCandleAutolinking {
|
|
9
|
+
public typealias bridge = margelo.nitro.rncandle.bridge.swift
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of a Swift class that implements `HybridRNCandleSpec`,
|
|
13
|
+
* and wraps it in a Swift class that can directly interop with C++ (`HybridRNCandleSpec_cxx`)
|
|
14
|
+
*
|
|
15
|
+
* This is generated by Nitrogen and will initialize the class specified
|
|
16
|
+
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridRNCandle`).
|
|
17
|
+
*/
|
|
18
|
+
public static func createRNCandle() -> bridge.std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ {
|
|
19
|
+
if #available(iOS 17.0, *) {
|
|
20
|
+
let hybridObject = HybridRNCandle()
|
|
21
|
+
return { () -> bridge.std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_ in
|
|
22
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
23
|
+
return __cxxWrapped.getCxxPart()
|
|
24
|
+
}()
|
|
25
|
+
} else {
|
|
26
|
+
// Fallback on earlier versions
|
|
27
|
+
fatalError("[error] Only iOS 17+ is supported.")
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridRNCandleSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridRNCandleSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::rncandle {
|
|
11
|
+
} // namespace margelo::nitro::rncandle
|