Swiftpack.co - Package - pubnub/swift

PubNub Swift SDK

Platform CocoaPods Compatible Swift Package Manager compatible Carthage Compatible Build Status Codacy Coverage Grade Badge Codacy Badge

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 10.2+
  • Swift 5+

Installation

The PubNub Swift SDK doesn't contain any external dependencies.

CocoaPods

# Podfile
use_frameworks!

target 'YOUR_TARGET_NAME' do
  pod 'PubNubSwift', '~> 1.0.0'
end

Note: Replace YOUR_TARGET_NAME with your target's name.

In the directory containing your Podfile. execute the following:

pod install

Carthage

Officially supported: Carthage 0.33 and up.

Add this to Cartfile

github "pubnub/swift" ~> 1.0

Then in the directory containing your Cartfile, execute the following:

carthage update

Swift Package Manager

Create or edit a Package.swift file to include:

  • Inside your root level dependencies array add:
.package(url: "https://github.com/pubnub/swift.git", from: "1.0.0")
  • Inside your targets array add PubNub as a dependency:
.target(name: "YOUR_TARGET_NAME", dependencies: ["PubNub"])

When you are finished it should looked similar to the example below:

// swift-tools-version:5.0

import PackageDescription

let package = Package(
  name: "YOUR_TARGET_NAME",
  dependencies: [
    .package(url: "https://github.com/pubnub/swift.git", from: "1.0.0")
  ],
  targets: [
    .target(name: "YOUR_TARGET_NAME", dependencies: ["PubNub"])
  ]
)

Note: Ensure that you replace YOUR_TARGET_NAME with your target's name

Then in the directory containing your Package.swift, execute the following:

swift build

Documentation

Check out our official docs page.

Communication

If you need help or have a general question, contact support

License

The PubNub Swift SDK is released under the MIT license. See LICENSE for details.

Github

link
Stars: 0
Help us keep the lights on

Dependencies