Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// swift-tools-version:5.4
import PackageDescription

let package = Package(
name: "BrowserstackSwiftSDK",
platforms: [.iOS(.v14)],
products: [
.library(
name: "BrowserstackSwiftSDK",
targets: ["BrowserstackSwiftSDK"]
)
],
targets: [
.binaryTarget(
name: "BrowserstackSwiftSDK",
url: "https://sdk-assets.browserstack.com/browserstack-swift-sdk/releases/1.0.0/BrowserstackSwiftSDK.zip",
checksum: "6e76b5f20df8141fc9fc7673e60aeeb7bebf80699dab76ebeb4e0e76a8e23311"
)
]
)
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# browserstack-swift-sdk-artifacts
Publishing repository for BrowserStack Swift SDK for Automation testing.

## Installation
1. Select **File > Swift Packages > Add Package Dependency...**.
2. Add the Github URL of the Package file:

```
https://github.com/browserstack/browserstack-swift-sdk-artifacts
```

>If you receive an `artifact of binary target 'BrowserstackSwiftSDK' failed extraction: The operation couldn’t be completed. (TSCBasic.StringError error 1.)` error when extracting the package, please close Xcode, delete the Derrived Data folder, re-open Xcode, and try again.

3. Select the BrowserstackSwiftSDK package product, select your target, and select Finish.
4. Add the below entry in the Info.plist file of your UI test target
```
<key>NSPrincipalClass</key>
<string>BrowserstackSwiftSDK.BrowserstackSwiftSDK</string>
```

**Alternatively**,
Import the Browserstack Swift SDK module

```
import BrowserstackSwiftSDK
```

And then in the UI test target's class initializer add,
```
override class func setUp() {
/* Can be any class initializer */
super.setUp()
let _ = BrowserstackSwiftSDK()
}
```