🤝 Merge pull request #65 from Instabug/fix/add_binary_in_library
Fix/add binary in library
@ -4,12 +4,7 @@
|
||||
## Installation
|
||||
This section explains how to install Instabug SDK into your React Native application.
|
||||
|
||||
1. Add Instabug SDK to your iOS project by adding this to your [**Podfile**](https://guides.cocoapods.org/syntax/podfile.html) (You can skip this step if you are building an Android app only).
|
||||
```bash
|
||||
pod 'Instabug', '~> 7.0'
|
||||
```
|
||||
|
||||
2. Open the terminal and navigate to your React Native Directory. Then run the following command.
|
||||
1. Open the terminal and navigate to your React Native Directory. Then run the following command.
|
||||
|
||||
```bash
|
||||
npm install instabug-reactnative
|
||||
@ -20,6 +15,8 @@ or
|
||||
yarn add instabug-reactnative
|
||||
```
|
||||
|
||||
2. Install [**Ruby**](https://www.ruby-lang.org/en/documentation/installation/). (You can skip this step if you're building for Android only)
|
||||
|
||||
3. Link the bridging files in the npm package to the ios project use the following command.
|
||||
```bash
|
||||
react-native link instabug-reactnative
|
||||
|
259
ios/Instabug.framework/Headers/IBGTypes.h
Normal file
@ -0,0 +1,259 @@
|
||||
//
|
||||
// IBGTypes.h
|
||||
// Instabug
|
||||
//
|
||||
// Copyright: (c) 2013-2016 by Instabug, Inc., all rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// ------------------------------
|
||||
/// @name User-facing Strings Keys
|
||||
/// ------------------------------
|
||||
|
||||
// Predefined keys to be used to override any of the user-facing strings in the SDK. See + [Instabug setValue:forStringWithKey]
|
||||
|
||||
extern NSString * const kIBGStartAlertTextStringName;
|
||||
extern NSString * const kIBGShakeStartAlertTextStringName;
|
||||
extern NSString * const kIBGTwoFingerSwipeStartAlertTextStringName;
|
||||
extern NSString * const kIBGEdgeSwipeStartAlertTextStringName;
|
||||
extern NSString * const kIBGScreenshotStartAlertTextStringName;
|
||||
extern NSString * const kIBGInvalidEmailMessageStringName;
|
||||
extern NSString * const kIBGInvalidEmailTitleStringName;
|
||||
extern NSString * const kIBGInvalidCommentMessageStringName;
|
||||
extern NSString * const kIBGInvalidCommentTitleStringName;
|
||||
extern NSString * const kIBGInvocationTitleStringName;
|
||||
extern NSString * const kIBGTalkToUsStringName;
|
||||
extern NSString * const kIBGReportBugStringName;
|
||||
extern NSString * const kIBGReportFeedbackStringName;
|
||||
extern NSString * const kIBGEmailFieldPlaceholderStringName;
|
||||
extern NSString * const kIBGCommentFieldPlaceholderForBugReportStringName;
|
||||
extern NSString * const kIBGCommentFieldPlaceholderForFeedbackStringName;
|
||||
extern NSString * const kIBGChatReplyFieldPlaceholderStringName;
|
||||
extern NSString * const kIBGAddScreenRecordingMessageStringName;
|
||||
extern NSString * const kIBGAddVoiceMessageStringName;
|
||||
extern NSString * const kIBGAddImageFromGalleryStringName;
|
||||
extern NSString * const kIBGAddExtraScreenshotStringName;
|
||||
extern NSString * const kIBGAudioRecordingPermissionDeniedTitleStringName;
|
||||
extern NSString * const kIBGAudioRecordingPermissionDeniedMessageStringName;
|
||||
extern NSString * const kIBGScreenRecordingPermissionDeniedMessageStringName;
|
||||
extern NSString * const kIBGMicrophonePermissionAlertSettingsButtonTitleStringName;
|
||||
extern NSString * const kIBGMicrophonePermissionAlertLaterButtonTitleStringName;
|
||||
extern NSString * const kIBGChatsTitleStringName;
|
||||
extern NSString * const kIBGTeamStringName;
|
||||
extern NSString * const kIBGRecordingMessageToHoldTextStringName;
|
||||
extern NSString * const kIBGRecordingMessageToReleaseTextStringName;
|
||||
extern NSString * const kIBGMessagesNotificationTitleSingleMessageStringName;
|
||||
extern NSString * const kIBGMessagesNotificationTitleMultipleMessagesStringName;
|
||||
extern NSString * const kIBGScreenshotTitleStringName;
|
||||
extern NSString * const kIBGOkButtonTitleStringName;
|
||||
extern NSString * const kIBGCancelButtonTitleStringName;
|
||||
extern NSString * const kIBGThankYouAlertTitleStringName;
|
||||
extern NSString * const kIBGThankYouAlertMessageStringName;
|
||||
extern NSString * const kIBGAudioStringName;
|
||||
extern NSString * const kIBGScreenRecordingStringName;
|
||||
extern NSString * const kIBGImageStringName;
|
||||
extern NSString * const kIBGReachedMaximimNumberOfAttachmentsTitleStringName;
|
||||
extern NSString * const kIBGReachedMaximimNumberOfAttachmentsMessageStringName;
|
||||
extern NSString * const kIBGSurveyEnterYourAnswerTextPlaceholder;
|
||||
extern NSString * const kIBGSurveyNoAnswerTitle;
|
||||
extern NSString * const kIBGSurveyNoAnswerMessage;
|
||||
extern NSString * const kIBGSurveySubmitTitle;
|
||||
extern NSString * const kIBGVideoPressRecordTitle;
|
||||
extern NSString * const kIBGLowDiskStorageTitle;
|
||||
extern NSString * const kIBGLowDiskStorageMessage;
|
||||
extern NSString * const kIBGCollectingDataText;
|
||||
extern NSString * const kIBGExtraFieldIsRequiredText;
|
||||
extern NSString * const kIBGExtraFieldMissingDataText;
|
||||
|
||||
/// -----------
|
||||
/// @name Enums
|
||||
/// -----------
|
||||
|
||||
/**
|
||||
The event used to invoke the feedback form.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGInvocationEvent) {
|
||||
/** No event will be registered to show the feedback form, you'll need to code your own and call the method showFeedbackForm. */
|
||||
IBGInvocationEventNone,
|
||||
/** Shaking the device while in any screen to show the feedback form. */
|
||||
IBGInvocationEventShake,
|
||||
/** Taking a screenshot using the Home+Lock buttons while in any screen to show the feedback form. */
|
||||
IBGInvocationEventScreenshot,
|
||||
/** Swiping two fingers left while in any screen to show the feedback form. */
|
||||
IBGInvocationEventTwoFingersSwipeLeft,
|
||||
/** Swiping one finger left from the right edge of the screen to show the feedback form, substituted with IBGInvocationEventTwoFingersSwipeLeft on iOS 6.1.3 and earlier. */
|
||||
IBGInvocationEventRightEdgePan,
|
||||
/** Shows a floating button on top of all views, when pressed it takes a screenshot. */
|
||||
IBGInvocationEventFloatingButton
|
||||
};
|
||||
|
||||
/**
|
||||
The color theme of the different UI elements.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGColorTheme) {
|
||||
IBGColorThemeLight,
|
||||
IBGColorThemeDark
|
||||
};
|
||||
|
||||
/**
|
||||
The mode used upon invocating the SDK.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGInvocationMode) {
|
||||
IBGInvocationModeNA,
|
||||
IBGInvocationModeBugReporter __attribute__((deprecated)),
|
||||
IBGInvocationModeFeedbackSender __attribute__((deprecated)),
|
||||
IBGInvocationModeNewBug,
|
||||
IBGInvocationModeNewFeedback,
|
||||
IBGInvocationModeNewChat,
|
||||
IBGInvocationModeChatsList
|
||||
};
|
||||
|
||||
/**
|
||||
Type of report to be submitted.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGReportType) {
|
||||
IBGReportTypeBug,
|
||||
IBGReportTypeFeedback
|
||||
};
|
||||
|
||||
/**
|
||||
Type of feedback to be submitted.
|
||||
*/
|
||||
__attribute__((deprecated))
|
||||
typedef NS_ENUM(NSInteger, IBGFeedbackType) {
|
||||
IBGFeedbackTypeBug,
|
||||
IBGFeedbackTypeFeedback,
|
||||
IBGFeedbackTypeCrash
|
||||
};
|
||||
|
||||
/**
|
||||
State of Issue after SDK dismiss.
|
||||
*/
|
||||
__attribute__((deprecated))
|
||||
typedef NS_ENUM(NSInteger, IBGIssueState) {
|
||||
/** Issue is submitted */
|
||||
IBGIssueSubmitted,
|
||||
/** Issue is cancelled */
|
||||
IBGIssueCancelled,
|
||||
/** Issue is in progress, adding extra screenshot */
|
||||
IBGIssueInProgress
|
||||
};
|
||||
|
||||
/**
|
||||
Type of SDK dismiss.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGDismissType) {
|
||||
/** Dismissed after report submit */
|
||||
IBGDismissTypeSubmit,
|
||||
/** Dismissed via cancel */
|
||||
IBGDismissTypeCancel,
|
||||
/** Dismissed while taking screenshot */
|
||||
IBGDismissTypeAddAttachment
|
||||
};
|
||||
|
||||
/**
|
||||
Supported locales.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGLocale) {
|
||||
IBGLocaleArabic,
|
||||
IBGLocaleChineseSimplified,
|
||||
IBGLocaleChineseTaiwan,
|
||||
IBGLocaleChineseTraditional,
|
||||
IBGLocaleCzech,
|
||||
IBGLocaleDanish,
|
||||
IBGLocaleDutch,
|
||||
IBGLocaleEnglish,
|
||||
IBGLocaleFrench,
|
||||
IBGLocaleGerman,
|
||||
IBGLocaleItalian,
|
||||
IBGLocaleJapanese,
|
||||
IBGLocaleKorean,
|
||||
IBGLocaleNorwegian,
|
||||
IBGLocalePolish,
|
||||
IBGLocalePortugese,
|
||||
IBGLocalePortugueseBrazil,
|
||||
IBGLocaleRussian,
|
||||
IBGLocaleSlovak,
|
||||
IBGLocaleSpanish,
|
||||
IBGLocaleSwedish,
|
||||
IBGLocaleTurkish
|
||||
};
|
||||
|
||||
/**
|
||||
Verbosity level of the SDK debug logs. This has nothing to do with IBGLog, and only affect the logs used to debug the
|
||||
SDK itself.
|
||||
|
||||
Defaults to IBGSDKDebugLogsLevelError. Make sure you only use IBGSDKDebugLogsLevelError or IBGSDKDebugLogsLevelNone in
|
||||
production builds.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGSDKDebugLogsLevel) {
|
||||
IBGSDKDebugLogsLevelVerbose,
|
||||
IBGSDKDebugLogsLevelDebug,
|
||||
IBGSDKDebugLogsLevelError,
|
||||
IBGSDKDebugLogsLevelNone
|
||||
};
|
||||
|
||||
/**
|
||||
Keys for publicly-facing strings in the SDK.
|
||||
Deprecated. Use NSString constants like IBGShakeStartAlertTextStringName and IBGEmailFieldPlaceholderStringName instead.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGString) {
|
||||
IBGStringShakeHint,
|
||||
IBGStringSwipeHint,
|
||||
IBGStringEdgeSwipeStartHint,
|
||||
IBGStringStartAlertText,
|
||||
IBGStringInvalidEmailMessage,
|
||||
IBGStringInvalidEmailTitle,
|
||||
IBGStringInvalidCommentMessage,
|
||||
IBGStringInvalidCommentTitle,
|
||||
IBGStringInvocationHeader,
|
||||
IBGStringTalkToUs,
|
||||
IBGStringReportBug,
|
||||
IBGStringReportFeedback,
|
||||
IBGStringEmailFieldHint,
|
||||
IBGStringCommentFieldHintForBugReport,
|
||||
IBGStringCommentFieldHintForFeedback,
|
||||
IBGStringAddScreenRecordingMessage,
|
||||
IBGStringAddVoiceMessage,
|
||||
IBGStringAddImageFromGallery,
|
||||
IBGStringAddExtraScreenshot,
|
||||
IBGStringAudioRecordingPermissionDeniedTitle,
|
||||
IBGStringAudioRecordingPermissionDeniedMessage,
|
||||
IBGStringScreenRecordingPermissionDeniedMessage,
|
||||
IBGStringMicrophonePermissionAlertSettingsButtonTitle,
|
||||
IBGStringMicrophonePermissionAlertLaterButtonTitle,
|
||||
IBGStringChatsHeaderTitle,
|
||||
IBGStringTeam,
|
||||
IBGStringRecordingMessageToHoldText,
|
||||
IBGStringRecordingMessageToReleaseText,
|
||||
IBGStringMessagesNotification,
|
||||
IBGStringMessagesNotificationAndOthers,
|
||||
IBGStringScreenshotHeaderTitle,
|
||||
IBGStringOkButtonTitle,
|
||||
IBGStringCancelButtonTitle,
|
||||
IBGStringThankYouText,
|
||||
IBGStringThankYouAlertText,
|
||||
IBGStringAudio,
|
||||
IBGStringScreenRecording,
|
||||
IBGStringImage,
|
||||
IBGStringSurveyEnterYourAnswerPlaceholder,
|
||||
kIBGStringSurveyNoAnswerTitle,
|
||||
kIBGStringSurveyNoAnswerMessage,
|
||||
kIBGStringSurveySubmitTitle,
|
||||
kIBGStringVideoPressRecordTitle,
|
||||
kIBGStringLowDiskStorageTitle,
|
||||
kIBGStringLowDiskStorageMessage,
|
||||
kIBGStringCollectingDataText,
|
||||
kIBGStringExtraFieldIsRequiredText,
|
||||
kIBGStringExtraFieldMissingDataText
|
||||
};
|
||||
|
||||
/**
|
||||
The prompt option selected in Instabug prompt.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, IBGPromptOption) {
|
||||
IBGPromptOptionChat,
|
||||
IBGPromptOptionBug,
|
||||
IBGPromptOptionFeedback
|
||||
};
|
1146
ios/Instabug.framework/Headers/Instabug.h
Normal file
BIN
ios/Instabug.framework/Info.plist
Normal file
BIN
ios/Instabug.framework/Instabug
Executable file
BIN
ios/Instabug.framework/Instabug.bundle/IBGActionSheetCell.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGActionSheetVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGAttachmentButton.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGBugVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGChatCell.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGChatVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGChatsVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGFullScreenImageViewController.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGMessagesView.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGPoweredByView.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGPromptCell.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGPromptVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGReplyView-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGReportCategoriesVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGScreenshotVC-iPhone.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGUnnotifiedMessagesAlertView.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGVideoPlaybackViewController.nib
generated
Normal file
BIN
ios/Instabug.framework/Instabug.bundle/IBGVoiceNoteRecordingViewController-iPhone.nib
generated
Normal file
After Width: | Height: | Size: 633 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.3 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/InAppVideoPlaceholder.png
Normal file
After Width: | Height: | Size: 618 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/Info.plist
Normal file
145
ios/Instabug.framework/Instabug.bundle/Instabug_dsym_upload.sh
Executable file
@ -0,0 +1,145 @@
|
||||
# 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
|
||||
DSYMS_DIR="${TEMP_DIRECTORY}/dSYM"
|
||||
|
||||
if [ -d "${DSYMS_DIR}" ]; then
|
||||
rm -rf "${DSYMS_DIR}"
|
||||
fi
|
||||
|
||||
mkdir "$DSYMS_DIR"
|
||||
DSYM_UUIDs=""
|
||||
SEPARATOR=$'\n'
|
||||
DSYM_UUIDs_PATH="${TEMP_DIRECTORY}/UUIDs.dat"
|
||||
|
||||
|
||||
find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | (while read -r file
|
||||
do
|
||||
UUIDs=$(dwarfdump --uuid "${file}" | cut -d ' ' -f2)
|
||||
if [ -f "${DSYM_UUIDs_PATH}" ]; then
|
||||
for uuid in $UUIDs
|
||||
do
|
||||
UUIDTOKEN="${uuid}"-"${APP_TOKEN}"
|
||||
if ! grep -w "${UUIDTOKEN}" "${DSYM_UUIDs_PATH}" ; then
|
||||
cp -r "${file}" "${DSYMS_DIR}"
|
||||
DSYM_UUIDs+=$uuid$SEPARATOR
|
||||
fi
|
||||
done
|
||||
else
|
||||
cp -r "${file}" "${DSYMS_DIR}"
|
||||
DSYM_UUIDs+=${UUIDs}$SEPARATOR
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $DSYM_UUIDs ]; then
|
||||
rm -rf "${DSYMS_DIR}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
DSYM_UUIDs_TOKEN="${DSYM_UUIDs//${SEPARATOR}/-${APP_TOKEN}$'\n'}"
|
||||
|
||||
# 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}" "${DSYMS_DIR}") || exit 0
|
||||
|
||||
# Upload dSYM
|
||||
echo "Instabug: Uploading dSYM file..."
|
||||
ENDPOINT="https://api.instabug.com/api/sdk/v3/symbols_files"
|
||||
STATUS=$(curl "${ENDPOINT}" --write-out %{http_code} --silent --output /dev/null -F symbols_file=@"${DSYM_PATH_ZIP}" -F application_token="${APP_TOKEN}")
|
||||
if [ $STATUS -ne 200 ]; then
|
||||
echo "Instabug: err: dSYM archive not succesfully uploaded."
|
||||
echo "Instabug: deleting temporary dSYM archive..."
|
||||
rm -f "${DSYM_PATH_ZIP}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Remove temp dSYM archive and dSYM DIR
|
||||
echo "Instabug: deleting temporary dSYM archive..."
|
||||
rm -f "${DSYM_PATH_ZIP}"
|
||||
rm -rf "${DSYMS_DIR}"
|
||||
|
||||
# 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
|
||||
)
|
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 681 B |
BIN
ios/Instabug.framework/Instabug.bundle/audio_placeholder.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/audio_placeholder@2x.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/audio_placeholder_3x.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/graybubble.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
ios/Instabug.framework/Instabug.bundle/graybubble@2x.png
Normal file
After Width: | Height: | Size: 575 B |
BIN
ios/Instabug.framework/Instabug.bundle/graybubble@3x.png
Normal file
After Width: | Height: | Size: 894 B |
BIN
ios/Instabug.framework/Instabug.bundle/instabuglogo.png
Normal file
After Width: | Height: | Size: 749 B |
BIN
ios/Instabug.framework/Instabug.bundle/instabuglogo@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/instabuglogo@3x.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/notificationEdge.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
ios/Instabug.framework/Instabug.bundle/notificationEdge@2x.png
Normal file
After Width: | Height: | Size: 380 B |
BIN
ios/Instabug.framework/Instabug.bundle/notificationEdge@3x.png
Normal file
After Width: | Height: | Size: 690 B |
BIN
ios/Instabug.framework/Instabug.bundle/powerplushome.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/shake.png
Normal file
After Width: | Height: | Size: 14 KiB |
62
ios/Instabug.framework/Instabug.bundle/strip-frameworks.sh
Normal file
@ -0,0 +1,62 @@
|
||||
################################################################################
|
||||
#
|
||||
# Copyright 2015 Realm Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# This script strips all non-valid architectures from dynamic libraries in
|
||||
# the application's `Frameworks` directory.
|
||||
#
|
||||
# The following environment variables are required:
|
||||
#
|
||||
# BUILT_PRODUCTS_DIR
|
||||
# FRAMEWORKS_FOLDER_PATH
|
||||
# VALID_ARCHS
|
||||
# EXPANDED_CODE_SIGN_IDENTITY
|
||||
|
||||
|
||||
# Signs a framework with the provided identity
|
||||
code_sign() {
|
||||
# Use the current code_sign_identitiy
|
||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||
echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1"
|
||||
/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1"
|
||||
}
|
||||
|
||||
echo "Stripping frameworks"
|
||||
cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
||||
|
||||
for file in $(find . -type f -perm +111); do
|
||||
# Skip non-dynamic libraries
|
||||
if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then
|
||||
continue
|
||||
fi
|
||||
# Get architectures for current file
|
||||
archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)"
|
||||
stripped=""
|
||||
for arch in $archs; do
|
||||
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
|
||||
# Strip non-valid architectures in-place
|
||||
lipo -remove "$arch" -output "$file" "$file" || exit 1
|
||||
stripped="$stripped $arch"
|
||||
fi
|
||||
done
|
||||
if [[ "$stripped" != "" ]]; then
|
||||
echo "Stripped $file of architectures:$stripped"
|
||||
if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
|
||||
code_sign "${file}"
|
||||
fi
|
||||
fi
|
||||
done
|
BIN
ios/Instabug.framework/Instabug.bundle/tap.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
ios/Instabug.framework/Instabug.bundle/tap@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/tap@3x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
ios/Instabug.framework/Instabug.bundle/twofingers.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
ios/Instabug.framework/InstabugDataModel.momd/VersionInfo.plist
Normal file
6
ios/Instabug.framework/Modules/module.modulemap
Normal file
@ -0,0 +1,6 @@
|
||||
framework module Instabug {
|
||||
umbrella header "Instabug.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
1465
ios/Instabug.framework/_CodeSignature/CodeResources
Normal file
@ -7,7 +7,7 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
248766471DA3E8ED00D93EDA /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 248766451DA3E8ED00D93EDA /* Instabug.framework */; };
|
||||
133CC8091F578E5C00CF3492 /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 248766451DA3E8ED00D93EDA /* Instabug.framework */; };
|
||||
24DF11FD1DA3A2F30056F77C /* InstabugReactBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DF11FA1DA3A2F30056F77C /* InstabugReactBridge.m */; };
|
||||
24DF11FE1DA3A2F30056F77C /* RCTConvert+InstabugEnums.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DF11FC1DA3A2F30056F77C /* RCTConvert+InstabugEnums.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
@ -39,7 +39,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
248766471DA3E8ED00D93EDA /* Instabug.framework in Frameworks */,
|
||||
133CC8091F578E5C00CF3492 /* Instabug.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -257,6 +257,7 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/../../../ios/Frameworks",
|
||||
"$(PROJECT_DIR)/../../../ios/Pods/Instabug",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../node_modules/react-native/React/**",
|
||||
@ -279,6 +280,7 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/../../../ios/Frameworks",
|
||||
"$(PROJECT_DIR)/../../../ios/Pods/Instabug",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../node_modules/react-native/React/**",
|
||||
|
47
link.rb
Normal file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env ruby
|
||||
begin
|
||||
require 'xcodeproj'
|
||||
rescue LoadError
|
||||
puts('xcodeproj doesn\'t exist')
|
||||
Kernel.exit(0)
|
||||
end
|
||||
require 'fileutils'
|
||||
|
||||
# Replace these with your values
|
||||
current_path = Dir.pwd
|
||||
project_path = Dir.glob("#{current_path}/ios/*.xcodeproj").first
|
||||
file_name = File.basename(project_path, ".xcodeproj")
|
||||
project_location = './ios/'+file_name+'.xcodeproj'
|
||||
target_name = file_name
|
||||
framework_root = '../node_modules/instabug-reactnative/ios'
|
||||
framework_name = 'Instabug.framework'
|
||||
|
||||
# Get useful variables
|
||||
project = Xcodeproj::Project.open(project_location)
|
||||
frameworks_group = project.groups.find { |group| group.display_name == 'Frameworks' }
|
||||
if frameworks_group == nil
|
||||
frameworks_group = project.new_group('Frameworks')
|
||||
end
|
||||
target = project.targets.find { |target| target.to_s == target_name }
|
||||
frameworks_build_phase = target.build_phases.find { |build_phase| build_phase.to_s == 'FrameworksBuildPhase' }
|
||||
|
||||
# Add new "Embed Frameworks" build phase to target
|
||||
embed_frameworks_build_phase = project.new(Xcodeproj::Project::Object::PBXCopyFilesBuildPhase)
|
||||
embed_frameworks_build_phase.name = 'Embed Frameworks'
|
||||
embed_frameworks_build_phase.symbol_dst_subfolder_spec = :frameworks
|
||||
target.build_phases << embed_frameworks_build_phase
|
||||
|
||||
# Add framework search path to target
|
||||
['Debug', 'Release'].each do |config|
|
||||
paths = ['$(inherited)', framework_root]
|
||||
target.build_settings(config)['FRAMEWORK_SEARCH_PATHS'] = paths
|
||||
end
|
||||
|
||||
# Add framework to target as "Embedded Frameworks"
|
||||
framework_ref = frameworks_group.new_file("#{framework_root}/#{framework_name}")
|
||||
build_file = embed_frameworks_build_phase.add_file_reference(framework_ref)
|
||||
frameworks_build_phase.add_file_reference(framework_ref)
|
||||
build_file.settings = { 'ATTRIBUTES' => ['CodeSignOnCopy', 'RemoveHeadersOnCopy'] }
|
||||
|
||||
# Save Xcode project
|
||||
project.save
|
@ -2,9 +2,6 @@
|
||||
"name": "instabug-reactnative",
|
||||
"version": "1.2.4",
|
||||
"description": "React Native plugin for integrating the Instabug SDK",
|
||||
"scripts": {
|
||||
"postinstall": "cd ../../ios && pod install"
|
||||
},
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -25,6 +22,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/Instabug/instabug-reactnative#readme",
|
||||
"rnpm": {
|
||||
"commands": {
|
||||
"postlink": "ruby ./node_modules/instabug-reactnative/link.rb || echo \"Ruby doesn't exist, if you're building this for Android only, then feel free to ignore this error, otherwise please install Ruby and run 'react-native link instabug-reactnative' again\""
|
||||
},
|
||||
"android": {
|
||||
"packageInstance": "\t\tnew RNInstabugReactnativePackage.Builder(\"YOUR_ANDROID_APPLICATION_TOKEN\",MainApplication.this)\n\t\t\t\t\t\t\t.setInvocationEvent(\"shake\")\n\t\t\t\t\t\t\t.setPrimaryColor(\"#1D82DC\")\n\t\t\t\t\t\t\t.setFloatingEdge(\"left\")\n\t\t\t\t\t\t\t.setFloatingButtonOffsetFromTop(250)\n\t\t\t\t\t\t\t.build()"
|
||||
}
|
||||
|