Adding ios to react native module
21
README.md
@ -7,17 +7,18 @@
|
|||||||
|
|
||||||
### Mostly automatic installation
|
### Mostly automatic installation
|
||||||
|
|
||||||
`$ react-native link instabug-reactnative`
|
`$ rnpm link instabug-reactnative`
|
||||||
|
|
||||||
### Manual installation
|
### Manual installation
|
||||||
|
|
||||||
|
|
||||||
#### iOS
|
#### iOS
|
||||||
|
|
||||||
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
|
1. Open your app `.xcodeproj` file
|
||||||
2. Go to `node_modules` ➜ `instabug-reactnative` and add `RNInstabugReactnative.xcodeproj`
|
2. Add `instabug.framework` and `instabug.bundle` from 'instabug-reactnative/ios' to the app project directory.
|
||||||
3. In XCode, in the project navigator, select your project. Add `libRNInstabugReactnative.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
3. In XCode, in the project navigator, select your project. Add `instabug.framework` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
||||||
4. Run your project (`Cmd+R`)<
|
4. 3. In XCode, in the project navigator, select your project. Add `instabug.bundle` to your project's `Build Phases` ➜ `Copy Bundle Resources`
|
||||||
|
5. Run your project (`Cmd+R`)<
|
||||||
|
|
||||||
#### Android
|
#### Android
|
||||||
|
|
||||||
@ -34,13 +35,17 @@
|
|||||||
compile project(':instabug-reactnative')
|
compile project(':instabug-reactnative')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```javascript
|
```javascript
|
||||||
import RNInstabugReactnative from 'instabug-reactnative';
|
import RNInstabugReactnative from 'instabug-reactnative';
|
||||||
|
|
||||||
// TODO: What do with the module?
|
class testApp extends Component {
|
||||||
RNInstabugReactnative;
|
constructor() {
|
||||||
|
super();
|
||||||
|
Instabug.startWithToken('0f0dc916bd9175e3b5d2fdf0cfa49a69', Instabug.IBGConstants.invocationEvent.FloatingButton);
|
||||||
|
}
|
||||||
|
...
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
227
index.ios.js
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
/**
|
||||||
|
* Sample React Native App
|
||||||
|
* https://github.com/facebook/react-native
|
||||||
|
* @flow
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { NativeModules } from 'react-native';
|
||||||
|
|
||||||
|
let {Instabug} = NativeModules;
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
startWithToken: function(toke, invocationEvent) {
|
||||||
|
Instabug.startWithToken(token, invocationEvent);
|
||||||
|
},
|
||||||
|
|
||||||
|
invoke: function() {
|
||||||
|
Instabug.invoke();
|
||||||
|
},
|
||||||
|
|
||||||
|
invokeWithInvocationMode: function(invocationMode) {
|
||||||
|
Instabug.invokeWithInvocationMode(invocationMode);
|
||||||
|
},
|
||||||
|
|
||||||
|
dismiss: function () {
|
||||||
|
Instabug.dismiss();
|
||||||
|
},
|
||||||
|
|
||||||
|
setFileAttachment: function(fileLocation) {
|
||||||
|
Instabug.setFileAttachment(fileLocation);
|
||||||
|
},
|
||||||
|
|
||||||
|
setUserData: function(userData) {
|
||||||
|
Instabug.setUserData(userData);
|
||||||
|
},
|
||||||
|
|
||||||
|
IBGLog: function(log) {
|
||||||
|
Instabug.IBGLog(log);
|
||||||
|
},
|
||||||
|
|
||||||
|
setUserStepsEnabled: function(isUserStepsEnabled) {
|
||||||
|
Instabug.setUserStepsEnabled(isUserStepsEnabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPreSendingHandler: function(handler) {
|
||||||
|
Instabug.setPreSendingHandler(handler);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPreInvocationHandler: function(handler) {
|
||||||
|
Instabug.setPreInvocationHandler(handler);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPostInvocatioHandler: function(handler) {
|
||||||
|
Instabug.setPostInvocatioHandler(handler);
|
||||||
|
},
|
||||||
|
|
||||||
|
showIntroMessage: function() {
|
||||||
|
Instabug.showIntroMessage();
|
||||||
|
},
|
||||||
|
|
||||||
|
setUserEmail: function(userEmail) {
|
||||||
|
Instabug.setUserEmail(userEmail);
|
||||||
|
},
|
||||||
|
|
||||||
|
setUserName: function(userName) {
|
||||||
|
Instabug.setUserName(userName);
|
||||||
|
},
|
||||||
|
|
||||||
|
setWillSkipScreenshotAnnotation: function(willSkipeScreenshotAnnotation) {
|
||||||
|
Instabug.setWillSkipScreenshotAnnotation(willSkipeScreenshotAnnotation);
|
||||||
|
},
|
||||||
|
|
||||||
|
getUnreadMessagesCount: function() {
|
||||||
|
var count = 0;
|
||||||
|
returnCallBack = function(response) {
|
||||||
|
count = response;
|
||||||
|
}
|
||||||
|
|
||||||
|
Instabug.getUnreadMessagesCount(returnCallBack);
|
||||||
|
|
||||||
|
return count;
|
||||||
|
},
|
||||||
|
|
||||||
|
setInvocationEvent: function(invocationEvent) {
|
||||||
|
Instabug.setInvocationEvent(invocationEvent);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPushNotificationsEnabled: function(isPushNotificationEnabled) {
|
||||||
|
Instabug.setPushNotificationsEnabled(isPushNotificationEnabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
setEmailFieldRequired: function(isEmailFieldRequired) {
|
||||||
|
Instabug.setEmailFieldRequired(isEmailFieldRequired);
|
||||||
|
},
|
||||||
|
|
||||||
|
setCommentFieldRequired: function(isCommentFieldRequired) {
|
||||||
|
Instabug.setCommentFieldRequired(isCommentFieldRequired);
|
||||||
|
},
|
||||||
|
|
||||||
|
setShakingThresholdForiPhone: function(iphoneThreshold, ipadThreshold) {
|
||||||
|
Instabug.setShakingThresholdForiPhone(iphoneThreshold, ipadThreshold);
|
||||||
|
},
|
||||||
|
|
||||||
|
setFloatingButtonEdge: function(floatingButtonEdge, offsetFromTop) {
|
||||||
|
Instabug.setFloatingButtonEdge(floatingButtonEdge, offsetFromTop);
|
||||||
|
},
|
||||||
|
|
||||||
|
setLocal: function(local) {
|
||||||
|
Instabug.setLocal(local);
|
||||||
|
},
|
||||||
|
|
||||||
|
setIntroMessageEnabled: function(isIntroMessageEnabled) {
|
||||||
|
Instabug.setIntroMessageEnabled(isIntroMessageEnabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
setColorTheme: function(colorTheme) {
|
||||||
|
Instabug.setColorTheme(colorTheme);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Make sure to test it
|
||||||
|
setPrimaryColor: function(primaryColor) {
|
||||||
|
Instabug.setPrimaryColor(primaryColor);
|
||||||
|
},
|
||||||
|
|
||||||
|
addTags: function(tags) {
|
||||||
|
Instabug.addTags(tags);
|
||||||
|
},
|
||||||
|
|
||||||
|
// TODO: research this: vvvv
|
||||||
|
// + (void)setScreenshotCapturingHandler:(UIImage *(^)())screenshotCapturingHandler;
|
||||||
|
|
||||||
|
resetTags: function () {
|
||||||
|
Instabug.resetTags();
|
||||||
|
},
|
||||||
|
|
||||||
|
getTags: function() {
|
||||||
|
var tags = [];
|
||||||
|
returnCallBack = function(response) {
|
||||||
|
tags = response;
|
||||||
|
}
|
||||||
|
|
||||||
|
Instabug.getUnreadMessagesCount(returnCallBack);
|
||||||
|
|
||||||
|
return tags;
|
||||||
|
},
|
||||||
|
|
||||||
|
setStringToKey: function(string, key) {
|
||||||
|
Instabug.setString(string, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
replaceKeyWithString: function(string, key) {
|
||||||
|
Instabug.setString(string, key);
|
||||||
|
},
|
||||||
|
|
||||||
|
// TODO: investigate doing it in more like JS pattern
|
||||||
|
setAttachmentTypesEnabled: function(screenshot, extraScreenshot, galleryImage, screenRecording) {
|
||||||
|
Instabug.setAttachmentTypesEnabledScreenShot(screenshot, extraScreenshot, galleryImage, screenRecording);
|
||||||
|
},
|
||||||
|
|
||||||
|
setChatNotificationEnabled: function(isChatNotificationEnabled) {
|
||||||
|
Instabug.setChatNotificationEnabled(isChatNotificationEnabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
// TODO: investigate doing it in more like JS pattern
|
||||||
|
setPromptOptions: function(isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled) {
|
||||||
|
Instabug.setPromptOptionsEnabledWithBug(isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
isInstabugNotification: function(notification) {
|
||||||
|
var ibgNotifcation = false;
|
||||||
|
returnCallBack = function(response) {
|
||||||
|
ibgNotifcation = response;
|
||||||
|
}
|
||||||
|
|
||||||
|
Instabug.isInstabugNotification(returnCallBack);
|
||||||
|
|
||||||
|
return ibgNotifcation;
|
||||||
|
},
|
||||||
|
|
||||||
|
IBGConstants: {
|
||||||
|
invocationEvent: {
|
||||||
|
None: Instabug.invocationEventNone,
|
||||||
|
Shake: Instabug.invocationEventShake,
|
||||||
|
Screenshot: Instabug.invocationEventScreenshot,
|
||||||
|
TwoFingersSwipe: Instabug.invocationEventTwoFingersSwipe,
|
||||||
|
RightEdgePan: Instabug.invocationEventRightEdgePan,
|
||||||
|
FloatingButton: Instabug.invocationEventFloatingButton
|
||||||
|
},
|
||||||
|
dismissType: {
|
||||||
|
Submit: Instabug.dismissTypeSubmit,
|
||||||
|
Cancel: Instabug.dismissTypeCancel,
|
||||||
|
AddAttachment: Instabug.dismissTypeAddAttachment
|
||||||
|
},
|
||||||
|
reportType: {
|
||||||
|
Bug: Instabug.reportTypeBug,
|
||||||
|
Feedback: Instabug.reportTypeFeedback
|
||||||
|
},
|
||||||
|
invocationMode: {
|
||||||
|
NA: Instabug.invocationModeNA,
|
||||||
|
NewBug: Instabug.invocationModeNewBug,
|
||||||
|
NewFeedback: Instabug.invocationModeNewFeedback,
|
||||||
|
NewChat: Instabug.invocationModeNewChat,
|
||||||
|
ChatsList: Instabug.invocationModeChatsList
|
||||||
|
},
|
||||||
|
local: {
|
||||||
|
Arabic: Instabug.localArabic,
|
||||||
|
ChineseSimplified: Instabug.localChineseSimplified,
|
||||||
|
ChineseTraditional: Instabug.localChineseTraditional,
|
||||||
|
Czech: Instabug.localCzech,
|
||||||
|
Danish: Instabug.localDanish,
|
||||||
|
English: Instabug.localEnglish,
|
||||||
|
French: Instabug.localFrench,
|
||||||
|
German: Instabug.localGerman,
|
||||||
|
Italian: Instabug.localItalian,
|
||||||
|
Japanese: Instabug.localJapanese,
|
||||||
|
Polish: Instabug.localPolish,
|
||||||
|
PortugueseBrazil: Instabug.localPortugueseBrazil,
|
||||||
|
Russian: Instabug.localRussian,
|
||||||
|
Spanish: Instabug.localSpanish,
|
||||||
|
Swedish: Instabug.localSwedish,
|
||||||
|
Turkish: Instabug.localTurkish
|
||||||
|
},
|
||||||
|
colorTheme: {
|
||||||
|
Light: Instabug.colorThemeLight,
|
||||||
|
Dark: Instabug.colorThemeDark
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
ios/Instabug.bundle/Add_Attachment.png
Normal file
After Width: | Height: | Size: 494 B |
BIN
ios/Instabug.bundle/Add_Attachment@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
ios/Instabug.bundle/Add_Attachment@3x.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
ios/Instabug.bundle/IBG-FloatingButton.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
ios/Instabug.bundle/IBG-FloatingButton@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
ios/Instabug.bundle/IBG-FloatingButton@3x.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
ios/Instabug.bundle/IBG-record-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
ios/Instabug.bundle/IBG-record-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
ios/Instabug.bundle/IBG-record-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
ios/Instabug.bundle/IBG-record.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
ios/Instabug.bundle/IBG-record@2x.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
ios/Instabug.bundle/IBG-record@3x.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
ios/Instabug.bundle/IBG-stop-record-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
ios/Instabug.bundle/IBG-stop-record-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
ios/Instabug.bundle/IBG-stop-record-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ios/Instabug.bundle/IBG-stop-record.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
ios/Instabug.bundle/IBG-stop-record@2x.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
ios/Instabug.bundle/IBG-stop-record@3x.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ios/Instabug.bundle/IBGActionSheetCell.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGActionSheetView-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGAttachmentButton.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGBugVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGChatCell-iPad.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGChatCell.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGChatVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGChatsVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGErrorOverlayView.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGFullScreenImageView.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGInboundCell.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGMessageTableViewCell.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGMessagesView.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGOutboundCell.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGPoweredByView.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGPromptCell.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGPromptVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGReplyView-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGScreenshotVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGUnnotifiedMessagesAlertView.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGVideoPlaybackView.nib
generated
Normal file
BIN
ios/Instabug.bundle/IBGVoiceNoteRecordingView-iPhone.nib
generated
Normal file
BIN
ios/Instabug.bundle/InAppBug-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 723 B |
BIN
ios/Instabug.bundle/InAppBug-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Instabug.bundle/InAppBug-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
ios/Instabug.bundle/InAppBug.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
ios/Instabug.bundle/InAppBug@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
ios/Instabug.bundle/InAppBug@3x.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
ios/Instabug.bundle/InAppFeedback-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 720 B |
BIN
ios/Instabug.bundle/InAppFeedback-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Instabug.bundle/InAppFeedback-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
ios/Instabug.bundle/InAppFeedback.png
Normal file
After Width: | Height: | Size: 663 B |
BIN
ios/Instabug.bundle/InAppFeedback@2x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
ios/Instabug.bundle/InAppFeedback@3x.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
ios/Instabug.bundle/InAppGrayAvatar.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
ios/Instabug.bundle/InAppGrayAvatar@2x.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
ios/Instabug.bundle/InAppGrayAvatar@3x.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
ios/Instabug.bundle/InAppScreenshotPlaceholder.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
ios/Instabug.bundle/InAppScreenshotPlaceholder@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Instabug.bundle/InAppScreenshotPlaceholder@3x.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
ios/Instabug.bundle/InAppVideoPlaceholder.png
Normal file
After Width: | Height: | Size: 618 B |
BIN
ios/Instabug.bundle/InAppVideoPlaceholder@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Instabug.bundle/InAppVideoPlaceholder@3x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
ios/Instabug.bundle/Info.plist
Normal file
115
ios/Instabug.bundle/Instabug_dsym_upload.sh
Executable file
@ -0,0 +1,115 @@
|
|||||||
|
# Copyright 2014 Instabug, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# * In the project editor, select your target.
|
||||||
|
# * Click "Build Phases" at the top of the project editor.
|
||||||
|
# * Click "+" button in the top left corner.
|
||||||
|
# * Choose "New Run Script Build Phase."
|
||||||
|
# * Uncomment and paste the following script.
|
||||||
|
#
|
||||||
|
# --- INVOCATION SCRIPT BEGIN ---
|
||||||
|
# # SKIP_SIMULATOR_BUILDS=1
|
||||||
|
# SCRIPT_SRC=$(find "$PROJECT_DIR" -name 'Instabug_dsym_upload.sh' | head -1)
|
||||||
|
# if [ ! "${SCRIPT_SRC}" ]; then
|
||||||
|
# echo "Instabug: err: script not found. Make sure that you're including Instabug.bundle in your project directory"
|
||||||
|
# exit 1
|
||||||
|
# fi
|
||||||
|
# source "${SCRIPT_SRC}"
|
||||||
|
# --- INVOCATION SCRIPT END ---
|
||||||
|
|
||||||
|
echo "Instabug: Started uploading dSYM"
|
||||||
|
|
||||||
|
# Check for simulator builds
|
||||||
|
if [ "$EFFECTIVE_PLATFORM_NAME" == "-iphonesimulator" ]; then
|
||||||
|
if [ "${SKIP_SIMULATOR_BUILDS}" ] && [ "${SKIP_SIMULATOR_BUILDS}" -eq 1 ]; then
|
||||||
|
echo "Instabug: Skipping simulator build"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check to make sure the app token exists
|
||||||
|
if [ ! "${APP_TOKEN}" ]; then
|
||||||
|
APP_TOKEN=$(grep -r 'Instabug startWithToken:@\"[0-9a-zA-Z]*\"' ./ -m 1 | grep -o '\"[0-9a-zA-Z]*\"' | cut -d "\"" -f 2)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! "${APP_TOKEN}" ]; then
|
||||||
|
APP_TOKEN=$(grep -r 'Instabug.startWithToken(\"[0-9a-zA-Z]*\"' ./ -m 1 | grep -o '\"[0-9a-zA-Z]*\"' | cut -d "\"" -f 2)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! "${APP_TOKEN}" ] || [ -z "${APP_TOKEN}" ];then
|
||||||
|
echo "Instabug: err: APP_TOKEN not found. Make sure you've added the SDK initialization line [Instabug startWithToken: invocationEvent:]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Instabug: found APP_TOKEN=${APP_TOKEN}"
|
||||||
|
|
||||||
|
# Check internet connection
|
||||||
|
if [ "`curl -s https://api.instabug.com | grep status | grep -c OK`" != "1" ]; then
|
||||||
|
echo "ERROR connecting to api.instabug.com."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create temp directory if not exists
|
||||||
|
CURRENT_USER=$(whoami| tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]')
|
||||||
|
TEMP_ROOT="/tmp/Instabug-${CURRENT_USER}"
|
||||||
|
if [ ! -d "${TEMP_ROOT}" ]; then
|
||||||
|
mkdir "${TEMP_ROOT}"
|
||||||
|
fi
|
||||||
|
TEMP_DIRECTORY="${TEMP_ROOT}/$EXECUTABLE_NAME"
|
||||||
|
if [ ! -d "${TEMP_DIRECTORY}" ]; then
|
||||||
|
mkdir "${TEMP_DIRECTORY}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check dSYM file
|
||||||
|
if [ ! "${DSYM_PATH}" ]; then
|
||||||
|
if [ ! "${DWARF_DSYM_FOLDER_PATH}" ] || [ ! "${DWARF_DSYM_FILE_NAME}" ]; then
|
||||||
|
echo "Instabug: err: DWARF_DSYM_FOLDER_PATH or DWARF_DSYM_FILE_NAME not defined"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
DSYM_PATH=${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
|
||||||
|
fi
|
||||||
|
echo "Instabug: found DSYM_PATH=${DSYM_PATH}"
|
||||||
|
|
||||||
|
# Check if UUIDs exists
|
||||||
|
DSYM_UUIDs=$(dwarfdump --uuid "${DSYM_PATH}" | cut -d' ' -f2)
|
||||||
|
DSYM_UUIDs_PATH="${TEMP_DIRECTORY}/UUIDs.dat"
|
||||||
|
DSYM_UUIDs_TOKEN="${DSYM_UUIDs//$'\n'/-${APP_TOKEN}$'\n'}"-${APP_TOKEN}
|
||||||
|
|
||||||
|
if [ -f "${DSYM_UUIDs_PATH}" ]; then
|
||||||
|
if grep -Fxq "${DSYM_UUIDs_TOKEN}" "${DSYM_UUIDs_PATH}"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create dSYM .zip file
|
||||||
|
DSYM_PATH_ZIP="${TEMP_DIRECTORY}/$DWARF_DSYM_FILE_NAME.zip"
|
||||||
|
if [ ! -d "$DSYM_PATH" ]; then
|
||||||
|
echo "Instabug: err: dSYM not found: ${DSYM_PATH}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Instabug: Compressing dSYM file..."
|
||||||
|
(/usr/bin/zip --recurse-paths --quiet "${DSYM_PATH_ZIP}" "${DSYM_PATH}") || exit 0
|
||||||
|
|
||||||
|
# Upload dSYM
|
||||||
|
echo "Instabug: Uploading dSYM file..."
|
||||||
|
ENDPOINT="https://api.instabug.com/api/ios/v1/dsym"
|
||||||
|
STATUS=$(curl "${ENDPOINT}" --write-out %{http_code} --silent --output /dev/null -F dsym=@"${DSYM_PATH_ZIP}" -F token="${APP_TOKEN}")
|
||||||
|
if [ $STATUS -ne 200 ]; then
|
||||||
|
echo "Instabug: err: dSYM archive not succesfully uploaded."
|
||||||
|
echo "Instabug: deleting temporary dSYM archive..."
|
||||||
|
/bin/rm -f "${DSYM_PATH_ZIP}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove temp dSYM archive
|
||||||
|
echo "Instabug: deleting temporary dSYM archive..."
|
||||||
|
/bin/rm -f "${DSYM_PATH_ZIP}"
|
||||||
|
|
||||||
|
# Save UUIDs
|
||||||
|
echo "${DSYM_UUIDs_TOKEN}" >> "${DSYM_UUIDs_PATH}"
|
||||||
|
|
||||||
|
# Finalize
|
||||||
|
echo "Instabug: dSYM upload complete."
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "Instabug: err: an error was encountered uploading dSYM"
|
||||||
|
exit 0
|
||||||
|
fi
|
BIN
ios/Instabug.bundle/NoConnection-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
ios/Instabug.bundle/NoConnection-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
ios/Instabug.bundle/NoConnection-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
ios/Instabug.bundle/NoConnection.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
ios/Instabug.bundle/NoConnection@2x.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
ios/Instabug.bundle/NoConnection@3x.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
ios/Instabug.bundle/NoMessages-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
ios/Instabug.bundle/NoMessages-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
ios/Instabug.bundle/NoMessages-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
ios/Instabug.bundle/NoMessages.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
ios/Instabug.bundle/NoMessages@2x.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
ios/Instabug.bundle/NoMessages@3x.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
ios/Instabug.bundle/Shake-43.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
ios/Instabug.bundle/Whitebubble-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 230 B |
BIN
ios/Instabug.bundle/Whitebubble-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 424 B |
BIN
ios/Instabug.bundle/Whitebubble-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 681 B |
BIN
ios/Instabug.bundle/ar.lproj/InfoPlist.strings
Normal file
BIN
ios/Instabug.bundle/ar.lproj/Localizable.strings
Normal file
BIN
ios/Instabug.bundle/audio_placeholder.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
ios/Instabug.bundle/audio_placeholder@2x.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
ios/Instabug.bundle/audio_placeholder_3x.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ios/Instabug.bundle/backbtn.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
ios/Instabug.bundle/backbtn@2x.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
ios/Instabug.bundle/backbtn@3x.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
ios/Instabug.bundle/bug.png
Normal file
After Width: | Height: | Size: 844 B |
BIN
ios/Instabug.bundle/bug@2x.png
Normal file
After Width: | Height: | Size: 891 B |
BIN
ios/Instabug.bundle/bug@3x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
ios/Instabug.bundle/cancel_attachment-IBGColorThemeDark.png
Normal file
After Width: | Height: | Size: 533 B |
BIN
ios/Instabug.bundle/cancel_attachment-IBGColorThemeDark@2x.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
ios/Instabug.bundle/cancel_attachment-IBGColorThemeDark@3x.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
ios/Instabug.bundle/cancel_attachment.png
Normal file
After Width: | Height: | Size: 713 B |
BIN
ios/Instabug.bundle/cancel_attachment@2x.png
Normal file
After Width: | Height: | Size: 778 B |
BIN
ios/Instabug.bundle/cancel_attachment@3x.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
ios/Instabug.bundle/capture_image.png
Normal file
After Width: | Height: | Size: 1.1 KiB |