You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created the project using Swift and Native module. After initialization, I added my PTDetector.mlmodel to the project/example/ios/ folder and also imported it into Xcode to auto-generate the Swift model class. Then, inside the project/ios/ folder, I added two lines of code to the default Swift file:
import CoreML // edit #1
@objc(AwesomeModule)
class AwesomeModule: NSObject {
@objc(multiply:withB:withResolver:withRejecter:)
func multiply(a: Float, b: Float, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void {
let model = PTDetector() // edit #2
resolve(a*b)
}
}
After making these changes, I attempted to run yarn example ios but the build stage failed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I created the project using Swift and Native module. After initialization, I added my
PTDetector.mlmodel
to theproject/example/ios/
folder and also imported it into Xcode to auto-generate the Swift model class. Then, inside theproject/ios/
folder, I added two lines of code to the default Swift file:After making these changes, I attempted to run
yarn example ios
but the build stage failed.Beta Was this translation helpful? Give feedback.
All reactions