Coder Social home page Coder Social logo

wooster / apptentive-osx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apptentive/apptentive-osx

2.0 2.0 0.0 6.21 MB

Apptentive framework for OS X.

Home Page: http://apptentive.com/

License: BSD 3-Clause "New" or "Revised" License

Objective-C 100.00%

apptentive-osx's Introduction

Apptentive Mac SDK

This Cocoa library for OS X allows you to add a quick and easy in-app-feedback mechanism to your Mac applications. Feedback is sent to the Apptentive web service.

Quickstart

Sample Application

The sample application FeedbackDemo demonstrates how to integrate the SDK with your application.

Required Frameworks

In order to use ApptentiveConnect, your project must link against the following frameworks:

  • AppKit
  • CoreGraphics
  • Foundation
  • QuartzCore
  • SystemConfiguration

Project Settings for Xcode 4

Check out the apptentive-osx project from GitHub. You'll either want to put it in a sub-folder of your project or, if you use git, add it as a git submodule.

In your target's Build Settings section, add the following to your Other Linker Flags settings:

-ObjC -all_load

Then, open your project in Xcode and drag the ApptentiveConnect.xcodeproj project file to your project:

Step 1

In your apps' target settings, add ApptentiveConnect to the "Target Dependencies" build phase:

Step 2

Next, add ApptentiveConnect.framework to the "Link Binary With Libraries" build phase:

Step 3

Finally, drag the ApptentiveConnect.framework from the ApptentiveConnect project to the "Copy Bundle Resources" build phase:

Step 4

Using the Library

ApptentiveConnect queues feedback and attempts to upload in the background. This is intended to provide as quick a mechanism for submitting feedback as possible.

In order for queued/interrupted feedback uploads to continue uploading, we recommending instantiating ATConnect and setting the API key at application startup, like:

#import <ApptentiveConnect/ATConnect.h>
// ...
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    ATConnect *connection = [ATConnect sharedConnection];
    connection.apiKey = kApptentiveAPIKey;
    // ...
}

Where kApptentiveAPIKey is an NSString containing your API key. As soon as you set the API key on the shared connection object, any queued feedback will start to upload, pending network availability. You also should not have to set the API key again on the shared connection object.

Now, you can show the Apptentive feedback UI with:

#import <ApptentiveConnect/ATConnect.h>
// ...
ATConnect *connection = [ATConnect sharedConnection];
[connection showFeedbackWindow:sender];

Easy!

App Rating Flow

ApptentiveConnect now provides an app rating flow similar to other projects such as appirator. To use it, add the ATAppRatingFlow.h header file to your project.

Then, at startup, instantiate a shared ATAppRatingFlow object with your iTunes app ID (see "Finding Your iTunes App ID" below):

#import <ApptentiveConnect/ATAppRatingFlow.h>
// ...
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    [[ATConnect sharedConnection] setApiKey:kApptentiveAPIKey];
    ATAppRatingFlow *ratingFlow = [ATAppRatingFlow sharedRatingFlowWithAppID:kApptentiveAppID];
    [ratingFlow appDidLaunch:YES];
}

You can also choose to show the dialog manually:

ATAppRatingFlow *ratingFlow = [ATAppRatingFlow sharedRatingFlowWithAppID:kApptentiveAppID];
[ratingFlow showEnjoymentDialog:sender];

This is helpful if you want to implement custom triggers for the ratings flow.

Finding Your iTunes App ID In iTunesConnect, go to "Manage Your Applications" and click on your application. In the "App Information" section of the page, look for the "Apple ID". It will be a number. This is your iTunes application ID.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.