Releases: mimikgit/cocoapod-EdgeCore
ClientLibrary/Core v5.10.1
The following functions had their signatures changed from using Result<> to being throwing functions:
-
deleteAIModel
-
deployMicroservice
-
deployImage
-
deployContainer
-
deployUseCase
-
microservices
-
microservice
-
runtimeIdToken
-
authorizedRequest
-
downloadImageContent
-
updateEnv
-
call
-
callMultipartFormData
-
callStreamSSE
-
callStream
-
microserviceRequest
ClientLibrary v5.10.0
🚀 Highlights
- Rebranding: major naming updates across the library.
- Actor-based architecture: safer, more scalable concurrency model.
- API improvements: more throwing functions for cleaner error handling.
- Deprecated code removed: slimmer, cleaner API surface.
- New Developer Console module: async API + ready-made SwiftUI authentication views.
🔄 Rebranding
EdgeClient→ClientLibraryEdgeEngineClient→ClientRuntime- All functions containing
edgeoredgeEnginein names or descriptions now useruntimeor omit the term as appropriate.
The CocoaPod is still named EdgeCore in this release.
- A migration to a new pod name will occur in a future release.
🎭 Actor Migration
All main modules now use Actors instead of Class or Struct.
Benefits of Actor-based SDK design:
- ✅ Built-in thread safety for shared state.
- ✅ Clear asynchronous boundaries.
- ✅ Less boilerplate (no manual locks/queues).
- ✅ Scalable reentrancy.
- ✅ Works seamlessly with structured concurrency.
- ✅ Safer, more predictable API surface.
- ✅ Ideal for global-actor use cases.
⚡ API Improvements
- More public functions are now throwing functions.
- Benefits:
- Cleaner syntax for common cases.
- More readable control flow.
- Better interoperability with async/await.
🗑️ Deprecations
- All previously deprecated functions and structs have been removed.
🧑💻 Developer Console (New Module)
A brand-new integration for the mimik Developer Console API, providing both programmatic APIs and ready-to-use SwiftUI authentication components.
Features
-
Authentication & Authorization
- Manage Developer Console users.
- Authorize
mim OEruntime access. - Issue ID tokens & shared-audience ID tokens.
-
Applications
- Create, list, find, and delete apps.
-
Sessions
- Manage developer session state.
-
UI Components
- AuthenticationView: a prebuilt SwiftUI login screen.
- Drop-in
Viewfor email & password login. - Supports app branding (logo, name, version).
- Inline error handling, loading spinners, and focus management.
- Supplementary flows: Sign up & Forgot password.
- Callbacks return a
Sessionon success orNSErroron failure.
- Drop-in
- AuthenticationView: a prebuilt SwiftUI login screen.
These UI components let developers integrate with mimik developer console authentication quickly without manually wiring up login flows.
📚 API Reference
UI
Authentication
Auth.authenticate(email:password:)Auth.authorizeRuntimeAccess(idToken:runtimeIdToken:)Auth.signup(email:password:)Auth.verifySignup(codes:password:)Auth.requestPasswordReset(email:)Auth.verifyPasswordReset(codes:newPassword:)Auth.changePassword(email:currentPassword:newPassword:)Auth.listScopes(serverUrl:)Auth.issueToken(accessToken:clientId:expiresIn:)Auth.issueSharedToken(accessToken:clientId:expiresIn:)
Applications
Apps.create(accessToken:payload:)Apps.list(accessToken:)Apps.find(accessToken:name:)Apps.find(accessToken:clientId:)Apps.delete(accessToken:clientId:)
Session
DeveloperConsole/Session
EdgeCore v5.9.3
🔑 EdgeClient (ClientLibrary) Changes
-
Static API transition
All main public interface functions are nowstaticwherever possible, including:Runtime management
activateExternalRuntime(host:port:)externalRuntimeIsActivateddeactivateExternalRuntimeexternalRuntimeIsRunningruntimeIdTokenruntimeInforuntimeFullPathUrlruntimeWorkingDirectory
Deployment
deployMicroservice(accessToken:config:imageTarPath:)deployImage(accessToken:imageTarPath:)deployContainer(accessToken:config:)deployUseCase(accessToken:configUrl:dynamicConfig:)deployUseCase(accessToken:config:dynamicConfig:)undeployMicroservice(accessToken:microservice:)microservices(accessToken:)microservice(containerName:accessToken:)
Authentication & user management
authorizeUserAccessauthorizeDeveloperauthorizeUser(email:password:)authorizeUser(phoneNumber:)validateUser(codes:)initiateAccountDeletion(email:password:)validateAccountDeletion(codes:)completeAccountDeletion(authorization:)passwordChange(email:currentPassword:newPassword:)passwordReset(email:idToken:)validatePasswordReset(codes:)signup(email:password:)validateSignup(codes:)
Content management
exportVideo(session:outputURL:outFileType:)uploadContent(sourceFileUrl:destinationUrl:mimeType:progressHandler:)downloadContent(sourceUrl:destinationFileUrl:progressHandler:)
Configuration
preferredConfig(imageName:containerName:basePath:runtimeFullPathUrl:clientId:envVariables:signatureKey:ownerCode:)accountInformationauthenticationScopes
AI
integrateAIServicedeleteAIModel
-
Deprecations
All instance-based interface functions are deprecated and redirect to their newstaticequivalents.⚠️ Note: These deprecations are backward compatible and will not break compilation in v5.9.3.
Deprecated instance functions are scheduled for removal in v5.10.
⚙️ EdgeEngineClient (ClientRuntime) Protocol Changes
-
All protocol functions are now
staticwherever possible, including:configureRuntimePort(to:)expectedRuntimeVersionmanageRuntimeLifecycle(manage:)startRuntime(parameters:)stopRuntimerestartRuntimeresetRuntimeruntimeIsRunningruntimeParametersruntimeLifecycleIsManaged
-
Deprecations
All instance protocol functions are deprecated and redirect to their static equivalents.⚠️ Note: These are backward compatible in v5.9.3 but will be removed in v5.10.
🔄 Other Interface Changes
- Removed:
HybridEdgeClientprotocol (replaced byEdgeClientstatic functions). - Error handling: All functions previously returning
Result<Void, NSError>now throw instead. - Renamed:
StartupParameters→RuntimeParameters(with a deprecating typealias provided). - Terminology: References to "edgeEngine" or "edge engine" updated to "mim OE" or "runtime", depending on context.
- New typealiases (preparing for future changes):
typealias ClientLibrary = EdgeClienttypealias ClientRuntime = EdgeEngineClient
🛠 Miscellaneous
- Updated documentation across many functions.
- Dictionary encoding now uses
[String: any Sendable]?. updateMicroserviceEnv()has been moved to an instance method onMicroservice:updateEnv(accessToken:envVariables:)
⚠️ Migration Notes
Developers upgrading to v5.9.3 should pay special attention to these changes:
-
Switch from instance methods to static methods
- All public instance functions are deprecated. Use their
staticequivalents instead. - Backward compatibility is maintained for now, but instance functions will be removed in v5.10.
- All public instance functions are deprecated. Use their
-
Result-based functions now throw
- Functions previously returning
Result<Void, NSError>now throw. - Update call sites to use
try/catch.
- Functions previously returning
-
Renamed struct
StartupParametersis nowRuntimeParameters.- A typealias is provided for backward compatibility, but update your code for forward compatibility.
-
Terminology changes
- Replace references to
"edgeEngine"or"edge engine"with"mim OE"or"runtime".
- Replace references to
-
Microservice API change
updateMicroserviceEnv()has been moved to an instance method:- Use
microservice.updateEnv(accessToken:envVariables:)instead.
- Use
✅ Summary:
- v5.9.3 is backward compatible: existing code will continue to compile.
- All deprecated instance methods and typealiases remain available but are scheduled for removal in v5.10.
- Developers should begin migrating now to avoid issues in the next release.
EdgeCore v5.9.2
Summary:
New Features
1. AI Integration Simplification
- Added
integrateAIService(...)method. - Provides a single entry point to:
- Authenticate with mimik AI.
- Load a use case (inline or remote).
- Return a fully configured client and resolved
UseCase.
2. AI Model Downloading
- Introduced
downloadAI(...)inServiceInterface. - Enables cancellable, streaming downloads of AI models.
3. EdgeClient.AI.HybridEdgeClient Protocol
- New protocol
HybridEdgeClientfor fetching edge microservices. - Methods:
microservice(containerName:edgeEngineAccessToken:)microservices(edgeEngineAccessToken:)
EdgeClientnow conforms toEdgeClient.AI.HybridEdgeClient.
4. Service Configuration Enhancements
- New optional property:
model: EdgeClient.AI.Model? - New computed property:
modelId: String?
5. Hybrid Inference Support
- Added internal optional property
hybridEdgeClienttoAI.HybridClient. - Enables support for low-level, on-device inference.
Details:
EdgeClient
New AI Feature
Introduces a single entry point to integrate the mimik AI service, authenticate, load your use case (either inline or from a URL), and obtain a fully configured client:
/// Integrates the mimik AI service with your credentials and use-case configuration,
/// returning both the configured client and the resolved `UseCase`.
///
/// - Parameters:
/// - accessToken: A valid access token for authentication.
/// - apiKey: Your API key for the AI service.
/// - source: Specifies how to obtain the `UseCase` (inline or remote).
/// - requestHandler: Optional callback for streaming request events.
/// - Returns: A `Result` containing a `ServiceIntegration` on success, or an `NSError` on failure.
public func integrateAIService(
accessToken: String,
apiKey: String,
useCase source: UseCaseConfigurationSource,
requestHandler: @escaping (DataStreamRequest) -> Void = { _ in }
) async -> Result<ServiceIntegration, NSError>EdgeClient.AI.ServiceInterface
New AI protocol Feature downloadAI(...)
Provides a high-level, cancellable stream for downloading AI models:
func downloadAI(
model: EdgeClient.AI.Model.CreateModelRequest,
accessToken: String,
apiKey: String,
useCase: EdgeClient.UseCase
) -> CancellableStream<DownloadAIEvent>New EdgeClient.AI.HybridEdgeClient Protocol
Defines a unified interface for fetching edge microservices:
/// A client interface for fetching edge microservices.
public protocol HybridEdgeClient {
/// Fetches a single microservice by container name.
func microservice(containerName: String, edgeEngineAccessToken: String) async -> Result<EdgeClient.Microservice, NSError>
/// Fetches all available microservices.
func microservices(edgeEngineAccessToken: String) async -> Result<[EdgeClient.Microservice], NSError>
}Conformance:
/// Makes `EdgeClient` conform to `HybridEdgeClient`,
/// enabling unified access to microservices and AI models.
extension EdgeClient: HybridEdgeClient { }EdgeClient.AI.ServiceConfiguration
New model Property
An optional selected model for use with the service provider:
public let model: EdgeClient.AI.Model?New computed modelId Property
Convenience accessor for the selected model’s identifier:
public var modelId: String?EdgeClient.AI.HybridClient
Adds an optional low-level edge client for on-device inference:
/// An optional low-level edge client for on-device inference.
internal let hybridEdgeClient: (any HybridEdgeClient)?Documentation Improvements
- Enhanced inline documentation for multiple methods to improve clarity and consistency.
Deprecated APIs
The following APIs are now superseded by the new interfaces. Please migrate to avoid breaking changes:
integrateAIdownloadAIaiModelsaiModel
Edge Core v5.9.1
New AI API Features
1. Unified AI Client & Model Discovery
-
HybridClient+AssistantPrompt
Abstracts sending prompts, receiving streaming responses over various AI backends—on-device, edge, or cloud—providing a consistent -
HybridClient+AssistantModels
A single interface to list, inspect, and select AI models—whether on-device, at the edge, or in the cloud—so you can swap runtimes without changing your call patterns.
2. Flexible Prompting & Streaming
- Prompting APIs (
AssistantPrompt) for both text and vision inputs, with options to resize images on the fly. - Streaming Responses deliver either the full completion or token-by-token updates, and support clean cancellation when users abort long-running generations.
3. Standardized Output Objects
AssistantOutputunifies all model replies into a simple structure:- Full chat transcripts for conversational integrations
- Single-message outputs for one-off queries or batch jobs
4. First HybridClient Runtimes Supported
- mimik AI
- Google Gemini
New Structs & Types
EdgeClient/AI/HybridClient
assistantPrompt(prompt:)assistantVisionPrompt(prompt:image:resizeImgOptions:)availableModels()availableModelsMessage()
EdgeClient/AI/ServiceInterface
.configuration(replaces legacy service setup methods)
EdgeClient/AI/ServiceConfiguration
- Core configuration holder for all AI services
EdgeClient/AI/AssistantModels
availableModels()availableModelsMessage()
EdgeClient/AI/AssistantPrompt
assistantPrompt(prompt:)assistantVisionPrompt(prompt:image:resizeImgOptions:)
EdgeClient/AI/AssistantOutput
assistantOutput()
Documentation Improvements
- Significantly expanded documentation, quick-start guides and code examples.
Deprecated APIs
The following are now superseded by
EdgeClient.AI.ServiceInterface:
aiModelsaiModelwarmUpAIchatAIvisionAICompletionType
Please migrate to the new interfaces to stay up to date and avoid breaking changes.
Edge Core v5.9.0
New API
EdgeClient/visionAI (requires mim OE v3.15.0)
- Description: Interacts with a Vision-Language Model (VLM) to analyze an uploaded image via a streaming response.
- Parameters:
request: Chat AI request parameters, containing all necessary information and settings for the AI request.image: The image to be sent to the VLM for analysis.resizeImgOptions(Optional): Options to resize the image before sending it to the model.streamHandler: A callback function for handling AI responses as they are streamed from the model, useful for real-time processing.requestHandler: A callback function that can be used to cancel the AI request, offering flexibility to stop the request if needed.
API Changes
EdgeClient.AI.Model.Usage/
- New Property:
tokenPerSecond(Float): Token processing throughput.
EdgeClient.AI.Model.Message/
- New Optional Parameter:
thumbnailBase64(String): A Base64 encoded thumbnail image, applicable only for VLM model messages.
EdgeClient.Log/
- API Updates:
logError,logFault,logDebug,logInfo: Themarkerparameter has been moved to the newEdgeClient/setLoggingLevelAPI.
EdgeClient/setLoggingLevel/
- New Optional Parameter:
marker(String): Helps messages stand out in the console log, e.g., with⚠️ or similar, to visually highlight important logs.
Deprecated
EdgeClient.AI.Model.Message.Config
- Deprecation Notice: The
Configobject has been removed in this release.
EdgeCore v5.8.4
Changes:
EdgeClient/Microservice/call(config:)
- Introduced an optional
requestHandlerclosure.
EdgeClient/Microservice/call(config:, requestHandler:)
- The
requestHandlerparameter is now optional.
EdgeClient/Microservice/call<T: Codable>(config:, type:, requestHandler:)
- Added support for
Codabletypes and made therequestHandleroptional.
EdgeClient/Microservice/callMultipartFormData(config:, name:, mimeType:, data:)
- Introduced a new method for uploading multipart form data, with an optional
requestHandler.
EdgeClient/Microservice/callMultipartFormData<T: Codable>(config:, name:, mimeType:, data:, type:, requestHandler:)
- Multipart form data upload now supports
Codabletypes and includes an optionalrequestHandler.
Key Changes:
- Multiple methods now include an optional
requestHandler. - New methods for uploading multipart form data have been added.
- Support for
Codabletypes has been introduced for response handling.
EdgeCore v5.8.3
Release Notes
EdgeClient Methods
New Deployment Methods:
integrateAI: Multiple overloads added to support integrating mimik AI use case microservices from either a configuration URL or directly from aUseCaseobject.deployUseCase: Multiple overloads added to support deploying microservice use cases from either a configuration URL or directly from aUseCaseobject.deployImage: New method for deploying an edge microservice image from a.tarfile.deployContainer: New method for deploying an edge microservice container.
Modification in chatAI Method
The chatAI method has been modified to return CompletionResponse instead of the previous Message. The method still accepts the same parameters.
Deprecation and Renaming of Older Methods
Several methods, such as chatAI(modelId:accessToken:apiKey:question:useCase:context:config:) and askAIModel(id:accessToken:apiKey:question:useCase:streamHandler:requestHandler:), have been deprecated and renamed. They are now replaced by the new chatAI(request:requestHandler:) and chatAI(request:streamHandler:requestHandler:) methods, which have updated signatures.
EdgeClient.StartupParameters struct
- Property Changes:
logFileDir: New optional property specifying the directory to save logs.
EdgeClient.Microservice struct
- Property Changes:
- Introduced
DynamicConfigstruct, which allows specifying dynamic configuration values for edge microservice deployments.
- Introduced
EdgeClient.AI.UseCase struct
- Property Change:
bundled: Added aBool?property indicating if edge microservices are included in the application's bundle.
- Iftrue, microservices are searched for in the bundle usingtarUrl.lastPathComponent.
- Iffalseornil, microservices are downloaded from an online source.
EdgeClient.AI.Model struct
-
Property Changes:
totalSize: Represents the expected total download size of the model.kind: A newKindenum was introduced to specify the model type (llmorvlm).mmprojTotalSize: Represents the expected total download size of the mmproj model (vlm only).mmprojUrl: URL for the AI model visual projection download (vlm only).modelChatHint: AI model chat loading hint (vlm only).
-
EdgeClient.AI.Model.CompletionTypeEnum Change:- Added case
modelProcessingto represent the AI model processing the request. - Added case
streamDoneto indicate when the AI model response stream ends.
- Added case
EdgeClient.AI.Model.CreateModelRequest struct
- Property Changes:
kind: Specifies the modelKind(llmorvlm).chatTemplateHint: New optional field to provide a hint on which chat template to use.mmprojUrl: URL for the multimodal projection model.
EdgeClient.AI.Model.Usage struct
- Property Change:
tokenPerSecond: Represents token processing throughput (typeFloat?).
EdgeCore v5.8.2
New API
Model Warmup
EdgeClient/warmUpAI(request:)
- Prepares and initializes the AI model, optimizing its readiness to efficiently process and respond to incoming queries.
Streamed AI Chat API:
EdgeClient/chatAI(request:streamHandler:requestHandler:)
- Enables real-time interaction with an AI model via a streaming response.
Non-Streamed AI Chat API:
EdgeClient/chatAI(request:requestHandler:)
- Enables asynchronous interaction with an AI model, returning the response as a single string.
Edge microservice calls with new request handler:
EdgeClient/Microservice/call(config:requestHandler:)
- A method for making calls to the edge microservice endpoints, with built-in automatic error handling and a request handler.
EdgeClient/Microservice/call(config:type:requestHandler:)
- A method for making calls to the edge microservice endpoints, featuring automatic model decoding, error handling based on the specified type, and a request handler.
New Models
EdgeClient.AI.Model.WarmupRequest
- Prepares and initializes the AI model, optimizing its readiness to efficiently process and respond to incoming queries.
EdgeClient.AI.Model.ChatRequest
- For real-time interaction with an AI model. Optionally, use the context parameter to provide additional information for more relevant outputs, and adjust the temperature through the config parameter to control response creativity and randomness.
Miscellaneous
- Updated API reference documentation and README.
- Added code examples to EdgeClient documentation
Deprecations
EdgeClient/chatAI(modelId:accessToken:apiKey:question:useCase:context:config:streamHandler:requestHandler:): Renamed to EdgeClient/chatAI(request:streamHandler:requestHandler:) to simplify the signature.
EdgeClient/chatAI(modelId:accessToken:apiKey:question:useCase:context:config:): Renamed to EdgeClient/chatAI(request:requestHandler:) to simplify the signature.
EdgeClient.AI.Model.Message.Config: No longer needed.
EdgeCore v5.8.1 - New AI Chat APIs with Context-Awareness
New AI Chat APIs with Context-Awareness
Streamed AI Chat API:
EdgeClient/chatAI(modelId:accessToken:apiKey:question:useCase:context:config:streamHandler:requestHandler:)
- Enables real-time interaction with an AI model via a streaming response.
- New Optional parameters:
context: Provides additional information for more relevant responses.config: Adjusts thetemperatureto control response creativity and randomness.
Non-Streamed AI Chat API:
EdgeClient/chatAI(modelId:accessToken:apiKey:question:useCase:context:config:)
- Enables asynchronous interaction with an AI model, returning the response as a single string.
- New Optional parameters:
context: Provides additional information for more relevant responses.config: Adjusts thetemperatureto control response creativity and randomness.
New Property/Feature in CreateModelRequest
excludeFromBackup
Set totrueto exclude the AI language model from iCloud backups. This is the default behavior if not specified.
Model Changes
-
Choice Model: Enhanced to support both streaming and non-streaming responses.
- Delta Property: Remains for streamed responses.
- Message Property: Used for non-streamed responses.
-
ServerSentEventType:
- Added
errorenum to handle additional error types.
- Added
-
New Containers:
NewContainerandNewMessageadded for improved API flexibility.
API Deprecation
askAIModel: Renamed tochatAIfor consistency and clarity.
Miscellaneous
- Removed several deprecated methods.
- Updated API reference documentation and README.
- Conformed all public APIs to the
CodableandSendableprotocols. - Improved debug console logging for better traceability.