Skip to content
Andrew Wagner edited this page Jul 26, 2019 · 3 revisions

Services

Learn how to use the various service declarations.

Installation

iOS, macOS, and tvOS

Cocoa Pods

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. You can install it with the following command:

$ gem install cocoapods

Navigate to the project directory and create Podfile with the following command:

$ pod install

Inside of your Podfile, specify the XMLCoder pod:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'YourApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Test
  pod 'DecreeServices', '~> 3.0.0'
end

Then, run the following command:

$ pod install

Open the the YourApp.xcworkspace file that was created. This should be the file you use everyday to create your app, instead of the YourApp.xcodeproj file.

As git submodule

  1. First, run the following terminal commands
    git submodule add https://github.com/drewag/DecreeServices.git external/DecreeServices
    cd external/DecreeServices
    swift package update
  1. Drag 'external/DecreeServices.xcodeproj' into your project
  2. Select your apps project and the “General” tab
  3. Scroll down to Embedded Binaries and click the plus button
  4. Select “DecreeServices.framework” and repeat for “Decree.framework”, “CryptoSwift.framework”, and “XMLCoder.framework”
  5. Add import DecreeService to the top of any file you would like to use this library in

Linux and macOS

Using Swift Package Manager

import PackageDescription

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/drewag/DecreeServices.git", from: "3.0.0"),
    ]
)