Skip to content

Commit 0896e9b

Browse files
fix: upload command
1 parent 8509081 commit 0896e9b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

plugin/src/withInstabug.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface PluginProps {
88
name?: string;
99
forceUploadSourceMaps?: boolean;
1010
addScreenRecordingBugReportingPermission?: boolean;
11+
addBugReportingIosMediaPermission?: boolean;
1112
}
1213

1314
const instabugPackage = require('../../package.json') as {
@@ -16,13 +17,18 @@ const instabugPackage = require('../../package.json') as {
1617
};
1718

1819
const withInstabugPlugin: ConfigPlugin<PluginProps> = (config, props = {}) => {
19-
const { forceUploadSourceMaps = false, addScreenRecordingBugReportingPermission = false } = props;
20+
const {
21+
forceUploadSourceMaps = false,
22+
addScreenRecordingBugReportingPermission = false,
23+
addBugReportingIosMediaPermission = true,
24+
} = props;
2025

2126
const sharedProps = {
2227
...props,
2328
name: instabugPackage.name,
2429
forceUploadSourceMaps,
2530
addScreenRecordingBugReportingPermission,
31+
addBugReportingIosMediaPermission,
2632
};
2733

2834
let updatedConfig = config;

plugin/src/withInstabugIOS.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,16 @@ export const withInstabugIOS: ConfigPlugin<PluginProps> = (config, props) => {
3535
});
3636

3737
// Add media permissions to Info.plist if enabled
38-
if (props.addScreenRecordingBugReportingPermission) {
38+
if (props.addBugReportingIosMediaPermission) {
3939
const instabugConfig = config.extra?.instabug ?? {};
4040

4141
const microphonePermission =
42-
instabugConfig.microphonePermission || 'This app needs access to your microphone.';
42+
instabugConfig.microphonePermission ||
43+
'This needs access to your microphone so you can attach voice notes.';
44+
4345
const photoLibraryPermission =
44-
instabugConfig.photoLibraryPermission || 'This app needs access to your photos.';
46+
instabugConfig.photoLibraryPermission ||
47+
'This needs access to your photo library so you can attach images.';
4548

4649
updatedConfig = withInfoPlist(updatedConfig, (configXcode) => {
4750
const plist = configXcode.ios.infoPlist ?? {};

0 commit comments

Comments
 (0)