Updated over a month ago
[DEPRECATED]
Support will be not provided
Additional video:
‘Vuukle’ iOS SDK framwork works with Objective-C and Swift 3.0 (or greater)
• Home page Vuukle
[0. Create Podfile for your Project] You can skip this step, if you already have Podfile
-> Run command 'cd [your project path]' (EXAMPLE: 'cd /Users/fedir/Desktop/ExampleProject')
-> Run command 'pod init' and wait for completion
-> Run command 'open -a Xcode podfile'
[1. Add pod ‘Vuukle’ to list of pods]
platform :ios, '9.0'
target '[your project name]' do
use_frameworks!
pod 'Vuukle'
end
pod 'Vuukle'
target '[your project name]' do
...
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
[2. Install pods for Project]
• EXAMPLE: If you have opened ExampleProject.xcodeproj, close it. After installation of pods you will work with ExampleProject.xcworkspace
-> Run command 'cd [your project path]' (EXAMPLE: cd /Users/fedir/Desktop/ExampleProject)
-> Run command 'pod install' and wait for completion
This command will install latest version of pod 'Vuukle' and dependency pods:
• 'Alamofire' (version >= 4.3.0)
• 'AlamofireImage' (version >= 3.2.0)
• 'MBProgressHUD' (version >= 1.0.0)
• 'NSDate+TimeAgo' (version >= 1.0.6)
[3. Please add to info.plist next parameter]
Select info.plist in your project and add “App Transport Security Settings” and change type “String” to “Dictionary”. Then add to “App Transport Security Settings” - Allow Arbitrary Loads type “Boolean” value “YES”.http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http
[4. Add Vuukle to Embedded Binaries]
• EXAMPLE: In project directory open ExampleProject.xcworkspace
You can also run using terminal:
-> Run command 'cd [your project path]' (EXAMPLE: cd /Users/fedir/Desktop/ExampleProject)
-> Run command 'open ExampleProject.xcworkspace'
Tap on your project in project navigator (in top left corner)
• Select 'TARGETS' and scroll down to 'Embedded Binaries'
• Tap on '+' button and select 'Add Other...'
• Go to 'Pods -> Vuukle -> Vuukle' and select 'Vuukle.framework' file
[5. Import Vuukle]
• EXAMPLE:
import UIKit
import Vuukle
class ExampleViewController: UIViewController {
...
[6. Open workspace and import Vuukle]
EXAMPLE: In project directory open ExampleProject.xcworkspace
You can also run using terminal:
-> Run command 'cd [your project path]' (EXAMPLE: cd /Users/fedir/Desktop/ExampleProject)
-> Run command 'open ExampleProject.xcworkspace'
Tap on your project in project navigator (in top left corner)
• Select ‘TARGETS’ and scroll down to ‘Embedded Binaries’ • Tap on ’+’ button and select ‘Add Other…’ • Go to ‘Pods -> Vuukle -> Vuukle’ and select ‘Vuukle.framework’ file
[7. Import Vuukle]
• EXAMPLE:
#import <Vuukle/Vuukle-Swift.h>
@interface ViewController () … @end
@implementation ViewController …
[8. Add vuukle comments to conent view for it]
override func viewWillAppear(_ animated: Bool) { … }
VUCommentsBuilder.addVuukleComments(baseVC: [Your view controller], baseScrollView: [Your main scroll view], contentView: [Your content view for vuukle], contentHeightConstraint: [Your content view height constraint], appName: [App name], appID: [App bundle ID], vuukleApiKey: [Vuukle api key], vuukleSecretKey: [Vuukle secret key], vuukleHost: [Vuukle host], vuukleTimeZone: [Your Time Zone], articleTitle: [Article title], articleID: [Article ID)], articleTag: [Article tag], articleURL: [Article URL])
VUCommentsBuilder.addVuukleComments(baseVC: [Your view controller], contentView: [Your content view for vuukle], appName: [App name], appID: [App bundle ID], vuukleApiKey: [Vuukle api key], vuukleSecretKey: [Vuukle secret key], vuukleHost: [Vuukle host], vuukleTimeZone: [Your Time Zone], articleTitle: [Article title], articleID: [Article ID)], articleTag: [Article tag], articleURL: [Article URL], isScrollEnabled: true, edgeInserts: [Edge insrest for comments])
[9. Update all heights]
override func viewDidAppear(_ animated: Bool) { … }
VUCommentsBuilder.updateAllHeights()
• EXAMPLE:
override func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation) { VUCommentsBuilder.updateAllHeights() }
[10. LogIn through your application]
VUCommentsBuilder.loginUser(name: [Your name], email: [Your email])
VUCommentsBuilder.logOut()
[11. Everything is ready, you can run the Project]