Update to 1.18.0 resources (#17)

* update to 1.18.0 resources

* Update Package.swift

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* update

---------

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
This commit is contained in:
Rachel Guo
2024-06-04 15:41:38 -07:00
committed by GitHub
parent ce64739c6d
commit 11c7dd6dd4
9 changed files with 53 additions and 14 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
#include <variant>
#import "cxx_api.h"
#import "cxx_utils.h"
#import "error_utils.h"
NS_ASSUME_NONNULL_BEGIN
@@ -73,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN
try {
Ort::Property value = [self CXXAPIOrtCheckpoint].GetProperty(name.UTF8String);
if (std::string* str = std::get_if<std::string>(&value)) {
return [NSString stringWithUTF8String:str->c_str()];
return utils::toNSString(str->c_str());
}
ORT_CXX_API_THROW("Property is not a string.", ORT_INVALID_ARGUMENT);
}