mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
### Description <!-- Describe your changes. --> Add Swift Package Manager (SPM) support for ORT based on #14621 - uses the existing objective-c bindings - some re-organization of the directory structure was required but the contents of the files are unchanged, apart from adjustments due to file movements Add tool for updating ORT native pod used in the SPM package Update CIs to use ORT native pod from build, and build/test using SPM ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> iOS developers are using SPM as much as cocoapods, so adding SPM means both are catered for.
44 lines
884 B
Objective-C
44 lines
884 B
Objective-C
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "ort_enums.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* Gets the ORT version string in format major.minor.patch.
|
|
*
|
|
* Available since 1.15.
|
|
*/
|
|
NSString* ORTVersion(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
/**
|
|
* The ORT environment.
|
|
*/
|
|
@interface ORTEnv : NSObject
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
/**
|
|
* Creates an ORT Environment.
|
|
*
|
|
* @param loggingLevel The environment logging level.
|
|
* @param error Optional error information set if an error occurs.
|
|
* @return The instance, or nil if an error occurs.
|
|
*/
|
|
- (nullable instancetype)initWithLoggingLevel:(ORTLoggingLevel)loggingLevel
|
|
error:(NSError**)error NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|