File tree Expand file tree Collapse file tree 7 files changed +23
-5
lines changed
Expand file tree Collapse file tree 7 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1+ ## 0.25.0 (2023-02-21)
2+
3+ ### Changes:
4+
5+ - Add support for custom first question
6+
17## 0.24.1 (2023-02-16)
28
39### Changes:
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ The easiest way to get Wootric into your iOS project is to use [CocoaPods](http:
2828
29292 . Create a file in your Xcode project called Podfile and add the following line:
3030 ```ruby
31- pod "WootricSDK", "~> 0.24.1 "
31+ pod "WootricSDK", "~> 0.25.0 "
3232 ```
3333
34343 . In your Xcode project directory run the following command:
Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = 'WootricSDK'
3- s . version = '0.24.1 '
3+ s . version = '0.25.0 '
44 s . license = 'MIT'
55 s . summary = 'Wootric SDK for displaying survey for end user.'
66 s . homepage = 'https://github.com/Wootric/WootricSDK-iOS'
Original file line number Diff line number Diff line change 972972 IPHONEOS_DEPLOYMENT_TARGET = 12.0;
973973 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
974974 MACH_O_TYPE = mh_dylib;
975- MARKETING_VERSION = 0.24.1 ;
975+ MARKETING_VERSION = 0.25.0 ;
976976 MODULEMAP_FILE = "";
977977 PRODUCT_BUNDLE_IDENTIFIER = "com.wootric.$(PRODUCT_NAME:rfc1034identifier)";
978978 PRODUCT_NAME = "$(TARGET_NAME)";
999999 IPHONEOS_DEPLOYMENT_TARGET = 12.0;
10001000 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10011001 MACH_O_TYPE = mh_dylib;
1002- MARKETING_VERSION = 0.24.1 ;
1002+ MARKETING_VERSION = 0.25.0 ;
10031003 MODULEMAP_FILE = "";
10041004 PRODUCT_BUNDLE_IDENTIFIER = "com.wootric.$(PRODUCT_NAME:rfc1034identifier)";
10051005 PRODUCT_NAME = "$(TARGET_NAME)";
Original file line number Diff line number Diff line change @@ -136,7 +136,11 @@ + (UILabel *)questionLabelWithSettings:(WTRSettings *)settings font:(UIFont *)fo
136136 tempLabel.numberOfLines = 0 ;
137137 tempLabel.lineBreakMode = NSLineBreakByWordWrapping;
138138 tempLabel.font = font;
139- tempLabel.text = [settings questionText ];
139+ if (settings.customFirstQuestionEnabled && settings.customFirstQuestion != nil ) {
140+ tempLabel.text = [settings customFirstQuestion ];
141+ } else {
142+ tempLabel.text = [settings questionText ];
143+ }
140144 [tempLabel setTranslatesAutoresizingMaskIntoConstraints: NO ];
141145
142146 return tempLabel;
Original file line number Diff line number Diff line change 4141@property (nonatomic , strong ) NSString *customQuestion;
4242@property (nonatomic , strong ) NSString *externalId;
4343@property (nonatomic , strong ) NSString *phoneNumber;
44+ @property (nonatomic , strong ) NSString *customFirstQuestion;
4445@property (nonatomic , strong ) NSNumber *registeredPercentage;
4546@property (nonatomic , strong ) NSNumber *visitorPercentage;
4647@property (nonatomic , strong ) NSNumber *resurveyThrottle;
6061@property (nonatomic , assign ) BOOL skipFeedbackScreenForPromoter;
6162@property (nonatomic , assign ) BOOL passScoreAndTextToURL;
6263@property (nonatomic , assign ) BOOL showPoweredBy;
64+ @property (nonatomic , assign ) BOOL customFirstQuestionEnabled;
6365@property (nonatomic , strong ) UIColor *sendButtonBackgroundColor;
6466@property (nonatomic , strong ) UIColor *sliderColor;
6567@property (nonatomic , strong ) UIColor *socialSharingColor;
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ - (instancetype)init {
6565 _scale = [self scoreRules ][_surveyType][0 ];
6666 _showOptOut = NO ;
6767 _showPoweredBy = YES ;
68+ _customFirstQuestionEnabled = NO ;
6869 }
6970
7071 return self;
@@ -89,6 +90,7 @@ - (void)parseDataFromSurveyServer:(NSDictionary *)surveyServerSettings {
8990 NSString *languageCodeFromServer = surveyServerSettings[@" settings" ][@" language" ];
9091 NSInteger delay = _timeDelay > -1 ? _timeDelay : [surveyServerSettings[@" settings" ][@" time_delay" ] integerValue ];
9192 _showPoweredBy = [surveyServerSettings[@" settings" ][@" powered_by" ] boolValue ];
93+ _customFirstQuestionEnabled = [surveyServerSettings[@" settings" ][@" custom_first_question_enabled" ] boolValue ];
9294
9395 if (surveyTypeFromSurvey) {
9496 _surveyType = surveyTypeFromSurvey;
@@ -136,6 +138,10 @@ - (void)parseDataFromSurveyServer:(NSDictionary *)surveyServerSettings {
136138 if (languageCodeFromServer) {
137139 _languageCode = languageCodeFromServer;
138140 }
141+
142+ if (_customFirstQuestionEnabled && surveyServerSettings[@" settings" ][@" custom_first_question" ] != nil ) {
143+ _customFirstQuestion = surveyServerSettings[@" settings" ][@" custom_first_question" ];
144+ }
139145 }
140146}
141147
You can’t perform that action at this time.
0 commit comments