New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eva-sdk-ios

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eva-sdk-ios

NodeJS based support scripts for the EVA iOS SDK

  • 1.0.41
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

EvaSdkCore

This the repository for the EVA SDK for iOS written in Swift. This library is meant to be installed with the Swift package manager

Purpose

This SDK provides the following for working with the EVA platform:

  • EVA endpoint bootstrap
  • EVA service caller
  • service definitions
  • response typings

Only the Core service definitions are included in this package. Additional definitions can be installed depending on the application need.

Installation

XCode has native support to install swift packages. The installation url is the github repository: https://github.com/springtreesolutions/eva-sdk-ios A release is just a git tag: git tag 1.0.3.

Usage

The SDK revolves around calling an EvaService on an EvaEndpoint. An endpoint should be bootstrapped once to have access to the default token and application configuration.

import os
import Combine
import EvaSdkCore

let evaEndpoint = EvaEndpoint(url: "https://api.rituals.test.eva-online.cloud");

let bootstrapPublisher = self.evaEndpoint.bootstrap()
.sink(receiveCompletion: { completion in
    switch completion {
    case .finished:
        break
    case .failure(let error):
        os_log("Bootstrap failed: %@", type: .error, "\(error)")
    }
}, receiveValue: { (listApplicationsResponse, getApplicationConfigurationResponse) in
    os_log("Bootstrap succes", type: .info)
})

All services are made available through Codable types. This base SDK supplies the Core services.

import os
import Combine
import EvaSdkCore

// Assuming a bootstrapped endpoint in this example
//
let loginService = Core.SvcLogin(endpoint: evaEndpoint)
let loginRequest = Core.Login(
    EmailAddress: 'USERNAME',
    Password: 'SECRET',
    OrganizationUnitID: 6
)

let loginPublisher = loginService.call(
    payload: loginRequest
)
.sink(receiveCompletion: { completion in
    switch completion {
    case .finished:
        break
    case .failure(let error):
        os_log("Login failed: %@", log: evaAppLog, type: .error, "\(error)")
    }
}, receiveValue: { loginResponse in
    os_log("Login success: %@", log: evaAppLog, type: .info, "\(loginResponse)")
})

Building and testing

You can use XCode and enjoy watching the beach-ball of doom a lot or you can build from the CLI using some npm scripts.

Build with npm run build which assumes a simulator called iPhone 8 to be present or npm run build:generic. You can run the XCTest suite with npm run test.

The scripts assume xcbeautify is installed for output formatting.

Updating types

This repository comes with an update script called update-eva-typings.js which can be run with NodeJS:

npm run eva-typings

Publishing

Publishing the swift package involves setting some versions in various files and pushing a git tag. An interactive npm script has been made to help with this process:

npm run release

Keywords

FAQs

Package last updated on 17 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc