File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,14 +33,14 @@ - (void)hello {
3333 [(ReactIterableAPI *)_swiftAPI hello ];
3434}
3535
36- // - (void)initializeWithApiKey:(NSString *)apiKey
37- // config:(NSDictionary *)config
38- // {
39- // NSLog(@"initializeWithApiKey > Objective-C");
40- // BOOL urlHandlerPresent = [config[@"urlHandlerPresent"] boolValue];
36+ - (void )initializeWithApiKey : (NSString *)apiKey
37+ config : (NSDictionary *)config
38+ {
39+ NSLog (@" initializeWithApiKey > Objective-C" );
40+ BOOL urlHandlerPresent = [config[@" urlHandlerPresent" ] boolValue ];
4141
42- // [_swiftAPI initializeWithApiKey:apiKey config:config];
43- // }
42+ [_swiftAPI initializeWithApiKey: apiKey config: config];
43+ }
4444
4545// - (void)initializeWithApiKey:(NSString *)apiKey
4646// config:(NSDictionary *)config
Original file line number Diff line number Diff line change @@ -68,23 +68,33 @@ open class ReactIterableAPI: RCTEventEmitter {
6868 print ( " Hello from Swift Again " )
6969 }
7070
71- @objc ( initializeWithApiKey: config: version: resolver: rejecter: )
72- func initialize(
73- apiKey: String ,
74- config configDict: [ AnyHashable : Any ] ,
75- version: String ,
76- resolver: @escaping RCTPromiseResolveBlock ,
77- rejecter: @escaping RCTPromiseRejectBlock
78- ) {
79- ITBInfo ( )
80-
81- initialize (
82- withApiKey: apiKey,
83- config: configDict,
84- version: version,
85- resolver: resolver,
86- rejecter: rejecter)
87- }
71+ @objc ( initializeWithApiKey: config: )
72+ public func initializeWithApiKey( apiKey: String , config: NSDictionary ) {
73+ NSLog ( " initialize called from swift " )
74+ ITBInfo ( )
75+
76+ // self.initialize(
77+ // apiKey: apiKey
78+ // )
79+ }
80+
81+ // @objc(initializeWithApiKey:config:version:resolver:rejecter:)
82+ // public func initialize(
83+ // apiKey: String,
84+ // config configDict: [AnyHashable: Any],
85+ // version: String,
86+ // resolver: @escaping RCTPromiseResolveBlock,
87+ // rejecter: @escaping RCTPromiseRejectBlock
88+ // ) {
89+ // ITBInfo()
90+
91+ // initialize(
92+ // withApiKey: apiKey,
93+ // config: configDict,
94+ // version: version,
95+ // resolver: resolver,
96+ // rejecter: rejecter)
97+ // }
8898
8999 @objc ( initialize2WithApiKey: config: apiEndPointOverride: version: resolver: rejecter: )
90100 func initialize2(
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ export interface Spec extends TurboModule {
3030 // version: string
3131 // ): Promise<boolean>;
3232 // testing change
33- // initializeWithApiKey(
34- // apiKey: string,
35- // config: IterableConfigDict,
36- // version: string
37- // ): void;
33+ initializeWithApiKey (
34+ apiKey : string ,
35+ config : IterableConfigDict ,
36+ version : string
37+ ) : void ;
3838
3939 // initialize2WithApiKey(
4040 // apiKey: string,
You can’t perform that action at this time.
0 commit comments