iOS SDK survey
Objective-C Ruby
Latest commit 50b9292 Nov 16, 2016 @diegoserranoa diegoserranoa Fix method conflict on category
Category UIView+Constraints had methods name that caused conflicts
with 3rd party libraries or other extentions of the same kind.

Methods are now prefixed using Apple conventions:
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html\#//apple_ref/doc/uid/TP40011210-CH6-SW4

How to test
I'm including a sample project that contains an extention with a
method named the same way we have currently on the SDK (production)
To replicate crash:
Go to Podfile
Uncomment line
# gets latest version
[!] Unknown command: `WootricSDK`
Did you mean: trunk?

Usage:

    $ pod COMMAND

      CocoaPods, the Cocoa library package manager.

Commands:

    + cache         Manipulate the CocoaPods cache
    + deintegrate   Deintegrate CocoaPods from your project
    + env           Display pod environment
    + init          Generate a Podfile for the current directory
    + install       Install project dependencies according to versions from a
                    Podfile.lock
    + ipc           Inter-process communication
    + lib           Develop pods
    + list          List pods
    + outdated      Show outdated project dependencies
    + plugins       Show available CocoaPods plugins
    + repo          Manage spec-repositories
    + search        Search for pods
    + setup         Setup the CocoaPods environment
    + spec          Manage pod specs
    + trunk         Interact with the CocoaPods API (e.g. publishing new specs)
    + try           Try a Pod!
    + update        Update outdated project dependencies and create new Podfile.lock

Options:

    --silent        Show nothing
    --version       Show the version of the tool
    --verbose       Show more debugging information
    --no-ansi       Show output without ANSI codes
    --help          Show help banner of specified command
From terminal run [!] No `Podfile' found in the project directory.

This should get the SDK from Cocoapods

Change clientId, clientSecret and accountToken in ViewControler.swift

If you run the project the app should crash.

To fix this:comment [!] Unknown command: `WootricSDK`
Did you mean: trunk?

Usage:

    $ pod COMMAND

      CocoaPods, the Cocoa library package manager.

Commands:

    + cache         Manipulate the CocoaPods cache
    + deintegrate   Deintegrate CocoaPods from your project
    + env           Display pod environment
    + init          Generate a Podfile for the current directory
    + install       Install project dependencies according to versions from a
                    Podfile.lock
    + ipc           Inter-process communication
    + lib           Develop pods
    + list          List pods
    + outdated      Show outdated project dependencies
    + plugins       Show available CocoaPods plugins
    + repo          Manage spec-repositories
    + search        Search for pods
    + setup         Setup the CocoaPods environment
    + spec          Manage pod specs
    + trunk         Interact with the CocoaPods API (e.g. publishing new specs)
    + try           Try a Pod!
    + update        Update outdated project dependencies and create new Podfile.lock

Options:

    --silent        Show nothing
    --version       Show the version of the tool
    --verbose       Show more debugging information
    --no-ansi       Show output without ANSI codes
    --help          Show help banner of specified command
Uncomment line
and change YOUR_PATH to where the local WootricSDK is.
Run [!] No `Podfile' found in the project directory.
Now if you run the project there should be no crash and run normally.

Trello: https://trello.com/c/fjwDvdRe/975-ios-sdk-crashes-on-swift
Permalink
Failed to load latest commit information.
WootricSDK-Demo Fix edit score & WootricSDK-Demo project Oct 14, 2016
WootricSDK.xcworkspace Release 0.4.9 Feb 22, 2016
WootricSDK
.gitignore
CHANGELOG.md Fix method conflict on category Nov 17, 2016
CONTRIBUTING.md Add build & release to CONTRIBUTING Jul 12, 2016
LICENSE.md Initial commit v0.2 Sep 21, 2015
README.md
WootricSDK.podspec
circle.yml Release version 0.5.0 Mar 31, 2016

README.md

Wootric

Wootric survey

GitHub license GitHub release Build Status CocoaPods Compatible Platform Twitter

Requirements

  • iOS 7.0+

Demos

  • View the iOS demo video with referral prompt here.
  • View the iOS demo with App Store rating prompt here.

Installation

Using CocoaPods

The easiest way to get Wootric into your iOS project is to use CocoaPods.

  1. You can install CocoaPods using

    $ gem install cocoapods
  2. Create a file in your Xcode project called Podfile and add the following line:

    pod "WootricSDK", "~> 0.5.12"
  3. In your Xcode project directory run the following command:

    $ pod install
  4. CocoaPods should download and install the Wootric SDK, and create a new Xcode .xcworkspace file. Close your Xcode project and open the new .xcworkspace file.

Manually

If you want to, you can download the SDK and add it to your project without using any dependency manager. Note: Make sure you are using the latest version of Xcode (7.+) and targeting iOS 7.0 or higher.

  1. Download & unzip the Wootric SDK

  2. In your Xcode project, go to General and drop the WootricSDK.framework on Embedded Binaries

Xcode

Make sure the "Copy items if needed" checkbox is checked.

Initializing Wootric

WootricSDK task is to present a fully functional survey view with just a few lines of code.

  1. Import the SDK's header:

    #import <WootricSDK/WootricSDK.h>
  2. Configure the SDK with your client ID, secret and account token

    [Wootric configureWithClientID:<YOUR_CLIENT_ID> clientSecret:<YOUR_CLIENT_SECRET> accountToken:<YOUR_TOKEN>];

    You can find the client ID and client secret on your Wootric's account settings on the API section.

  3. To display the survey (if user is eligible - this check is built in the method) use:

    [Wootric showSurveyInViewController:<YOUR_VIEW_CONTROLLER>];

And that's it! You're good to go and start receiving customer's feedback from your iOS app.

For more information on class methods, please refer to Wootric's docs.

Example

// Import Wootric
@import WootricSDK;

// Inside your view controller's viewDidLoad method

[Wootric configureWithClientID:YOUR_CLIENT_ID clientSecret:YOUR_CLIENT_SECRET accountToken:YOUR_ACCOUNT_TOKEN];
[Wootric setEndUserEmail:@"nps@example.com"];
[Wootric setEndUserCreatedAt:@1234567890];
// Use only for testing
[Wootric forceSurvey:YES];
// show survey
[Wootric showSurveyInViewController:self];

License

The WootricSDK is released under the MIT license. See LICENSE for details.

Contribute

If you want to contribute, report a bug or request a feature, please see CONTRIBUTING for details.