Can someone provide some sample codes for adding records using API in swiftUI.
To interact with you index, you should use the Swift client, not the SwiftUI, which is for front end interfaces.
You use the
replaceObjects method for both creating and updating records in Swift. You can find example code here:
I will try that, thanks @chuck.meyer !