Brownbag: Designing Delightful User Experiences

Resources from my brownbag presentation at Odecee on 29/4/15.

Keynote demos
Videos

ShinobiControls with CocoaPods

ShinobiControls is a collection of UI Controls for iOS and Android. I used ShinobiCharts on a recent project where I wanted to add the framework via CocoaPods as we were doing for other third party dependencies.

Jeffrey Jackson wrote a helpful post on how to use ShinobiControls with Cocoapods by creating private github repos for each of the frameworks. I took a slightly different approach because I wanted to use a local podspec instead of a private repo.

Note: The below instructions are for ShinobiCharts, but the process is the same for the other frameworks.

Setup

Inside your project directory, create a Frameworks folder and copy the framework into a subfolder. I included VERSION.txt here too.

Frameworks/ShinobiCharts/ShinobiCharts/ShinobiCharts.framework
Frameworks/ShinobiCharts/ShinobiCharts/VERSION.txt

Create an empty podspec here:

Frameworks/ShinobiCharts/ShinobiCharts.podspec

Your directory structure should now look like this:

Podspec

The podspec:

Pod::Spec.new do |s|
  s.name         = "ShinobiCharts"
  s.version      = "2.7.3"
  s.summary      = "ShinobiCharts"
  s.license      = 'Private'
  s.homepage     = "http://www.shinobicontrols.com"
  s.author       = { "Your Name" => "youremail@example.com" }
  s.vendored_frameworks = 'ShinobiCharts/ShinobiCharts.framework'
  s.frameworks   = 'QuartzCore', 'OpenGLES', 'CoreText'
  s.library      = 'c++'
end

The ShinobiCharts quick start guide lists the other frameworks it needs:

  • Security.framework (Trial Version only)
  • QuartzCore.framework
  • OpenGLES.framework
  • CoreText.framework
  • libc++.dylib

If you're using the trial version, you should also add Security to s.frameworks.

Podfile

Add this line to your Podfile:

pod 'ShinobiCharts', :path => 'Frameworks/ShinobiCharts/'

Run pod install, and you're good to go. ShinobiCharts should now be listed as a Development Pod in your workspace.

Tests

If you try to use ShinobiCharts in your unit tests, you'll probably see this error:

'ShinobiCharts/ShinobiCharts.h' file not found

To fix this, add the below line to "Framework Search Paths" on the test target (and make sure you set it to "recursive"):

${SRCROOT}/Frameworks/