Merge branch 'updated-user-config-handling' into disappearing-message-redesign

pull/941/head
Ryan Zhao 12 months ago
commit bc6099036b

@ -7,8 +7,8 @@
# build stage so XCode is able to build the dependency graph
#
# XCode's Pre-action scripts don't output anything into XCode so the only way to emit a useful
# error is to return a success status and have the project detect and log the error itself then
# log it, stopping the build at that point
# error is to **return a success status** and have the project detect and log the error itself
# then log it, stopping the build at that point
#
# The other step to get this to work properly is to ensure the framework in "Link Binary with
# Libraries" isn't using a relative directory, unfortunately there doesn't seem to be a good
@ -56,11 +56,12 @@ if [ ! -d "${SRCROOT}/LibSession-Util" ] || [ ! -d "${SRCROOT}/LibSession-Util/s
touch "${TARGET_BUILD_DIR}/libsession_util_error.log"
echo "error: Need to fetch LibSession-Util submodule (git submodule update --init --recursive)."
echo "error: Need to fetch LibSession-Util submodule (git submodule update --init --recursive)." > "${TARGET_BUILD_DIR}/libsession_util_error.log"
exit 1
exit 0
fi
else
are_submodules_valid() {
local PARENT_PATH=$1
local RELATIVE_PATH=$2
# Change into the path to check for it's submodules
cd "${PARENT_PATH}"
@ -68,10 +69,10 @@ else
# If there are no submodules then return success based on whether the folder has any content
if [ ${#SUB_MODULE_PATHS[@]} -eq 0 ]; then
if [ "$(ls -A "${SRCROOT}/LibSession-Util")" ]; then
return 1
else
if [[ ! -z "$(ls -A "${PARENT_PATH}")" ]]; then
return 0
else
return 1
fi
fi
@ -80,15 +81,16 @@ else
local CHILD_PATH="${SUB_MODULE_PATHS[$i]}"
# If the child path doesn't exist then it's invalid
if [ ! -d "${CHILD_PATH}" ]; then
if [ ! -d "${PARENT_PATH}/${CHILD_PATH}" ]; then
echo "info: Submodule '${RELATIVE_PATH}/${CHILD_PATH}' doesn't exist."
return 1
fi
are_submodules_valid "${PARENT_PATH}/${CHILD_PATH}"
are_submodules_valid "${PARENT_PATH}/${CHILD_PATH}" "${RELATIVE_PATH}/${CHILD_PATH}"
local RESULT=$?
if [ "${RESULT}" -eq 1 ]; then
echo "info: Submodule ${CHILD_PATH} is in an invalid state."
echo "info: Submodule '${RELATIVE_PATH}/${CHILD_PATH}' is in an invalid state."
return 1
fi
done
@ -97,7 +99,7 @@ else
}
# Validate the state of the submodules
are_submodules_valid "${SRCROOT}/LibSession-Util"
are_submodules_valid "${SRCROOT}/LibSession-Util" "LibSession-Util"
HAS_INVALID_SUBMODULE=$?
@ -112,7 +114,7 @@ else
touch "${TARGET_BUILD_DIR}/libsession_util_error.log"
echo "error: Submodules are in an invalid state, please delete 'LibSession-Util' and run 'git submodule update --init --recursive'."
echo "error: Submodules are in an invalid state, please delete 'LibSession-Util' and run 'git submodule update --init --recursive'." > "${TARGET_BUILD_DIR}/libsession_util_error.log"
exit 1
exit 0
fi
fi
fi

@ -4510,6 +4510,7 @@
buildConfigurationList = 453518761FC635DD00210559 /* Build configuration list for PBXNativeTarget "SessionShareExtension" */;
buildPhases = (
55CE11E14880742A24ADC127 /* [CP] Check Pods Manifest.lock */,
FD7692EC2A524320000E4B70 /* Validate pre-build actions */,
453518641FC635DD00210559 /* Sources */,
453518651FC635DD00210559 /* Frameworks */,
453518661FC635DD00210559 /* Resources */,
@ -4533,6 +4534,7 @@
buildConfigurationList = 7BC01A45241F40AB00BC7C55 /* Build configuration list for PBXNativeTarget "SessionNotificationServiceExtension" */;
buildPhases = (
18CDA58AE057F8C9AE71F46E /* [CP] Check Pods Manifest.lock */,
FD7692ED2A52433E000E4B70 /* Validate pre-build actions */,
7BC01A37241F40AB00BC7C55 /* Sources */,
7BC01A38241F40AB00BC7C55 /* Frameworks */,
7BC01A39241F40AB00BC7C55 /* Resources */,
@ -4555,6 +4557,7 @@
buildConfigurationList = C331FF262558F9D400070591 /* Build configuration list for PBXNativeTarget "SessionUIKit" */;
buildPhases = (
D5AFDC09857840D2D2631E2D /* [CP] Check Pods Manifest.lock */,
FD7692EF2A52436A000E4B70 /* Validate pre-build actions */,
C331FF162558F9D300070591 /* Headers */,
C331FF172558F9D300070591 /* Sources */,
C331FF182558F9D300070591 /* Frameworks */,
@ -4575,6 +4578,7 @@
buildConfigurationList = C33FD9B6255A548A00E217F9 /* Build configuration list for PBXNativeTarget "SignalUtilitiesKit" */;
buildPhases = (
5CE8055024B876590AED6DEA /* [CP] Check Pods Manifest.lock */,
FD7692EE2A524357000E4B70 /* Validate pre-build actions */,
C33FD9A6255A548A00E217F9 /* Headers */,
C33FD9A7255A548A00E217F9 /* Sources */,
C33FD9A8255A548A00E217F9 /* Frameworks */,
@ -4594,6 +4598,7 @@
buildConfigurationList = C3C2A5AA255385C100C340D1 /* Build configuration list for PBXNativeTarget "SessionSnodeKit" */;
buildPhases = (
77F55C879DAF28750120D343 /* [CP] Check Pods Manifest.lock */,
FD7692F02A524393000E4B70 /* Validate pre-build actions */,
C3C2A59A255385C100C340D1 /* Headers */,
C3C2A59B255385C100C340D1 /* Sources */,
C3C2A59C255385C100C340D1 /* Frameworks */,
@ -4613,6 +4618,7 @@
buildConfigurationList = C3C2A684255388CC00C340D1 /* Build configuration list for PBXNativeTarget "SessionUtilitiesKit" */;
buildPhases = (
446B0E16474DF9F15509BC64 /* [CP] Check Pods Manifest.lock */,
FD7692F12A5243AE000E4B70 /* Validate pre-build actions */,
C3C2A674255388CC00C340D1 /* Headers */,
C3C2A675255388CC00C340D1 /* Sources */,
C3C2A676255388CC00C340D1 /* Frameworks */,
@ -4652,6 +4658,7 @@
buildConfigurationList = D221A0BC169C9E5F00537ABF /* Build configuration list for PBXNativeTarget "Session" */;
buildPhases = (
351E727E03A8F141EA25FBF4 /* [CP] Check Pods Manifest.lock */,
FD7692EA2A524303000E4B70 /* Validate pre-build actions */,
FDE7214D287E50820093DF33 /* Lint Localizable.strings */,
D221A085169C9E5E00537ABF /* Sources */,
D221A086169C9E5E00537ABF /* Frameworks */,
@ -4682,6 +4689,7 @@
buildConfigurationList = FD71160F28D00BAE00B47552 /* Build configuration list for PBXNativeTarget "SessionTests" */;
buildPhases = (
19CD7B4EDC153293FB61CBA1 /* [CP] Check Pods Manifest.lock */,
FD7692F22A5243C3000E4B70 /* Validate pre-build actions */,
FD71160528D00BAE00B47552 /* Sources */,
FD71160628D00BAE00B47552 /* Frameworks */,
FD71160728D00BAE00B47552 /* Resources */,
@ -4702,6 +4710,7 @@
buildConfigurationList = FD83B9B627CF200A005E1583 /* Build configuration list for PBXNativeTarget "SessionUtilitiesKitTests" */;
buildPhases = (
EDDFB3BFBD5E1378BD03AAAB /* [CP] Check Pods Manifest.lock */,
FD7692F42A5243EC000E4B70 /* Validate pre-build actions */,
FD83B9AB27CF200A005E1583 /* Sources */,
FD83B9AC27CF200A005E1583 /* Frameworks */,
FD83B9AD27CF200A005E1583 /* Resources */,
@ -4723,6 +4732,7 @@
buildConfigurationList = FDC4389527B9FFC700C60D73 /* Build configuration list for PBXNativeTarget "SessionMessagingKitTests" */;
buildPhases = (
0E6C1748F41E48ED59563D96 /* [CP] Check Pods Manifest.lock */,
FD7692F32A5243DA000E4B70 /* Validate pre-build actions */,
FDC4388A27B9FFC700C60D73 /* Sources */,
FDC4388B27B9FFC700C60D73 /* Frameworks */,
FDC4388C27B9FFC700C60D73 /* Resources */,
@ -5350,6 +5360,206 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
FD7692EA2A524303000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692EC2A524320000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692ED2A52433E000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692EE2A524357000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692EF2A52436A000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692F02A524393000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692F12A5243AE000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692F22A5243C3000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692F32A5243DA000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FD7692F42A5243EC000E4B70 /* Validate pre-build actions */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Validate pre-build actions";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${TARGET_BUILD_DIR}/libsession_util_error.log\" ]; then\n read -r line < \"${TARGET_BUILD_DIR}/libsession_util_error.log\"\n echo \"${line}\"\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
FDD82C422A2085B900425F05 /* Add Commit Hash To Build Info Plist */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;

@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Build libSession"
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot; true&#10;">
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"

@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Build libSession"
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot; true&#10;">
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"

@ -11,7 +11,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Build libSession"
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot; true&#10;">
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"

@ -11,7 +11,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Build libSession"
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot; true&#10;">
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"

@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Build libSession"
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot; true&#10;">
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"

@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Build libSession"
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot; true&#10;">
scriptText = "&quot;${SRCROOT}/Scripts/build_libSession_util.sh&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"

Loading…
Cancel
Save