# Quick Start
This walkthrough shows how to add Storyly to your iOS application and show your first story in it.
You can also check out the demo on GitHub
Before you begin
This walkthrough contains sample instance information. However, if you want to work with your own content as well, please login into Storyly Dashboard (opens new window) and get your instance token.
The sample instance information for testing purposes;
Storyly SDK targets
iOS 9 or higher.
Storyly SDK is available through CocoaPods (opens new window). To integrate Storyly SDK into your Xcode project using CocoaPods, specify it in your
use_frameworks! pod 'Storyly'
Please note that you need to use Storyly with
use_frameworks! option in Podfile. If you need to add it without using
use_frameworks! option, add following lines to your
Podfile before updating Pods or check Manual Installation.
dynamic_frameworks = ['Storyly', 'SDWebImage'] pre_install do |installer| installer.pod_targets.each do |pod| if dynamic_frameworks.include?(pod.name) def pod.dynamic_framework?; true end def pod.build_type; Pod::BuildType.dynamic_framework end end end end
Please note that CocoaPods (opens new window) version should be 1.9+
Storyly SDK is available through Carthage (opens new window). To integrate Storyly SDK into your Xcode project using Carthage, specify it in your
binary "https://prod-storyly-media.s3.eu-west-1.amazonaws.com/storyly-sdk/Carthage/Storyly.json" github "SDWebImage/SDWebImage" == 5.10.0
carthage update --use-xcframeworks.
After, add the frameworks to your Xcode project: Go to targets and select your application. Click plus button from the
Frameworks, Libraries, and Embedded Content section and add
SDWebImage.xcframework. If you can't find, add from
Add Other > Add files dialog. Frameworks will be located at
Please note that Carthage (opens new window) version should be 0.38+
# Swift Package Manager
Storyly SDK is available through SPM (opens new window). To integrate Storyly SDK into your Xcode project using SPM, add and enter package repository (opens new window) in the Swift Packages tab of your project.
Storyly SDK has a dependency on
SDWebImage, if your project also has a dependency on
SDWebImage, you may need to organize your project dependencies (remove
SDWebImage) in order to prevent package conflicts.
If you prefer not to use dependency managers, Storyly SDK releases are available through Storyly iOS SDK Releases (opens new window).
- Download and unzip both
- Add the frameworks to your Xcode project: Use Finder to drag the both
SDWebImage.xcframeworkfolders into your Xcode project and drop it onto your project in the Project navigator window.
- Follow the prompts to copy items into the destination and to create folder references.
# Add Storyly View
You need to import related modules to use Storyly:
You can add
Programmatically. Please follow the next sections.
# Add Storyly View from Storyboard
UIView so that you can use inherited functionality as it is. So, you can add
StorylyView to any of the app’s
- Add a
Custom Classas StorylyView in
120is suggested for better experience for default size
# Add Storyly View Programmatically
UIView so that you can use inherited functionality as it is. So, you can initialize
Please note that if you use Auto Layout Constraints, you need to set
# Initialize StorylyView
You are one step away from enjoying Storyly. You just need to init
Please do not forget to use your own token. You can get your token from the Storyly Dashboard -> Settings -> App Settings (opens new window)
Just hit the run. Now, you should be able to enjoy
If you can't see Storyly in your application, please check that your token is correct. For more details please check console logs.