Skip to content

Commit

Permalink
Merge pull request #81 from SurveyMonkey/2.0.6
Browse files Browse the repository at this point in the history
Remove deprecated UIWebView. Internal SDK improvements. Simple Survey…
  • Loading branch information
johnb-surveymonkey committed Apr 21, 2020
2 parents 1d9a1a3 + 376040f commit 6289d78
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
33 changes: 21 additions & 12 deletions SimpleSurvey/Simple Survey/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#define SAMPLE_APP @"Sample App"
#define SURVEY_HASH @"LBQK27G"

//Set to Angry Birds -- change to your app
#define APP_ID @"343200656"
//Set to Angry Birds 2 -- change to your app
#define APP_ID @"880047117"

@interface ViewController () <SMFeedbackDelegate, UIAlertViewDelegate>
@property (nonatomic, strong) SMFeedbackViewController * feedbackController;
Expand All @@ -25,20 +25,29 @@ @implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
/*
* Initialize your SMFeedbackViewController like this, pass the survey code from your Mobile SDK Collector on SurveyMonkey.com
*/
_feedbackController = [[SMFeedbackViewController alloc] initWithSurvey:SURVEY_HASH];
/*
* Setting the feedback controller's delegate allows you to detect when a user has completed your survey and to
* capture and consume their response in the form of an SMRespondent object
*/
_feedbackController.delegate = self;
[self getFeedbackController];
[[UINavigationBar appearance] setTintColor:[UIColor greenColor]];
[_feedbackController scheduleInterceptFromViewController:self withAppTitle:SAMPLE_APP];
}

- (IBAction)didTapTakeSurvey:(id)sender {
[_feedbackController presentFromViewController:self animated:YES completion:nil];
SMFeedbackViewController *feedbackViewController = [self getFeedbackController];
[feedbackViewController presentFromViewController:self animated:YES completion:nil];
}

- (SMFeedbackViewController *)getFeedbackController {
if (_feedbackController == nil) {
/*
* Initialize your SMFeedbackViewController like this, pass the survey code from your Mobile SDK Collector on SurveyMonkey.com
*/
_feedbackController = [[SMFeedbackViewController alloc] initWithSurvey:SURVEY_HASH];
/*
* Setting the feedback controller's delegate allows you to detect when a user has completed your survey and to
* capture and consume their response in the form of an SMRespondent object
*/
_feedbackController.delegate = self;
}
return _feedbackController;
}

- (void)respondentDidEndSurvey:(SMRespondent *)respondent error:(NSError *) error {
Expand Down
17 changes: 0 additions & 17 deletions SurveyMonkeyiOSSDK.framework/Versions/A/Headers/JSONSerializable.h

This file was deleted.

Binary file modified SurveyMonkeyiOSSDK.framework/Versions/A/SurveyMonkeyiOSSDK
Binary file not shown.
2 changes: 1 addition & 1 deletion surveymonkey-ios-sdk.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "surveymonkey-ios-sdk"
s.version = "2.0.5"
s.version = "2.0.6"
s.summary = "The SurveyMonkey Mobile Feedback SDK for iOS"
s.homepage = "https://github.com/SurveyMonkey/surveymonkey-ios-sdk"
s.license = 'MIT'
Expand Down

0 comments on commit 6289d78

Please sign in to comment.