Skip to main content
Version: 1.6.x

Getting started

Installation

Cocoapods

JoinStoriesSDK is available through CocoaPods. To install it, simply add the following lines to your Podfile:

use_frameworks!

target 'your-demo-project' do
pod 'JoinStoriesSDK'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end

This will download the SwiftLint binaries and dependencies in Pods/ during your next pod install execution.

In your terminal (root folder of the project where Podfile file is located), run pod repo update and then pod install

Run your project through your_project_name.xcworkspace

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding JoinStoriesSDK as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
.package(url: "https://github.com/teamjoin/join-stories-sdk-ios-binary", .upToNextMajor(from: "1.1.0"))
]

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate JoinStoriesSDK into your project manually.

Embedded Framework

  • Download the zip file from the Package.swift under binartyTarget up Terminal,

  • Unzip the file appearing as an xcframework file

  • Drag JoinStoriesSDK.xcframework into your project

Configuration

Before using any feature offered by the SDK, you have to initialize it in your AppDelegate method

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool

To do so, you will need a JoinConfiguration and pass your team ID as a parameter:

let configuration = JoinConfiguration(team: "your_join_team_id")

After that, attach previous configuration to JoinStories

JoinStories.setConfiguration(configuration)