Skip to content

Commit 4b978a6

Browse files
authored
Release 9.0.5 (#109)
1 parent f01d472 commit 4b978a6

13 files changed

+277
-205
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v9.0.5 (2020-01-27)
2+
3+
* Bump Native SDKs to v9.0.5
4+
15
## Version 9.0.1 (2019-12-12)
26

37
* Added enum `CustomTextPlaceHolderKey.reportQuestion` which maps to `InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION` on Android and `kIBGAskAQuestionStringName` on iOS
@@ -53,7 +57,7 @@
5357
## Version 1.0.0-beta.1 (2019-04-16)
5458

5559
* Adds New Sample App
56-
* Adds Replies Api mappings
60+
* Adds Replies Api mappings
5761
* Adds Chats Api mappings
5862
* Adds FeatureRequests Api mappings.
5963

@@ -91,7 +95,6 @@
9195

9296
* Adds more API mappings.
9397

94-
9598
## Version 0.0.1 (2019-03-07)
9699

97100
Adds the following APIs:

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ android {
3434
}
3535

3636
dependencies {
37-
implementation 'com.instabug.library:instabug:9.0.0.0'
37+
implementation 'com.instabug.library:instabug:9.0.5.0'
3838
testImplementation 'junit:junit:4.12'
3939
}

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 28
28+
compileSdkVersion 29
2929

3030
lintOptions {
3131
disable 'InvalidPackage'

example/android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
android.enableJetifier=true
22
android.useAndroidX=true
33
org.gradle.jvmargs=-Xmx1536M
4+
android.enableR8=true

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,17 +363,13 @@
363363
buildActionMask = 2147483647;
364364
files = (
365365
);
366-
inputFileListPaths = (
367-
);
368366
inputPaths = (
369367
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
370368
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
371369
"${PODS_ROOT}/Instabug/Instabug.framework",
372370
"${PODS_ROOT}/Instabug/Instabug.framework.dSYM",
373371
);
374372
name = "[CP] Embed Pods Frameworks";
375-
outputFileListPaths = (
376-
);
377373
outputPaths = (
378374
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
379375
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework",
@@ -425,17 +421,13 @@
425421
buildActionMask = 2147483647;
426422
files = (
427423
);
428-
inputFileListPaths = (
429-
);
430424
inputPaths = (
431425
"${PODS_ROOT}/Target Support Files/Pods-instabug_flutter_exampleUITests/Pods-instabug_flutter_exampleUITests-frameworks.sh",
432426
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
433427
"${PODS_ROOT}/Instabug/Instabug.framework",
434428
"${PODS_ROOT}/Instabug/Instabug.framework.dSYM",
435429
);
436430
name = "[CP] Embed Pods Frameworks";
437-
outputFileListPaths = (
438-
);
439431
outputPaths = (
440432
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
441433
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework",

example/ios/instabug_flutter_exampleUITests/instabug_flutter_exampleUITests.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ - (void)setUp {
2222
- (void)testInstabugSendBugReport {
2323

2424
XCUIApplication *app = [[XCUIApplication alloc] init];
25-
XCUIElement *ibgfloatingbuttonaccessibilityidentifierElement = app/*@START_MENU_TOKEN@*/.otherElements[@"IBGFloatingButtonAccessibilityIdentifier"]/*[[".otherElements[@\"Floating Button\"]",".otherElements[@\"IBGFloatingButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/;
26-
[ibgfloatingbuttonaccessibilityidentifierElement tap];
25+
[app.buttons[@"IBGFloatingButtonAccessibilityIdentifier"] tap];
26+
2727
[app.tables.staticTexts[@"Report a bug"] tap];
2828

2929
XCUIElement *textField = app.scrollViews.otherElements.textFields[@"IBGBugInputViewEmailFieldAccessibilityIdentifier"];
@@ -39,6 +39,7 @@ - (void)testInstabugSendBugReport {
3939
[self waitForElementToAppear:element withTimeout:5];
4040
}
4141

42+
4243
- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout
4344
{
4445
NSUInteger line = __LINE__;

ios/Classes/InstabugFlutterPlugin.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,14 @@
296296
*/
297297
+ (void)setSurveysEnabled:(NSNumber *)isEnabled ;
298298

299+
300+
/**
301+
* Sets url for the published iOS app on AppStore
302+
*
303+
* @param {appStoreURL} String
304+
*/
305+
+ (void)setAppStoreURL:(NSString *)appStoreURL ;
306+
299307
/**
300308
* Set Surveys auto-showing state, default state auto-showing enabled
301309
*

ios/Classes/InstabugFlutterPlugin.m

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,15 @@ + (void)setSurveysEnabled:(NSNumber *)isEnabled {
497497
IBGSurveys.enabled = boolValue;
498498
}
499499

500+
/**
501+
* Sets url for the published iOS app on AppStore
502+
*
503+
* @param {appStoreURL} String
504+
*/
505+
+ (void)setAppStoreURL:(NSString *)appStoreURL {
506+
IBGSurveys.appStoreURL = appStoreURL;
507+
}
508+
500509
/**
501510
* Set Surveys auto-showing state, default state auto-showing enabled
502511
*
@@ -537,13 +546,14 @@ + (void)setOnDismissSurveyCallback {
537546
* UI changes after the SDK's UI is dismissed.
538547
*/
539548
+ (void)getAvailableSurveys {
540-
NSArray<IBGSurvey *> *surveys = [IBGSurveys availableSurveys];
541-
NSMutableArray <NSString *> *surveysArray = [[NSMutableArray alloc] init];
542-
for (IBGSurvey * survey in surveys) {
543-
[surveysArray addObject:survey.title];
544-
}
545-
NSArray *result = [surveysArray copy];
546-
[channel invokeMethod:@"availableSurveysCallback" arguments:result];
549+
[IBGSurveys availableSurveysWithCompletionHandler:^(NSArray<IBGSurvey *> *availableSurveys) {
550+
NSMutableArray<NSDictionary*>* mappedSurveys = [[NSMutableArray alloc] init];
551+
for (IBGSurvey* survey in availableSurveys) {
552+
[mappedSurveys addObject:@{@"title": survey.title }];
553+
}
554+
NSArray *result = [mappedSurveys copy];
555+
[channel invokeMethod:@"availableSurveysCallback" arguments:result];
556+
}];
547557
}
548558

549559

ios/instabug_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A new flutter plugin project.
1515
s.source_files = 'Classes/**/*'
1616
s.public_header_files = 'Classes/**/*.h'
1717
s.dependency 'Flutter'
18-
s.dependency 'Instabug', '9.0.1'
18+
s.dependency 'Instabug', '9.0.5'
1919

2020
s.ios.deployment_target = '10.0'
2121
s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-framework "Flutter" -framework "Instabug"'}

lib/Surveys.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:async';
2+
import 'dart:io' show Platform;
23
import 'package:flutter/services.dart';
34

45
class Surveys {
@@ -122,4 +123,15 @@ class Surveys {
122123
await _channel.invokeMethod<Object>(
123124
'hasRespondedToSurveyWithToken:', params);
124125
}
126+
127+
/// iOS Only
128+
/// @summary Sets url for the published iOS app on AppStore, You can redirect
129+
/// NPS Surveys or AppRating Surveys to AppStore to let users rate your app on AppStore itself.
130+
/// [appStoreURL] A String url for the published iOS app on AppStore
131+
static void setAppStoreURL(String appStoreURL) async {
132+
if (Platform.isIOS) {
133+
final List<dynamic> params = <dynamic>[appStoreURL];
134+
await _channel.invokeMethod<Object>('setAppStoreURL:', params);
135+
}
136+
}
125137
}

pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: instabug_flutter
2-
version: 9.0.1
2+
version: 9.0.5
33
description: >-
44
Instabug is an in-app feedback and bug reporting tool for mobile apps.
55
With just a simple shake, your users or beta testers can report bugs or
@@ -27,4 +27,3 @@ flutter:
2727
plugin:
2828
androidPackage: com.instabug.instabugflutter
2929
pluginClass: InstabugFlutterPlugin
30-

0 commit comments

Comments
 (0)