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'
endpod '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]