{"componentChunkName":"component---src-templates-blog-post-js","path":"/how-to-integrate-vuukle-sdk-into-your-ios-app/","result":{"data":{"site":{"siteMetadata":{"title":"Vuukle Docs","author":"Vuukle"}},"markdownRemark":{"id":"0489decd-2c16-502c-9615-01a8b92e648f","html":"<p>​ <strong>[DEPRECATED]</strong></p>\n<p>​ Support will be not provided</p>\n<div class=\"gatsby-resp-iframe-wrapper\" style=\"padding-bottom: 56.25%; position: relative; height: 0; overflow: hidden; margin-bottom: 1.0725rem\" > <iframe src=\"https://www.youtube.com/embed/9iiPs9bQMew\" frameborder=\"0\" allowfullscreen style=\" position: absolute; top: 0; left: 0; width: 100%; height: 100%; \"></iframe> </div>\n<p>Additional video:</p>\n<div class=\"gatsby-resp-iframe-wrapper\" style=\"padding-bottom: 56.25%; position: relative; height: 0; overflow: hidden; margin-bottom: 1.0725rem\" > <iframe src=\"https://www.youtube.com/embed/JYckNitqvCo\" frameborder=\"0\" allowfullscreen style=\" position: absolute; top: 0; left: 0; width: 100%; height: 100%; \"></iframe> </div>\n<p>‘Vuukle’ iOS SDK framwork works with Objective-C and Swift 3.0 (or greater)</p>\n<p>• Home page Vuukle</p>\n<h2>INSTALLATION</h2>\n<hr>\n<p>[0. Create Podfile for your Project] You can skip this step, if you already have Podfile</p>\n<h1>Open terminal and change default directory to your project directory.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">-&gt; Run command &#39;cd [your project path]&#39; (EXAMPLE: &#39;cd /Users/fedir/Desktop/ExampleProject&#39;)</code></pre></div>\n<h1>Create Podfile.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">-&gt; Run command &#39;pod init&#39; and wait for completion</code></pre></div>\n<h1>Open Podfile in Xcode.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">-&gt; Run command &#39;open -a Xcode podfile&#39;</code></pre></div>\n<p>[1. Add pod ‘Vuukle’ to list of pods]</p>\n<h1>If you have just created new Podfile, add following lines of code to it (replace ‘ExampleProject’ with yor project name).</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">platform :ios, &#39;9.0&#39;\n\ntarget &#39;[your project name]&#39; do\n\n  use_frameworks!\n  pod &#39;Vuukle&#39;\n\nend</code></pre></div>\n<h1>If you already have Podfile simple add Vuukle to list of your pods.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">pod &#39;Vuukle&#39;</code></pre></div>\n<h1>[!] For OBJECTIVE-C you should define version of Swift after target end.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">target &#39;[your project name]&#39; do\n   ...\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    target.build_configurations.each do |config|\n\n      config.build_settings[&#39;SWIFT_VERSION&#39;] = &#39;3.0&#39;\n\n    end\n  end\nend</code></pre></div>\n<p>[2. Install pods for Project]</p>\n<h1>Close your project</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">• EXAMPLE: If you have opened ExampleProject.xcodeproj, close it. After installation of pods you will work with ExampleProject.xcworkspace</code></pre></div>\n<h1>(If you closed terminal after step 0.) Open terminal again and change default directory to your project directory.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">-&gt; Run command &#39;cd [your project path]&#39; (EXAMPLE: cd /Users/fedir/Desktop/ExampleProject)</code></pre></div>\n<h1>Install pods for Project.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">-&gt; Run command &#39;pod install&#39; and wait for completion\n\nThis command will install latest version of pod &#39;Vuukle&#39; and dependency pods:\n\n• &#39;Alamofire&#39;      (version &gt;= 4.3.0)\n• &#39;AlamofireImage&#39; (version &gt;= 3.2.0)\n• &#39;MBProgressHUD&#39;  (version &gt;= 1.0.0)\n• &#39;NSDate+TimeAgo&#39; (version &gt;= 1.0.6)</code></pre></div>\n<p>[3. Please add to info.plist next parameter]</p>\n<p>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”.<a href=\"http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http\">http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http</a></p>\n<h2>IMPORT SWIFT</h2>\n<hr>\n<p>[4. Add Vuukle to Embedded Binaries]</p>\n<h1>Open generated after installation .xcworkspace file.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">• EXAMPLE: In project directory open ExampleProject.xcworkspace\n\nYou can also run using terminal:\n  -&gt; Run command &#39;cd [your project path]&#39; (EXAMPLE: cd /Users/fedir/Desktop/ExampleProject)\n  -&gt; Run command &#39;open ExampleProject.xcworkspace&#39;</code></pre></div>\n<h1>Open your project settings.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">Tap on your project in project navigator (in top left corner)</code></pre></div>\n<h1>Add Vuukle to Embedded Binaries</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">• Select &#39;TARGETS&#39; and scroll down to &#39;Embedded Binaries&#39;\n• Tap on &#39;+&#39; button and select &#39;Add Other...&#39;\n• Go to &#39;Pods -&gt; Vuukle -&gt; Vuukle&#39; and select &#39;Vuukle.framework&#39; file</code></pre></div>\n<p>[5. Import Vuukle]</p>\n<h1>Simple add ‘import Vuukle’ in the top of .swift file after other framworks your use.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">• EXAMPLE:\n\nimport UIKit\nimport Vuukle\n\nclass ExampleViewController: UIViewController {\n...</code></pre></div>\n<h2>IMPORT OBJECTIVE-C</h2>\n<hr>\n<p>[6. Open workspace and import Vuukle]</p>\n<h1>Open generated after installation .xcworkspace file.</h1>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">EXAMPLE: In project directory open ExampleProject.xcworkspace\n\nYou can also run using terminal:\n-&gt; Run command &#39;cd [your project path]&#39; (EXAMPLE: cd /Users/fedir/Desktop/ExampleProject)\n-&gt; Run command &#39;open ExampleProject.xcworkspace&#39;</code></pre></div>\n<h1>Open your project settings.</h1>\n<p>Tap on your project in project navigator (in top left corner)</p>\n<h1>Add Vuukle to Embedded Binaries</h1>\n<p>• 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</p>\n<p>[7. Import Vuukle]</p>\n<h1>Simple add ‘#import &#x3C;Vuukle/Vuukle-Swift.h>’ before @interface in .m file.</h1>\n<p>• EXAMPLE:</p>\n<p>#import &#x3C;Vuukle/Vuukle-Swift.h></p>\n<p>@interface ViewController () … @end</p>\n<p>@implementation ViewController …</p>\n<h2>USAGE SWIFT:</h2>\n<hr>\n<p>[8. Add vuukle comments to conent view for it]</p>\n<h1>[!] You have add comments in this method of UIViewController:</h1>\n<p>override func viewWillAppear(_ animated: Bool) { … }</p>\n<h1>For nested comments (hold ‘Alt’ and click on method in Xcode to see more details):</h1>\n<p>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])</p>\n<h1>For own comments scroll (hold ‘Alt’ and click on method in Xcode to see more details):</h1>\n<p>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])</p>\n<p>[9. Update all heights]</p>\n<h1>[!] You have update all hights in this method of UIViewController:</h1>\n<p>override func viewDidAppear(_ animated: Bool) { … }</p>\n<h1>To update height call method</h1>\n<p>VUCommentsBuilder.updateAllHeights()</p>\n<h1>If you app supports landscape orintation, you have to call this method after rotation.</h1>\n<p>• EXAMPLE:</p>\n<p>override func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation) { VUCommentsBuilder.updateAllHeights() }</p>\n<p>[10. LogIn through your application]</p>\n<p>VUCommentsBuilder.loginUser(name: [Your name], email: [Your email])</p>\n<p>VUCommentsBuilder.logOut()</p>\n<p>[11. Everything is ready, you can run the Project]</p>","frontmatter":{"title":"[DEPRECATED] How to integrate Vuukle SDK into your iOS app","date":"May 01, 2017","category":"Install Vuukle","tags":["how to","install","iOS","sdk"],"shortDescription":"We offer the powerful SDK ( software development kit) that allows to setup advanced commenting and user engagement system into any iOS application."}}},"pageContext":{"id":"0489decd-2c16-502c-9615-01a8b92e648f"}}}