Skip to content

Instantly share code, notes, and snippets.

@rmoriz
Last active December 14, 2015 21:58
Show Gist options
  • Save rmoriz/5154487 to your computer and use it in GitHub Desktop.
Save rmoriz/5154487 to your computer and use it in GitHub Desktop.
Uservoice iOS SDK & RubyMotion

HowTo use the Uservoice iOS SDK with RubyMotion

1. Register for e.g. the free plan on https://uservoice.com

2. checkout the sdk from github

cd your-motion-project/vendor
git clone https://github.com/uservoice/uservoice-iphone-sdk

3. add to your Rakefile:


  app.vendor_project('vendor/uservoice-iphone-sdk', :xcode)

  # Make sure these two frameworks are added somehow:
  app.frameworks << 'QuartzCore'
  app.frameworks << 'SystemConfiguration'

4. Call the Uservoice Action e.g. when a button is pressed:

Get your credentials from: https://< yoursubdomain >.uservoice.com/admin/settings#/channels

Trigger this code from e.g. a button:

class YourController < ...

  def support_page
     config = UVConfig.configWithSite("< your subdomain >.uservoice.com", andKey: "< key from uservoice >", andSecret: "< secret >")
     UserVoice.presentUserVoiceInterfaceForParentViewController(self, andConfig: config)
  end
@exocode
Copy link

exocode commented Apr 11, 2014

Thank you! Works well..

if you use ProMotion you can use it like so:

class HelpdeskScreen < PM::Screen

  def will_appear
    config = UVConfig.configWithSite("MYSUBDOMAIN.uservoice.com",
                                     andKey: "MYKEY",
                                     andSecret: "MYSECRET")

    UserVoice.presentUserVoiceInterfaceForParentViewController(self, andConfig: config)
  end

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment