Created
June 30, 2023 02:16
-
-
Save tanner-west/03c07c20a6a60b4c208c5b0d8a1087c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// RCTVisionModule.swift | |
// VisionNativeModulePOC | |
// | |
// Created by Tanner West on 6/2/23. | |
// | |
import Foundation | |
@objc(RCTVisionModule) | |
class RCTVisionModule: NSObject { | |
@objc(sayHello:specialNumber:callback:) | |
func sayHello(_ specialMessage: String, specialNumber: NSNumber, callback: RCTResponseSenderBlock) { | |
print("read this special message: ", specialMessage) | |
print("look at this special number: ", specialNumber) | |
let sum = specialNumber.decimalValue + 5 | |
callback([sum, "the first arg is the special sum; this is just a string"]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment