Skip to content

Commit

Permalink
Merge pull request #22 from VirgilSecurity/release/0.12.1
Browse files Browse the repository at this point in the history
Release 0.12.1

- Remove support for Apple BITCODE
- Bump min supported apple versions
  - macOS -> 10.13
  - iOS -> 11.0
  - tvOS -> 11.0
  - watchOS -> 4.0
- Remove Carthage support
- Update underlying crypto:
  - VirgilCrypto -> 7.0.1
  - VirgilSDK -> 9.0.1
  • Loading branch information
SergeySeroshtan authored Aug 14, 2023
2 parents 4a259dd + b4e8098 commit 6b85da7
Show file tree
Hide file tree
Showing 17 changed files with 273 additions and 373 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@ on:
jobs:
Deploy:
name: Deploy
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- name: Prepare Dependencies
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
carthage version
carthage bootstrap --use-xcframeworks
- uses: actions/checkout@v3

- name: Generate Docs
run: ./CI/publish-docs.sh
Expand All @@ -30,16 +23,6 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

- name: Build Carthage Binary
run: |
./CI/publish-carthage.sh;
- name: Upload Carthage Binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: VirgilSDKPythia.xcframework.zip
tag: ${{ github.ref }}
overwrite: true
- name: Publish Cocoapods
run: ./CI/publish-cocoapods.sh
env:
Expand Down
64 changes: 36 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,71 @@ name: tests
on:
push:
branches:
- develop
- 'develop'
- 'release/**'

jobs:
Tests:
name: Tests
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
PROJECT: VirgilSDKPythia.xcodeproj
strategy:
matrix:
include:
- destination: "OS=15.5,name=iPhone 13 Pro"
- destination: "OS=17.0,name=iPhone 14"
prefix: "iOS"
test: "1"
- destination: "arch=x86_64"
prefix: "macOS"
test: "1"
- destination: "OS=15.4,name=Apple TV"
- destination: "OS=17.0,name=Apple TV"
prefix: "tvOS"
test: "1"
- destination: "OS=8.5,name=Apple Watch Series 7 - 45mm"
- destination: "OS=10.0,name=Apple Watch Series 7 - 45mm"
prefix: "watchOS"
test: "0"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Decrypt tests config
run: ./CI/decrypt-config.sh
env:
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
- name: Prepare Dependencies
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
carthage version
carthage bootstrap --use-xcframeworks --platform ${{ matrix.prefix }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
run: ./CI/decrypt-config.sh

- name: Run ${{ matrix.prefix }} Tests
run: |
uses: nick-fields/retry@v2
with:
max_attempts: 20
timeout_minutes: 30
retry_on: error
command: |
set -o pipefail
SCHEME="VirgilSDKPythia ${{ matrix.prefix }}"
if "${{ matrix.test }}" == "1"; then
# Build Framework
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug clean build-for-testing | xcpretty;
# Run Tests
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug test-without-building | xcpretty;
if [ "${{ matrix.test }}" == "1" ]; then
# Build & Test Framework
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug clean test | xcpretty;
else
# Build Only
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty;
fi
SPM:
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Decrypt tests config
run: ./CI/decrypt-config.sh
env:
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
- name: SPM test
run: ./CI/decrypt-config.sh

- name: SPM test build
run: |
brew install coreutils # install 'timeout' utility
swift --version
Expand All @@ -70,9 +76,11 @@ jobs:
swift test
Swiftlint:
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Swiftlint
run: |
brew outdated swiftlint || brew upgrade swiftlint
Expand Down
5 changes: 4 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ opt_in_rules:
- void_return
- weak_delegate

excluded:
excluded:
- .build
- .swiftpm
- Package.swift
- Carthage
- Tests
- SDKTestApp iOS
Expand Down
6 changes: 0 additions & 6 deletions CI/publish-carthage.sh

This file was deleted.

4 changes: 1 addition & 3 deletions CI/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ DOCS_DIR="${GITHUB_WORKSPACE}/docs"
mkdir -p ${DOCS_DIR}
git clone -b gh-pages "${REPO_PATH}" --single-branch ${DOCS_DIR}

INFOPLIST_FILE_PATH="${GITHUB_WORKSPACE}/VirgilSDKPythia/Info.plist"

# Define SDK versions
VIRGIL_SDK_VERSION="v"$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE_PATH}")
VIRGIL_SDK_VERSION="v0.12.1"
CURRENT_VERSION_DIR="${DOCS_DIR}/${VIRGIL_SDK_VERSION}"

# Generate the HTML documentation.
Expand Down
2 changes: 0 additions & 2 deletions Cartfile

This file was deleted.

7 changes: 0 additions & 7 deletions Cartfile.resolved

This file was deleted.

20 changes: 10 additions & 10 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"pins" : [
{
"identity" : "virgil-crypto-x",
"identity" : "virgil-crypto-c",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-crypto-x.git",
"location" : "https://github.com/VirgilSecurity/virgil-crypto-c.git",
"state" : {
"revision" : "eee53f493c6dcdefe49378d2967b7fe750ad18e0",
"version" : "6.0.1"
"revision" : "40ae5231264c8f2d79354922fac15d96021aa8b5",
"version" : "0.17.1"
}
},
{
"identity" : "virgil-cryptowrapper-x",
"identity" : "virgil-crypto-x",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-cryptowrapper-x.git",
"location" : "https://github.com/VirgilSecurity/virgil-crypto-x.git",
"state" : {
"revision" : "957bf2113ea570f1b934ffab5bbfbc8e12c7e6a3",
"version" : "0.16.1"
"revision" : "6334a21c49dafb305666aafc34819314960412de",
"version" : "7.0.1"
}
},
{
"identity" : "virgil-sdk-x",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-sdk-x.git",
"state" : {
"revision" : "4ea08d9ad458c9197961d88dbc163ee1a608fa84",
"version" : "8.1.0"
"revision" : "53e32c076211a7623f113df49e6f48c8974c9024",
"version" : "9.0.1"
}
}
],
Expand Down
9 changes: 4 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "VirgilSDKPythia",
platforms: [
.macOS(.v10_11), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)
.macOS(.v10_13), .iOS(.v11), .tvOS(.v11), .watchOS(.v4)
],
products: [
.library(
Expand All @@ -15,17 +15,16 @@ let package = Package(
],

dependencies: [
.package(url: "https://github.com/VirgilSecurity/virgil-sdk-x.git",
Range(uncheckedBounds: (lower: Version(8, 1, 0), upper: Version(8, 2, 0)))),
.package(url: "https://github.com/VirgilSecurity/virgil-cryptowrapper-x.git", exact: .init(0, 16, 1))
.package(url: "https://github.com/VirgilSecurity/virgil-sdk-x.git", exact: .init(9, 0, 1)),
.package(url: "https://github.com/VirgilSecurity/virgil-crypto-c.git", exact: .init(0, 17, 1))
],

targets: [
.target(
name: "VirgilSDKPythia",
dependencies: [
.product(name: "VirgilSDK", package: "virgil-sdk-x"),
.product(name: "VirgilCryptoPythia", package: "virgil-cryptowrapper-x")
.product(name: "VirgilCryptoPythia", package: "virgil-crypto-c")
],
path: "Source"
),
Expand Down
67 changes: 3 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

[![Build Status](https://api.travis-ci.com/VirgilSecurity/virgil-pythia-x.svg?branch=master)](https://travis-ci.com/VirgilSecurity/virgil-pythia-x)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/VirgilSDKPythia.svg)](https://cocoapods.org/pods/VirgilSDKPythia)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
![Platform](https://img.shields.io/cocoapods/p/VirgilSDKPythia.svg?style=flat)
[![SPM compatible](https://img.shields.io/badge/Swift_Package_Manager-compatible-green.svg?style=flat)](https://www.swift.org/package-manager)
[![GitHub license](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://github.com/VirgilSecurity/virgil/blob/master/LICENSE)


[Introduction](#introduction) | [SDK Features](#sdk-features) | [Installation](#installation) | [Usage Examples](#usage-examples) | [Docs](#docs) | [Support](#support)

## Introduction
Expand All @@ -21,7 +20,7 @@

## Installation

Virgil Pythia SDK is provided as a set of frameworks. These frameworks are distributed via Carthage and CocoaPods. Also in this guide, you find one more package called VirgilCrypto (Virgil Crypto Library) that is used by the SDK to perform cryptographic operations.
Virgil Pythia SDK is provided as a set of frameworks. These frameworks are distributed via SPM and CocoaPods. Also in this guide, you find one more package called VirgilCrypto (Virgil Crypto Library) that is used by the SDK to perform cryptographic operations.

Frameworks are available for:
- iOS 9.0+
Expand All @@ -43,7 +42,7 @@ To integrate Virgil Pythia into your Xcode project using CocoaPods, specify it i
target '<Your Target Name>' do
use_frameworks!

pod 'VirgilSDKPythia', '~> 0.10.0'
pod 'VirgilSDKPythia', '~> 0.12.1'
end
```

Expand All @@ -53,66 +52,6 @@ Then, run the following command:
$ pod install
```

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with [Homebrew](http://brew.sh/) using the following command:

```bash
$ brew update
$ brew install carthage
```

To integrate Virgil Pythia into your Xcode project using Carthage, create an empty file with name *Cartfile* in your project's root folder and add following lines to your *Cartfile*

```
github "VirgilSecurity/virgil-pythia-x" ~> 0.10.0
```

#### Linking against prebuilt binaries

To link prebuilt frameworks to your app, run following command:

```bash
$ carthage update --use-xcframeworks
```

This will build each dependency or download a pre-compiled framework from github Releases.

##### Building for iOS/tvOS/watchOS

On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, add following frameworks from the *Carthage/Build* folder inside your project's folder:
- VirgilSDKPythia
- VirgilSDK
- VirgilCryptoAPI
- VirgilCrypto
- VirgilCryptoFoundation
- VirgilCryptoPythia
- VSCCommon
- VSCFoundation
- VSCPythia

Check Embed & sign for each.

##### Building for macOS

On your application target's “General” settings tab, in the “Embedded Binaries” section, drag and drop following frameworks from the Carthage/Build folder on disk:
- VirgilSDKPythia
- VirgilSDK
- VirgilCryptoAPI
- VirgilCrypto
- VirgilCryptoFoundation
- VirgilCryptoPythia
- VSCCommon
- VSCFoundation
- VSCPythia

Additionally, you'll need to copy debug symbols for debugging and crash reporting on macOS.

On your application target’s “Build Phases” settings tab, click the “+” icon and choose “New Copy Files Phase”.
Click the “Destination” drop-down menu and select “Products Directory”. For each framework, drag and drop corresponding dSYM file.

### Swift Package Manager

[Swift Package Manager](https://www.swift.org/package-manager) is an official Apple tool for managing the distribution of Swift code.
Expand Down
8 changes: 4 additions & 4 deletions Tests/VSY001_BrainKeyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class VSY001_BrainKeyTests: XCTestCase {
let brainKey = BrainKey(context: brainKeyContext)

let keyPair1 = try! brainKey.generateKeyPair(password: "some password").startSync().get()
sleep(5)
sleep(10)
let keyPair2 = try! brainKey.generateKeyPair(password: "some password").startSync().get()
sleep(5)
sleep(10)
let keyPair3 = try! brainKey.generateKeyPair(password: "another password").startSync().get()
sleep(5)
sleep(10)
let keyPair4 = try! brainKey.generateKeyPair(password: "some password", brainKeyId: "my password 1").startSync().get()

XCTAssert(keyPair1.publicKey.identifier == keyPair2.publicKey.identifier)
XCTAssert(keyPair1.publicKey.identifier != keyPair3.publicKey.identifier)
XCTAssert(keyPair1.publicKey.identifier != keyPair4.publicKey.identifier)
Expand Down
Loading

0 comments on commit 6b85da7

Please sign in to comment.