From 868b4cc24e540dffd839ce1bceeca90cdf6d3338 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Mon, 3 Jul 2023 09:06:39 +1000 Subject: [PATCH 01/19] [WIP] Started looking at creating the CI config file --- .drone.jsonnet | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .drone.jsonnet diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 000000000..74ad7f5bf --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,74 @@ +local submodule_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=1']; + +local submodules = { + name: 'submodules', + image: 'drone/git', + commands: submodule_commands, +}; + +// cmake options for static deps mirror +local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https://oxen.rocks/deps ' else ''); + +// Macos build +local mac_builder(name, + build_type='Release', + werror=true, + cmake_extra='', + local_mirror=true, + extra_cmds=[], + jobs=6, + codesign='-DCODESIGN=OFF', + allow_fail=false) = { + kind: 'pipeline', + type: 'exec', + name: name, + platform: { os: 'darwin', arch: 'amd64' }, + steps: [ + { name: 'submodules', commands: submodule_commands }, + { + name: 'build', + environment: { SSH_KEY: { from_secret: 'SSH_KEY' } }, + commands: [ + 'echo "Building on ${DRONE_STAGE_MACHINE}"', + // If you don't do this then the C compiler doesn't have an include path containing + // basic system headers. WTF apple: + 'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"', + 'ulimit -n 1024', // because macos sets ulimit to 256 for some reason yeah idk + './contrib/mac-configure.sh ' + + ci_dep_mirror(local_mirror) + + (if build_type == 'Debug' then ' -DWARN_DEPRECATED=OFF ' else '') + + codesign, + 'cd build-mac', + // We can't use the 'package' target here because making a .dmg requires an active logged in + // macos gui to invoke Finder to invoke the partitioning tool to create a partitioned (!) + // disk image. Most likely the GUI is required because if you lose sight of how pretty the + // surface of macOS is you might see how ugly the insides are. + 'ninja -j' + jobs + ' assemble_gui', + 'cd ..', + ] + extra_cmds, + }, + ], +}; + + +[ + // TODO: Unit tests + // TODO: Build for UI testing + // TODO: Production build + { + kind: 'pipeline', + type: 'exec', + name: 'MacOS', + platform: { os: 'darwin', arch: 'amd64' }, + steps: [ + // TODO: Need a depth of 2? (libSession-util has it's own submodules) + { name: 'submodules', commands: submodule_commands }, + { + name: 'build', + commands: [ + 'echo "This is a test message"', + ], + }, + ], + }, +] \ No newline at end of file From 43b2aaf8bbb6f30300ae610e165f949f2c3c1add Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:03:42 +1000 Subject: [PATCH 02/19] Trying to progress on the CI builds Reworked the way libSession-util builds to use a static library and be less hacky Updated to the latest version of WebRTC-lib (no longer includes bitcode) Removed the 'skip_web_rtc_re_rsync' patch as it's no longer an issue since the bitcode was removed so the framework is much smaller --- .drone-static-upload.sh | 65 +++ .drone.jsonnet | 101 ++-- Podfile | 10 - Podfile.lock | 6 +- Scripts/build_libSession_util.sh | 234 +++++++--- Scripts/skip_web_rtc_re_rsync.patch | 12 - Session.xcodeproj/project.pbxproj | 433 ++++++++---------- .../xcshareddata/xcschemes/Session.xcscheme | 18 - .../xcschemes/SessionMessagingKit.xcscheme | 20 +- ...ssionNotificationServiceExtension.xcscheme | 18 - .../xcschemes/SessionShareExtension.xcscheme | 18 - .../xcschemes/SessionUtilitiesKit.xcscheme | 20 +- .../xcschemes/SignalUtilitiesKit.xcscheme | 20 +- .../Jobs/Types/ConfigurationSyncJob.swift | 1 - .../Open Groups/OpenGroupManagerSpec.swift | 2 +- 15 files changed, 475 insertions(+), 503 deletions(-) create mode 100644 .drone-static-upload.sh delete mode 100644 Scripts/skip_web_rtc_re_rsync.patch diff --git a/.drone-static-upload.sh b/.drone-static-upload.sh new file mode 100644 index 000000000..4730e5c30 --- /dev/null +++ b/.drone-static-upload.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Script used with Drone CI to upload build artifacts (because specifying all this in +# .drone.jsonnet is too painful). + + + +set -o errexit + +if [ -z "$SSH_KEY" ]; then + echo -e "\n\n\n\e[31;1mUnable to upload artifact: SSH_KEY not set\e[0m" + # Just warn but don't fail, so that this doesn't trigger a build failure for untrusted builds + exit 0 +fi + +echo "$SSH_KEY" >ssh_key + +set -o xtrace # Don't start tracing until *after* we write the ssh key + +chmod 600 ssh_key + +if [ -n "$DRONE_TAG" ]; then + # For a tag build use something like `session-ios-v1.2.3` + base="session-ios-$DRONE_TAG" +else + # Otherwise build a length name from the datetime and commit hash, such as: + # session-ios-20200522T212342Z-04d7dcc54 + base="session-ios-$(date --date=@$DRONE_BUILD_CREATED +%Y%m%dT%H%M%SZ)-${DRONE_COMMIT:0:9}" +fi + +mkdir -v "$base" + +# Copy over the build products +cp -av build/Build/Products/App\ Store\ Release-iphonesimulator/Session.app "$base" + +# tar dat shiz up yo +archive="$base.tar.xz" +tar cJvf "$archive" "$base" + +upload_to="oxen.rocks/${DRONE_REPO// /_}/${DRONE_BRANCH// /_}" + +# sftp doesn't have any equivalent to mkdir -p, so we have to split the above up into a chain of +# -mkdir a/, -mkdir a/b/, -mkdir a/b/c/, ... commands. The leading `-` allows the command to fail +# without error. +upload_dirs=(${upload_to//\// }) +put_debug= +mkdirs= +dir_tmp="" +for p in "${upload_dirs[@]}"; do + dir_tmp="$dir_tmp$p/" + mkdirs="$mkdirs +-mkdir $dir_tmp" +done +if [ -e "$base-debug-symbols.tar.xz" ] ; then + put_debug="put $base-debug-symbols.tar.xz $upload_to" +fi +sftp -i ssh_key -b - -o StrictHostKeyChecking=off drone@oxen.rocks <&1 # Save original stdout + +# Ensure the build directory exists (in case we need it before XCode creates it) +mkdir -p "${TARGET_BUILD_DIR}/libSessionUtil" + +# Remove any old build errors +rm -rf "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_output.log" + +# Restore stdout and stderr and redirect it to the 'libsession_util_output.log' file +exec &> "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_output.log" + +# Define a function to echo a message. +function echo_message() { + exec 1>&3 # Restore stdout + echo "$1" + exec >> "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_output.log" # Redirect all output to the log file +} + +echo_message "info: Validating build requirements" + +set -x # Ensure the build directory exists (in case we need it before XCode creates it) mkdir -p "${TARGET_BUILD_DIR}" -# Remove any old build errors -rm -rf "${TARGET_BUILD_DIR}/libsession_util_error.log" - -# First ensure cmake is installed (store the error in a log and exit with a success status - xcode will output the error) -echo "info: Validating build requirements" - if ! which cmake > /dev/null; then - touch "${TARGET_BUILD_DIR}/libsession_util_error.log" - echo "error: cmake is required to build, please install (can install via homebrew with 'brew install cmake')." - echo "error: cmake is required to build, please install (can install via homebrew with 'brew install cmake')." > "${TARGET_BUILD_DIR}/libsession_util_error.log" + echo_message "error: cmake is required to build, please install (can install via homebrew with 'brew install cmake')." exit 0 fi # Check if we have the `LibSession-Util` submodule checked out and if not (depending on the 'SHOULD_AUTO_INIT_SUBMODULES' argument) perform the checkout if [ ! -d "${SRCROOT}/LibSession-Util" ] || [ ! -d "${SRCROOT}/LibSession-Util/src" ] || [ ! "$(ls -A "${SRCROOT}/LibSession-Util")" ]; then - if [ "${SHOULD_AUTO_INIT_SUBMODULES}" != "false" ] & command -v git >/dev/null 2>&1; then - echo "info: LibSession-Util submodule doesn't exist, resetting and checking out recusively now" - git submodule foreach --recursive git reset --hard - git submodule update --init --recursive - echo "info: Checkout complete" - else - 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 0 - fi + echo_message "error: Need to fetch LibSession-Util submodule (git submodule update --init --recursive)." + exit 0 else are_submodules_valid() { local PARENT_PATH=$1 @@ -82,7 +86,7 @@ else # If the child path doesn't exist then it's invalid if [ ! -d "${PARENT_PATH}/${CHILD_PATH}" ]; then - echo "info: Submodule '${RELATIVE_PATH}/${CHILD_PATH}' doesn't exist." + echo_message "info: Submodule '${RELATIVE_PATH}/${CHILD_PATH}' doesn't exist." return 1 fi @@ -90,7 +94,7 @@ else local RESULT=$? if [ "${RESULT}" -eq 1 ]; then - echo "info: Submodule '${RELATIVE_PATH}/${CHILD_PATH}' is in an invalid state." + echo_message "info: Submodule '${RELATIVE_PATH}/${CHILD_PATH}' is in an invalid state." return 1 fi done @@ -104,18 +108,8 @@ else HAS_INVALID_SUBMODULE=$? if [ "${HAS_INVALID_SUBMODULE}" -eq 1 ]; then - if [ "${SHOULD_AUTO_INIT_SUBMODULES}" != "false" ] && command -v git >/dev/null 2>&1; then - echo "info: Submodules are in an invalid state, resetting and checking out recusively now" - cd "${SRCROOT}/LibSession-Util" - git submodule foreach --recursive git reset --hard - git submodule update --init --recursive - echo "info: Checkout complete" - 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 0 - fi + echo_message "error: Submodules are in an invalid state, please delete 'LibSession-Util' and run 'git submodule update --init --recursive'." + exit 0 fi fi @@ -125,49 +119,143 @@ echo "info: Checking for changes to source" NEW_SOURCE_HASH=$(find "${SRCROOT}/LibSession-Util/src" -type f -exec md5 {} + | awk '{print $NF}' | sort | md5 | awk '{print $NF}') NEW_HEADER_HASH=$(find "${SRCROOT}/LibSession-Util/include" -type f -exec md5 {} + | awk '{print $NF}' | sort | md5 | awk '{print $NF}') -if [ -f "${TARGET_BUILD_DIR}/libsession_util_source_hash.log" ]; then - read -r OLD_SOURCE_HASH < "${TARGET_BUILD_DIR}/libsession_util_source_hash.log" +if [ -f "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_source_hash.log" ]; then + read -r OLD_SOURCE_HASH < "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_source_hash.log" fi -if [ -f "${TARGET_BUILD_DIR}/libsession_util_header_hash.log" ]; then - read -r OLD_HEADER_HASH < "${TARGET_BUILD_DIR}/libsession_util_header_hash.log" +if [ -f "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_header_hash.log" ]; then + read -r OLD_HEADER_HASH < "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_header_hash.log" fi -if [ -f "${TARGET_BUILD_DIR}/libsession_util_archs.log" ]; then - read -r OLD_ARCHS < "${TARGET_BUILD_DIR}/libsession_util_archs.log" +if [ -f "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_archs.log" ]; then + read -r OLD_ARCHS < "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_archs.log" fi -# Start the libSession-util build if it doesn't already exists -if [ "${NEW_SOURCE_HASH}" != "${OLD_SOURCE_HASH}" ] || [ "${NEW_HEADER_HASH}" != "${OLD_HEADER_HASH}" ] || [ "${ARCHS[*]}" != "${OLD_ARCHS}" ] || [ ! -d "${TARGET_BUILD_DIR}/libsession-util.xcframework" ]; then - echo "info: Build is not up-to-date - creating new build" - echo "" - - # Remove any existing build files (just to be safe) - rm -rf "${TARGET_BUILD_DIR}/libsession-util.a" - rm -rf "${TARGET_BUILD_DIR}/libsession-util.xcframework" - rm -rf "${BUILD_DIR}/libsession-util.xcframework" - - # Trigger the new build - cd "${SRCROOT}/LibSession-Util" - result=$(./utils/ios.sh "libsession-util" false) - - if [ $? -ne 0 ]; then - touch "${TARGET_BUILD_DIR}/libsession_util_error.log" - echo "error: Failed to build libsession-util (See details in '${TARGET_BUILD_DIR}/pre-action-output.log')." - echo "error: Failed to build libsession-util (See details in '${TARGET_BUILD_DIR}/pre-action-output.log')." > "${TARGET_BUILD_DIR}/libsession_util_error.log" - exit 0 - fi - - # Save the updated source hash to disk to prevent rebuilds when there were no changes - echo "${NEW_SOURCE_HASH}" > "${TARGET_BUILD_DIR}/libsession_util_source_hash.log" - echo "${NEW_HEADER_HASH}" > "${TARGET_BUILD_DIR}/libsession_util_header_hash.log" - echo "${ARCHS[*]}" > "${TARGET_BUILD_DIR}/libsession_util_archs.log" - echo "" - echo "info: Build complete" -else - echo "info: Build is up-to-date" +# If all of the hashes match, the archs match and there is a library file then we can just stop here +if [ "${NEW_SOURCE_HASH}" == "${OLD_SOURCE_HASH}" ] && [ "${NEW_HEADER_HASH}" == "${OLD_HEADER_HASH}" ] && [ "${ARCHS[*]}" == "${OLD_ARCHS}" ] && [ -f "${TARGET_BUILD_DIR}/libSessionUtil/libSessionUtil.a" ]; then + echo_message "info: Build is up-to-date" + exit 0 fi -# Move the target-specific libSession-util build to the parent build directory (so XCode can have a reference to a single build) -rm -rf "${BUILD_DIR}/libsession-util.xcframework" -cp -r "${TARGET_BUILD_DIR}/libsession-util.xcframework" "${BUILD_DIR}/libsession-util.xcframework" +# If any of the above differ then we need to rebuild +echo_message "info: Build is not up-to-date - creating new build" + +# Import settings from XCode (defaulting values if not present) +VALID_SIM_ARCHS=(arm64 x86_64) +VALID_DEVICE_ARCHS=(arm64) +VALID_SIM_ARCH_PLATFORMS=(SIMULATORARM64 SIMULATOR64) +VALID_DEVICE_ARCH_PLATFORMS=(OS64) + +OUTPUT_DIR="${TARGET_BUILD_DIR}" +IPHONEOS_DEPLOYMENT_TARGET=${IPHONEOS_DEPLOYMENT_TARGET} +ENABLE_BITCODE=${ENABLE_BITCODE} + +# Generate the target architectures we want to build for +TARGET_ARCHS=() +TARGET_PLATFORMS=() +TARGET_SIM_ARCHS=() +TARGET_DEVICE_ARCHS=() + +if [ -z $PLATFORM_NAME ] || [ $PLATFORM_NAME = "iphonesimulator" ]; then + for i in "${!VALID_SIM_ARCHS[@]}"; do + ARCH="${VALID_SIM_ARCHS[$i]}" + ARCH_PLATFORM="${VALID_SIM_ARCH_PLATFORMS[$i]}" + + if [[ " ${ARCHS[*]} " =~ " ${ARCH} " ]]; then + TARGET_ARCHS+=("sim-${ARCH}") + TARGET_PLATFORMS+=("${ARCH_PLATFORM}") + TARGET_SIM_ARCHS+=("sim-${ARCH}") + fi + done +fi + +if [ -z $PLATFORM_NAME ] || [ $PLATFORM_NAME = "iphoneos" ]; then + for i in "${!VALID_DEVICE_ARCHS[@]}"; do + ARCH="${VALID_DEVICE_ARCHS[$i]}" + ARCH_PLATFORM="${VALID_DEVICE_ARCH_PLATFORMS[$i]}" + + if [[ " ${ARCHS[*]} " =~ " ${ARCH} " ]]; then + TARGET_ARCHS+=("ios-${ARCH}") + TARGET_PLATFORMS+=("${ARCH_PLATFORM}") + TARGET_DEVICE_ARCHS+=("ios-${ARCH}") + fi + done +fi + +# Build the individual architectures +for i in "${!TARGET_ARCHS[@]}"; do + build="${TARGET_BUILD_DIR}/libSessionUtil/${TARGET_ARCHS[$i]}" + platform="${TARGET_PLATFORMS[$i]}" + echo_message "Building ${TARGET_ARCHS[$i]} for $platform in $build" + + cd "${SRCROOT}/LibSession-Util" + ./utils/static-bundle.sh "$build" "" \ + -DCMAKE_TOOLCHAIN_FILE="${SRCROOT}/LibSession-Util/external/ios-cmake/ios.toolchain.cmake" \ + -DPLATFORM=$platform \ + -DDEPLOYMENT_TARGET=$IPHONEOS_DEPLOYMENT_TARGET \ + -DENABLE_BITCODE=$ENABLE_BITCODE + + if [ $? -ne 0 ]; then + LAST_OUTPUT=$(tail -n 4 "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_output.log" | head -n 1) + echo_message "error: $LAST_OUTPUT" + exit 1 + fi +done + +# Remove the old static library file +rm -rf "${TARGET_BUILD_DIR}/libSessionUtil/libSessionUtil.a" +rm -rf "${TARGET_BUILD_DIR}/libSessionUtil/Headers" + +# If needed combine simulator builds into a multi-arch lib +if [ "${#TARGET_SIM_ARCHS[@]}" -eq "1" ]; then + # Single device build + cp "${TARGET_BUILD_DIR}/libSessionUtil/${TARGET_SIM_ARCHS[0]}/libsession-util.a" "${TARGET_BUILD_DIR}/libSessionUtil/libSessionUtil.a" +elif [ "${#TARGET_SIM_ARCHS[@]}" -gt "1" ]; then + # Combine multiple device builds into a multi-arch lib + echo_message "info: Built multiple architectures, merging into single static library" + lipo -create "${TARGET_BUILD_DIR}/libSessionUtil"/sim-*/libsession-util.a -output "${TARGET_BUILD_DIR}/libSessionUtil/libSessionUtil.a" +fi + +# If needed combine device builds into a multi-arch lib +if [ "${#TARGET_DEVICE_ARCHS[@]}" -eq "1" ]; then + cp "${TARGET_BUILD_DIR}/libSessionUtil/${TARGET_DEVICE_ARCHS[0]}/libsession-util.a" "${TARGET_BUILD_DIR}/libSessionUtil/libSessionUtil.a" +elif [ "${#TARGET_DEVICE_ARCHS[@]}" -gt "1" ]; then + # Combine multiple device builds into a multi-arch lib + echo_message "info: Built multiple architectures, merging into single static library" + lipo -create "${TARGET_BUILD_DIR}/libSessionUtil"/ios-*/libsession-util.a -output "${TARGET_BUILD_DIR}/libSessionUtil/libSessionUtil.a" +fi + +# Save the updated hashes to disk to prevent rebuilds when there were no changes +echo "${NEW_SOURCE_HASH}" > "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_source_hash.log" +echo "${NEW_HEADER_HASH}" > "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_header_hash.log" +echo "${ARCHS[*]}" > "${TARGET_BUILD_DIR}/libSessionUtil/libsession_util_archs.log" +echo_message "info: Build complete" + +# Copy the headers across +echo_message "info: Copy headers and prepare modulemap" +mkdir -p "${TARGET_BUILD_DIR}/libSessionUtil/Headers" +cp -r "${SRCROOT}/LibSession-Util/include/session" "${TARGET_BUILD_DIR}/libSessionUtil/Headers" + +# The 'module.modulemap' is needed for XCode to be able to find the headers +modmap="${TARGET_BUILD_DIR}/libSessionUtil/Headers/module.modulemap" +echo "module SessionUtil {" >"$modmap" +echo " module capi {" >>"$modmap" +for x in $(cd include && find session -name '*.h'); do + echo " header \"$x\"" >>"$modmap" +done +echo -e " export *\n }" >>"$modmap" +if false; then + # If we include the cpp headers like this then Xcode will try to load them as C headers (which + # of course breaks) and doesn't provide any way to only load the ones you need (because this is + # Apple land, why would anything useful be available?). So we include the headers in the + # archive but can't let xcode discover them because it will do it wrong. + echo -e "\n module cppapi {" >>"$modmap" + for x in $(cd include && find session -name '*.hpp'); do + echo " header \"$x\"" >>"$modmap" + done + echo -e " export *\n }" >>"$modmap" +fi +echo "}" >>"$modmap" + +# Output to XCode just so the output is good +echo_message "info: libSessionUtil Ready" \ No newline at end of file diff --git a/Scripts/skip_web_rtc_re_rsync.patch b/Scripts/skip_web_rtc_re_rsync.patch deleted file mode 100644 index 6b8232e50..000000000 --- a/Scripts/skip_web_rtc_re_rsync.patch +++ /dev/null @@ -1,12 +0,0 @@ -@@ -41,0 +41,11 @@ -+ # Skip the rsync step for the WebRTC-lib in simulator builds -+ if [[ "$PLATFORM_NAME" == "iphonesimulator" ]] && [[ "$source" == *WebRTC.framework* ]]; then -+ if [[ -f "${source}/../already_rsynced.nonce" ]]; then -+ echo "Already rsynced WebRTC, skipping" -+ return 0 -+ fi -+ -+ echo "About to rsync a simulator WebRTC, creating nonce to prevent future rsyncing" -+ touch "${source}/../already_rsynced.nonce" -+ fi -+ diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 11e85bdf7..4e3e4eb73 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -744,6 +744,8 @@ FD97B2402A3FEB050027DD57 /* ARC4RandomNumberGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD97B23F2A3FEB050027DD57 /* ARC4RandomNumberGenerator.swift */; }; FD97B2422A3FEBF30027DD57 /* UnreadMarkerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD97B2412A3FEBF30027DD57 /* UnreadMarkerCell.swift */; }; FD9B30F3293EA0BF008DEE3E /* BatchResponseSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9B30F2293EA0BF008DEE3E /* BatchResponseSpec.swift */; }; + FD9BDE002A5D22B7005F1EBC /* libSessionUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD9BDDF82A5D2294005F1EBC /* libSessionUtil.a */; }; + FD9BDE012A5D24EA005F1EBC /* SessionUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C331FF1B2558F9D300070591 /* SessionUIKit.framework */; }; FDA1E83629A5748F00C5C3BD /* ConfigUserGroupsSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDA1E83529A5748F00C5C3BD /* ConfigUserGroupsSpec.swift */; }; FDA1E83929A5771A00C5C3BD /* LibSessionSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDA1E83829A5771A00C5C3BD /* LibSessionSpec.swift */; }; FDA1E83B29A5F2D500C5C3BD /* SessionUtil+Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDA1E83A29A5F2D500C5C3BD /* SessionUtil+Shared.swift */; }; @@ -902,7 +904,6 @@ FDF848F529413EEC007DCAE5 /* SessionCell+Styling.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF848F429413EEC007DCAE5 /* SessionCell+Styling.swift */; }; FDF848F729414477007DCAE5 /* CurrentUserPoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF848F629414477007DCAE5 /* CurrentUserPoller.swift */; }; FDFC4D9A29F0C51500992FB6 /* String+Trimming.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C2A5D22553860900C340D1 /* String+Trimming.swift */; }; - FDFC4E1929F1F9A600992FB6 /* libsession-util.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDFC4E1829F1F9A600992FB6 /* libsession-util.xcframework */; }; FDFD645927F26C6800808CA1 /* Array+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C2A5D12553860800C340D1 /* Array+Utilities.swift */; }; FDFD645D27F273F300808CA1 /* MockGeneralCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFD645C27F273F300808CA1 /* MockGeneralCache.swift */; }; FDFDE124282D04F20098B17F /* MediaDismissAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFDE123282D04F20098B17F /* MediaDismissAnimationController.swift */; }; @@ -1054,20 +1055,6 @@ remoteGlobalIDString = C3C2A6EF25539DE700C340D1; remoteInfo = SessionMessagingKit; }; - FDCDB8EB28179EAF00352A0C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D221A080169C9E5E00537ABF /* Project object */; - proxyType = 1; - remoteGlobalIDString = D221A088169C9E5E00537ABF; - remoteInfo = Session; - }; - FDCDB8ED28179EB200352A0C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D221A080169C9E5E00537ABF /* Project object */; - proxyType = 1; - remoteGlobalIDString = D221A088169C9E5E00537ABF; - remoteInfo = Session; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -1876,6 +1863,7 @@ FD97B23F2A3FEB050027DD57 /* ARC4RandomNumberGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARC4RandomNumberGenerator.swift; sourceTree = ""; }; FD97B2412A3FEBF30027DD57 /* UnreadMarkerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnreadMarkerCell.swift; sourceTree = ""; }; FD9B30F2293EA0BF008DEE3E /* BatchResponseSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BatchResponseSpec.swift; sourceTree = ""; }; + FD9BDDF82A5D2294005F1EBC /* libSessionUtil.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSessionUtil.a; sourceTree = BUILT_PRODUCTS_DIR; }; FDA1E83529A5748F00C5C3BD /* ConfigUserGroupsSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigUserGroupsSpec.swift; sourceTree = ""; }; FDA1E83829A5771A00C5C3BD /* LibSessionSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibSessionSpec.swift; sourceTree = ""; }; FDA1E83A29A5F2D500C5C3BD /* SessionUtil+Shared.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SessionUtil+Shared.swift"; sourceTree = ""; }; @@ -2036,7 +2024,6 @@ FDF848F229413DB0007DCAE5 /* ImagePickerHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImagePickerHandler.swift; sourceTree = ""; }; FDF848F429413EEC007DCAE5 /* SessionCell+Styling.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SessionCell+Styling.swift"; sourceTree = ""; }; FDF848F629414477007DCAE5 /* CurrentUserPoller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CurrentUserPoller.swift; sourceTree = ""; }; - FDFC4E1829F1F9A600992FB6 /* libsession-util.xcframework */ = {isa = PBXFileReference; explicitFileType = wrapper.xcframework; includeInIndex = 0; path = "libsession-util.xcframework"; sourceTree = BUILD_DIR; }; FDFD645A27F26D4600808CA1 /* Data+Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Utilities.swift"; sourceTree = ""; }; FDFD645C27F273F300808CA1 /* MockGeneralCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockGeneralCache.swift; sourceTree = ""; }; FDFDE123282D04F20098B17F /* MediaDismissAnimationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaDismissAnimationController.swift; sourceTree = ""; }; @@ -2114,7 +2101,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FDFC4E1929F1F9A600992FB6 /* libsession-util.xcframework in Frameworks */, + FD9BDE002A5D22B7005F1EBC /* libSessionUtil.a in Frameworks */, + FD9BDE012A5D24EA005F1EBC /* SessionUIKit.framework in Frameworks */, FDC4386C27B4E90300C60D73 /* SessionUtilitiesKit.framework in Frameworks */, C3C2A70B25539E1E00C340D1 /* SessionSnodeKit.framework in Frameworks */, BE25D9230CA2C3A40A9216EF /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework in Frameworks */, @@ -3492,6 +3480,7 @@ FDC4388E27B9FFC700C60D73 /* SessionMessagingKitTests.xctest */, FD83B9AF27CF200A005E1583 /* SessionUtilitiesKitTests.xctest */, FD71160928D00BAE00B47552 /* SessionTests.xctest */, + FD9BDDF82A5D2294005F1EBC /* libSessionUtil.a */, ); name = Products; sourceTree = ""; @@ -3499,7 +3488,6 @@ D221A08C169C9E5E00537ABF /* Frameworks */ = { isa = PBXGroup; children = ( - FDFC4E1829F1F9A600992FB6 /* libsession-util.xcframework */, B8DE1FAF26C228780079C9CE /* SignalRingRTC.framework */, C35E8AA22485C72300ACB629 /* SwiftCSV.framework */, B847570023D568EB00759540 /* SignalServiceKit.framework */, @@ -4484,7 +4472,6 @@ 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 */, @@ -4508,7 +4495,6 @@ 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 */, @@ -4531,7 +4517,6 @@ 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 */, @@ -4552,7 +4537,6 @@ 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 */, @@ -4572,7 +4556,6 @@ 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 */, @@ -4592,7 +4575,6 @@ 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 */, @@ -4612,7 +4594,6 @@ buildConfigurationList = C3C2A6F925539DE700C340D1 /* Build configuration list for PBXNativeTarget "SessionMessagingKit" */; buildPhases = ( 2014435DF351DF6C60122751 /* [CP] Check Pods Manifest.lock */, - FDFC4E1729F14F7A00992FB6 /* Validate pre-build actions */, C3C2A6EB25539DE700C340D1 /* Headers */, C3C2A6EC25539DE700C340D1 /* Sources */, C3C2A6ED25539DE700C340D1 /* Frameworks */, @@ -4632,7 +4613,6 @@ 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 */, @@ -4663,7 +4643,6 @@ 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 */, @@ -4684,7 +4663,6 @@ 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 */, @@ -4694,19 +4672,32 @@ ); dependencies = ( FD83B9B527CF200A005E1583 /* PBXTargetDependency */, - FDCDB8EE28179EB200352A0C /* PBXTargetDependency */, ); name = SessionUtilitiesKitTests; productName = SessionUtilitiesKitTests; productReference = FD83B9AF27CF200A005E1583 /* SessionUtilitiesKitTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + FD9BDDF72A5D2294005F1EBC /* SessionUtil */ = { + isa = PBXNativeTarget; + buildConfigurationList = FD9BDDFC2A5D2294005F1EBC /* Build configuration list for PBXNativeTarget "SessionUtil" */; + buildPhases = ( + FD9BDDFF2A5D229B005F1EBC /* Build libSessionUtil if Needed */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SessionUtil; + productName = libSession4; + productReference = FD9BDDF82A5D2294005F1EBC /* libSessionUtil.a */; + productType = "com.apple.product-type.library.static"; + }; FDC4388D27B9FFC700C60D73 /* SessionMessagingKitTests */ = { isa = PBXNativeTarget; 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 */, @@ -4716,7 +4707,6 @@ ); dependencies = ( FDC4389427B9FFC700C60D73 /* PBXTargetDependency */, - FDCDB8EC28179EAF00352A0C /* PBXTargetDependency */, ); name = SessionMessagingKitTests; productName = SessionMessagingKitTests; @@ -4827,6 +4817,9 @@ FD83B9AE27CF200A005E1583 = { CreatedOnToolsVersion = 13.2.1; }; + FD9BDDF72A5D2294005F1EBC = { + CreatedOnToolsVersion = 14.3; + }; FDC4388D27B9FFC700C60D73 = { CreatedOnToolsVersion = 13.2.1; }; @@ -4877,6 +4870,7 @@ FD71160828D00BAE00B47552 /* SessionTests */, FDC4388D27B9FFC700C60D73 /* SessionMessagingKitTests */, FD83B9AE27CF200A005E1583 /* SessionUtilitiesKitTests */, + FD9BDDF72A5D2294005F1EBC /* SessionUtil */, ); }; /* End PBXProject section */ @@ -5334,7 +5328,7 @@ 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 */ = { + FD9BDDFF2A5D229B005F1EBC /* Build libSessionUtil if Needed */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -5344,198 +5338,19 @@ ); inputPaths = ( ); - name = "Validate pre-build actions"; + name = "Build libSessionUtil if Needed"; 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"; + shellScript = "\"${SRCROOT}/Scripts/build_libSession_util.sh\"\n"; showEnvVarsInLog = 0; }; FDD82C422A2085B900425F05 /* Add Commit Hash To Build Info Plist */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -5575,26 +5390,6 @@ shellScript = "\"${SRCROOT}/Scripts/LintLocalizableStrings.swift\"\n"; showEnvVarsInLog = 0; }; - FDFC4E1729F14F7A00992FB6 /* 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; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -6524,16 +6319,6 @@ target = C3C2A6EF25539DE700C340D1 /* SessionMessagingKit */; targetProxy = FDC4389327B9FFC700C60D73 /* PBXContainerItemProxy */; }; - FDCDB8EC28179EAF00352A0C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D221A088169C9E5E00537ABF /* Session */; - targetProxy = FDCDB8EB28179EAF00352A0C /* PBXContainerItemProxy */; - }; - FDCDB8EE28179EB200352A0C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D221A088169C9E5E00537ABF /* Session */; - targetProxy = FDCDB8ED28179EB200352A0C /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -7450,6 +7235,24 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Curve25519Kit/Curve25519Kit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/DifferenceKit/DifferenceKit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GRDB.swift/GRDB.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/PureLayout/PureLayout.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Reachability/Reachability.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SAMKeychain/SAMKeychain.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SQLCipher/SQLCipher.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SignalCoreKit/SignalCoreKit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Sodium/Sodium.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf/SwiftProtobuf.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/YapDatabase/YapDatabase.framework/Headers\"", + "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/Sodium/Headers\"", + "$(PODS_ROOT)/SQLCipher", + "${SRCROOT}/LibSession-Util/include/**", + ); INFOPLIST_FILE = SessionMessagingKit/Meta/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -7458,6 +7261,13 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", + "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/Sodium\"", + /usr/lib/swift, + "\"$(TARGET_BUILD_DIR)/libSessionUtil\"", + ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.SessionMessagingKit"; @@ -7465,6 +7275,7 @@ SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_INCLUDE_PATHS = "$(inherited) \"${PODS_XCFRAMEWORKS_BUILD_DIR}/Clibsodium\" \"$(TARGET_BUILD_DIR)/libSessionUtil\""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -7528,6 +7339,24 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Curve25519Kit/Curve25519Kit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/DifferenceKit/DifferenceKit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/GRDB.swift/GRDB.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/PureLayout/PureLayout.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Reachability/Reachability.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SAMKeychain/SAMKeychain.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SQLCipher/SQLCipher.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SignalCoreKit/SignalCoreKit.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/Sodium/Sodium.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf/SwiftProtobuf.framework/Headers\"", + "\"${PODS_CONFIGURATION_BUILD_DIR}/YapDatabase/YapDatabase.framework/Headers\"", + "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/Sodium/Headers\"", + "$(PODS_ROOT)/SQLCipher", + "${SRCROOT}/LibSession-Util/include/**", + ); INFOPLIST_FILE = SessionMessagingKit/Meta/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -7536,6 +7365,13 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", + "\"${PODS_XCFRAMEWORKS_BUILD_DIR}/Sodium\"", + /usr/lib/swift, + "\"$(TARGET_BUILD_DIR)/libSessionUtil\"", + ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.SessionMessagingKit"; @@ -7544,6 +7380,7 @@ SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = NO; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_INCLUDE_PATHS = "$(inherited) \"${PODS_XCFRAMEWORKS_BUILD_DIR}/Clibsodium\" \"$(TARGET_BUILD_DIR)/libSessionUtil\""; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -8058,6 +7895,105 @@ }; name = "App Store Release"; }; + FD9BDDFD2A5D2294005F1EBC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MODULEMAP_FILE = "$(SRCROOT)/SessionMessagingKit/Meta/SessionUtil.modulemap"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + FD9BDDFE2A5D2294005F1EBC /* App Store Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MODULEMAP_FILE = "$(SRCROOT)/SessionMessagingKit/Meta/SessionUtil.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = "App Store Release"; + }; FDC4389627B9FFC700C60D73 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 8727C47348B6EFA767EE583A /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.debug.xcconfig */; @@ -8267,6 +8203,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "App Store Release"; }; + FD9BDDFC2A5D2294005F1EBC /* Build configuration list for PBXNativeTarget "SessionUtil" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FD9BDDFD2A5D2294005F1EBC /* Debug */, + FD9BDDFE2A5D2294005F1EBC /* App Store Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "App Store Release"; + }; FDC4389527B9FFC700C60D73 /* Build configuration list for PBXNativeTarget "SessionMessagingKitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Session.xcodeproj/xcshareddata/xcschemes/Session.xcscheme b/Session.xcodeproj/xcshareddata/xcschemes/Session.xcscheme index f2e5c8744..ea85c66b2 100644 --- a/Session.xcodeproj/xcshareddata/xcschemes/Session.xcscheme +++ b/Session.xcodeproj/xcshareddata/xcschemes/Session.xcscheme @@ -5,24 +5,6 @@ - - - - - - - - - - + version = "1.3"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + version = "1.3"> - - - - - - - - - - + version = "1.3"> - - - - - - - - - - Data? in From 7b06329454be9c9ec3357cbaaa328e536aa924e4 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:04:54 +1000 Subject: [PATCH 03/19] Fixed an incorrect bash command --- .drone.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index d85ed0cd4..e05549573 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -51,7 +51,7 @@ local xcpretty_commands = [ name: 'build', commands: [ 'mkdir build', - 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -derivedDataPath ./build -destination 'generic/platform=iOS Simulator' | xcpretty', + 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator" | xcpretty', './.drone-static-upload.sh' ], }, From 0464439e8d9413420f895cf654e2340fbd7763fb Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:05:51 +1000 Subject: [PATCH 04/19] Fixed some formatting errors --- .drone.jsonnet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index e05549573..99a5857d1 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -27,7 +27,7 @@ local xcpretty_commands = [ steps: [ { name: 'submodules', commands: submodule_commands }, { name: 'xcpretty', commands: xcpretty_commands }, - { name: 'pods', commands: 'pod install' }, + { name: 'pods', commands: ['pod install'] }, { name: 'Run Unit Tests', commands: [ @@ -46,7 +46,7 @@ local xcpretty_commands = [ steps: [ { name: 'submodules', commands: submodule_commands }, { name: 'xcpretty', commands: xcpretty_commands }, - { name: 'pods', commands: 'pod install' }, + { name: 'pods', commands: ['pod install'] }, { name: 'build', commands: [ @@ -66,7 +66,7 @@ local xcpretty_commands = [ // steps: [ // { name: 'submodules', commands: submodule_commands }, // { name: 'xcpretty', commands: xcpretty_commands }, -// { name: 'pods', commands: 'pod install' }, +// { name: 'pods', commands: ['pod install'] }, // { // name: 'build', // commands: [ From c8c70c448e952b94f8f8ff5ee6914c9f396c9795 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:13:42 +1000 Subject: [PATCH 05/19] Tweaks to the submodule command --- .drone.jsonnet | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 99a5857d1..58bf9c6df 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -2,7 +2,7 @@ local submodule_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=2']; local submodules = { - name: 'submodules', + name: 'Clone Submodules', image: 'drone/git', commands: submodule_commands, }; @@ -25,9 +25,9 @@ local xcpretty_commands = [ name: 'Unit Tests', platform: { os: 'darwin', arch: 'amd64' }, steps: [ - { name: 'submodules', commands: submodule_commands }, - { name: 'xcpretty', commands: xcpretty_commands }, - { name: 'pods', commands: ['pod install'] }, + submodules, + { name: 'Install XCPretty', commands: xcpretty_commands }, + { name: 'Install CocoaPods', commands: ['pod install'] }, { name: 'Run Unit Tests', commands: [ @@ -44,11 +44,11 @@ local xcpretty_commands = [ name: 'Simulator Build', platform: { os: 'darwin', arch: 'amd64' }, steps: [ - { name: 'submodules', commands: submodule_commands }, - { name: 'xcpretty', commands: xcpretty_commands }, - { name: 'pods', commands: ['pod install'] }, + submodules, + { name: 'Install XCPretty', commands: xcpretty_commands }, + { name: 'Install CocoaPods', commands: ['pod install'] }, { - name: 'build', + name: 'Build', commands: [ 'mkdir build', 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator" | xcpretty', @@ -64,11 +64,11 @@ local xcpretty_commands = [ // name: 'AppStore Build', // platform: { os: 'darwin', arch: 'amd64' }, // steps: [ -// { name: 'submodules', commands: submodule_commands }, -// { name: 'xcpretty', commands: xcpretty_commands }, -// { name: 'pods', commands: ['pod install'] }, +// submodules, +// { name: 'Install XCPretty', commands: xcpretty_commands }, +// { name: 'Install CocoaPods', commands: ['pod install'] }, // { -// name: 'build', +// name: 'Build', // commands: [ // 'mkdir build', // 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -archivePath ./build/Session.xcarchive -destination "platform=generic/iOS" | xcpretty' From 8de4a66865212341561f0c61b3a463128454f95b Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:15:39 +1000 Subject: [PATCH 06/19] Reverting last change --- .drone.jsonnet | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 58bf9c6df..bf6c23802 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,12 +1,6 @@ // Intentionally doing a depth of 2 as libSession-util has it's own submodules (and libLokinet likely will as well) local submodule_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=2']; -local submodules = { - name: 'Clone Submodules', - image: 'drone/git', - commands: submodule_commands, -}; - // cmake options for static deps mirror local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https://oxen.rocks/deps ' else ''); @@ -25,7 +19,7 @@ local xcpretty_commands = [ name: 'Unit Tests', platform: { os: 'darwin', arch: 'amd64' }, steps: [ - submodules, + { name: 'Clone Submodules', commands: submodule_commands }, { name: 'Install XCPretty', commands: xcpretty_commands }, { name: 'Install CocoaPods', commands: ['pod install'] }, { @@ -44,7 +38,7 @@ local xcpretty_commands = [ name: 'Simulator Build', platform: { os: 'darwin', arch: 'amd64' }, steps: [ - submodules, + { name: 'Clone Submodules', commands: submodule_commands }, { name: 'Install XCPretty', commands: xcpretty_commands }, { name: 'Install CocoaPods', commands: ['pod install'] }, { @@ -64,7 +58,7 @@ local xcpretty_commands = [ // name: 'AppStore Build', // platform: { os: 'darwin', arch: 'amd64' }, // steps: [ -// submodules, +// { name: 'Clone Submodules', commands: submodule_commands }, // { name: 'Install XCPretty', commands: xcpretty_commands }, // { name: 'Install CocoaPods', commands: ['pod install'] }, // { From 3c81e3a4878b3d04fbc5cd28bac70cfdbb9416c1 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:28:28 +1000 Subject: [PATCH 07/19] Changed the submodule to be via HTTPS instead of SSH Cleaned out some old, unused references from project files --- .gitmodules | 2 +- Session.xcodeproj/project.pbxproj | 110 +++++++--------- .../xcshareddata/Signal.xcscmblueprint | 121 ------------------ Session/Meta/Session-Info.plist | 9 +- 4 files changed, 48 insertions(+), 194 deletions(-) delete mode 100644 Session.xcworkspace/xcshareddata/Signal.xcscmblueprint diff --git a/.gitmodules b/.gitmodules index ae3d45a8c..b8c1e3809 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "LibSession-Util"] path = LibSession-Util - url = git@github.com:oxen-io/libsession-util.git + url = https://github.com/oxen-io/libsession-util.git diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 4e3e4eb73..b1d01de68 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 056ED47155A04437A1EF58C2 /* Pods_GlobalDependencies_Session_SessionTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32C10A2A536B58FC42C46C3C /* Pods_GlobalDependencies_Session_SessionTests.framework */; }; 3427C64320F500E000EEC730 /* OWSMessageTimerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3427C64220F500DF00EEC730 /* OWSMessageTimerView.m */; }; 3430FE181F7751D4000EC51B /* GiphyAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430FE171F7751D4000EC51B /* GiphyAPI.swift */; }; 34661FB820C1C0D60056EDD6 /* message_sent.aiff in Resources */ = {isa = PBXBuildFile; fileRef = 34661FB720C1C0D60056EDD6 /* message_sent.aiff */; }; @@ -33,8 +32,7 @@ 34D1F0521F7E8EA30066283D /* GiphyDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D1F0511F7E8EA30066283D /* GiphyDownloader.swift */; }; 34D99CE4217509C2000AFB39 /* AppEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D99CE3217509C1000AFB39 /* AppEnvironment.swift */; }; 34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F308A11ECB469700BB7697 /* OWSBezierPathView.m */; }; - 41BA6B5C1C693C3A86070C15 /* Pods_GlobalDependencies_Session.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC8D3B6504946442A0CF775C /* Pods_GlobalDependencies_Session.framework */; }; - 42C48489AFF26BC9034C736C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86A3D36084020C9118DBCEE3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework */; }; + 3B59D92C6C15D82844A6BF16 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76B2DECEBFEEEFA2221BA817 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework */; }; 4503F1BE20470A5B00CEE724 /* classic-quiet.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 4503F1BB20470A5B00CEE724 /* classic-quiet.aifc */; }; 4503F1BF20470A5B00CEE724 /* classic.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 4503F1BC20470A5B00CEE724 /* classic.aifc */; }; 450DF2091E0DD2C6003D14BE /* UserNotificationsAdaptee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 450DF2081E0DD2C6003D14BE /* UserNotificationsAdaptee.swift */; }; @@ -85,17 +83,15 @@ 4C1885D2218F8E1C00B67051 /* PhotoGridViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1885D1218F8E1C00B67051 /* PhotoGridViewCell.swift */; }; 4C21D5D8223AC60F00EF8A77 /* PhotoCapture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C21D5D7223AC60F00EF8A77 /* PhotoCapture.swift */; }; 4C4AE6A1224AF35700D4AF6F /* SendMediaNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4AE69F224AF21900D4AF6F /* SendMediaNavigationController.swift */; }; - 4C4FE46740136D591D04261F /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E0B0F4C34363FE679EE3F203 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework */; }; 4C586926224FAB83003FD070 /* AVAudioSession+OWS.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C586925224FAB83003FD070 /* AVAudioSession+OWS.m */; }; 4C63CC00210A620B003AE45C /* SignalTSan.supp in Resources */ = {isa = PBXBuildFile; fileRef = 4C63CBFF210A620B003AE45C /* SignalTSan.supp */; }; 4C6F527C20FFE8400097DEEE /* SignalUBSan.supp in Resources */ = {isa = PBXBuildFile; fileRef = 4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */; }; - 4C9CA25D217E676900607C63 /* ZXingObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C9CA25C217E676900607C63 /* ZXingObjC.framework */; }; 4CA46F4C219CCC630038ABDE /* CaptionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA46F4B219CCC630038ABDE /* CaptionView.swift */; }; 4CA485BB2232339F004B9E7D /* PhotoCaptureViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA485BA2232339F004B9E7D /* PhotoCaptureViewController.swift */; }; 4CC613362227A00400E21A3A /* ConversationSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC613352227A00400E21A3A /* ConversationSearch.swift */; }; - 6C1ADD1127CED42854542F78 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3BE3061D535DBC1DF0C94D4 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework */; }; + 58860CDCE675B63CBDB1EEED /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E36D73700ED95C005B6BA026 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework */; }; + 6D6C9F16F244E7FADB1ACBE9 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8B0BA5257C58DC6FF797278 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework */; }; 70377AAB1918450100CAF501 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70377AAA1918450100CAF501 /* MobileCoreServices.framework */; }; - 768A1A2B17FC9CD300E00ED8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 768A1A2A17FC9CD300E00ED8 /* libz.dylib */; }; 76C87F19181EFCE600C4ACAB /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */; }; 7B0EFDEE274F598600FFAAE7 /* TimestampUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B0EFDED274F598600FFAAE7 /* TimestampUtils.swift */; }; 7B0EFDF0275084AA00FFAAE7 /* CallMessageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B0EFDEF275084AA00FFAAE7 /* CallMessageCell.swift */; }; @@ -167,17 +163,18 @@ 7BFD1A8A2745C4F000FB91B9 /* Permissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFD1A892745C4F000FB91B9 /* Permissions.swift */; }; 7BFD1A8C2747150E00FB91B9 /* TurnServerInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFD1A8B2747150E00FB91B9 /* TurnServerInfo.swift */; }; 7BFD1A972747689000FB91B9 /* Session-Turn-Server in Resources */ = {isa = PBXBuildFile; fileRef = 7BFD1A962747689000FB91B9 /* Session-Turn-Server */; }; - 9A88F90C33C394513CB4C18A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07B7038C849F53378CD36B83 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework */; }; - A0A69C9CB213DDDD85BF2207 /* Pods_GlobalDependencies_SessionUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 678CFB04E76F7E388AFCFA86 /* Pods_GlobalDependencies_SessionUIKit.framework */; }; + 99978E3F7A80275823CA9014 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29E827FDF6C1032BB985740C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework */; }; A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */; }; A163E8AB16F3F6AA0094D68B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A163E8AA16F3F6A90094D68B /* Security.framework */; }; A1C32D5017A06538000A904E /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4F17A06537000A904E /* AddressBookUI.framework */; }; A1C32D5117A06544000A904E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4D17A0652C000A904E /* AddressBook.framework */; }; + AFF4D58C089CAD659A6A7D31 /* Pods_GlobalDependencies_Session_SessionTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 164F5FAD2DCE932054F61E78 /* Pods_GlobalDependencies_Session_SessionTests.framework */; }; B66DBF4A19D5BBC8006EA940 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B66DBF4919D5BBC8006EA940 /* Images.xcassets */; }; B67EBF5D19194AC60084CCFD /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B67EBF5C19194AC60084CCFD /* Settings.bundle */; }; B6B226971BE4B7D200860F4D /* ContactsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6B226961BE4B7D200860F4D /* ContactsUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; B6F509971AA53F760068F56A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; }; B6FE7EB71ADD62FA00A6D22F /* PushKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6FE7EB61ADD62FA00A6D22F /* PushKit.framework */; }; + B7ED5A721C85869B379140C0 /* Pods_GlobalDependencies_Session.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1677131E9189A0043FF97ACB /* Pods_GlobalDependencies_Session.framework */; }; B8041A9525C8FA1D003C2166 /* MediaLoaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8041A9425C8FA1D003C2166 /* MediaLoaderView.swift */; }; B8041AA725C90927003C2166 /* TypingIndicatorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8041AA625C90927003C2166 /* TypingIndicatorCell.swift */; }; B806ECA126C4A7E4008BDA44 /* WebRTCSession+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B806ECA026C4A7E4008BDA44 /* WebRTCSession+UI.swift */; }; @@ -262,8 +259,8 @@ B8FF8E6225C10DA5004D1F22 /* GeoLite2-Country-Blocks-IPv4 in Resources */ = {isa = PBXBuildFile; fileRef = B8FF8E6125C10DA5004D1F22 /* GeoLite2-Country-Blocks-IPv4 */; }; B8FF8E7425C10FC3004D1F22 /* GeoLite2-Country-Locations-English in Resources */ = {isa = PBXBuildFile; fileRef = B8FF8E7325C10FC3004D1F22 /* GeoLite2-Country-Locations-English */; }; B8FF8EA625C11FEF004D1F22 /* IPv4.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8FF8EA525C11FEF004D1F22 /* IPv4.swift */; }; + B93FD3F211AE04B892F2F08A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93359C81CF2660040B7CD106 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework */; }; B9EB5ABD1884C002007CBB57 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9EB5ABC1884C002007CBB57 /* MessageUI.framework */; }; - BE25D9230CA2C3A40A9216EF /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05E68C7F291EC08B8A43A534 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework */; }; C300A5D32554B05A00555489 /* TypingIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C300A5D22554B05A00555489 /* TypingIndicator.swift */; }; C300A5F22554B09800555489 /* MessageSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = C300A5F12554B09800555489 /* MessageSender.swift */; }; C300A60D2554B31900555489 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C2A5CE2553860700C340D1 /* Logging.swift */; }; @@ -459,7 +456,6 @@ C3DB66C3260ACCE6001EFC55 /* OpenGroupPoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DB66C2260ACCE6001EFC55 /* OpenGroupPoller.swift */; }; C3E5C2FA251DBABB0040DFFC /* EditClosedGroupVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E5C2F9251DBABB0040DFFC /* EditClosedGroupVC.swift */; }; C3F0A530255C80BC007BE2A3 /* NoopNotificationsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F0A52F255C80BC007BE2A3 /* NoopNotificationsManager.swift */; }; - CB54B7E519F525FF27A7DAD3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5828D9A55CD76B75E8FA367 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework */; }; D2179CFC16BB0B3A0006F3AB /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */; }; D2179CFE16BB0B480006F3AB /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */; }; D221A08E169C9E5E00537ABF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A08D169C9E5E00537ABF /* UIKit.framework */; }; @@ -467,7 +463,9 @@ D221A0E8169DFFC500537ABF /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A0E7169DFFC500537ABF /* AVFoundation.framework */; }; D24B5BD5169F568C00681372 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D24B5BD4169F568C00681372 /* AudioToolbox.framework */; }; D2AEACDC16C426DA00C364C0 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */; }; - DE0001574AC103562A7CF31F /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E358E7590EB145A5047F885 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework */; }; + D53824DFCED7AE6BB61E7640 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92E8569C96285EE3CDB5960D /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework */; }; + DE53B40717A9417578FB40DE /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE35EBADE13F7B7D979B71D5 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework */; }; + E984778319BDF24A7ADF100A /* Pods_GlobalDependencies_SessionUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E517F8611575B37B76BCC54 /* Pods_GlobalDependencies_SessionUIKit.framework */; }; FC3BD9881A30A790005B96BB /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC3BD9871A30A790005B96BB /* Social.framework */; }; FCB11D8C1A129A76002F93FB /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCB11D8B1A129A76002F93FB /* CoreMedia.framework */; }; FD078E4827E02561000769AF /* CommonMockedExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD078E4727E02561000769AF /* CommonMockedExtensions.swift */; }; @@ -911,7 +909,7 @@ FDFDE128282D05530098B17F /* MediaPresentationContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFDE127282D05530098B17F /* MediaPresentationContext.swift */; }; FDFDE12A282D056B0098B17F /* MediaZoomAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFDE129282D056B0098B17F /* MediaZoomAnimationController.swift */; }; FDFF61D729F2600300F95FB0 /* Identity+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFF61D629F2600300F95FB0 /* Identity+Utilities.swift */; }; - FE43694493EC2E1E438EBEB3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13D1714FDC4DAB121DA2C73A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework */; }; + FE5FDED6D91BB4B3FA5C104D /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A9C113D2086D3C8A68A371C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1089,12 +1087,11 @@ /* Begin PBXFileReference section */ 05C76EFA593DD507061C50B2 /* Pods-GlobalDependencies-SessionUIKit.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-SessionUIKit.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-SessionUIKit/Pods-GlobalDependencies-SessionUIKit.app store release.xcconfig"; sourceTree = ""; }; - 05E68C7F291EC08B8A43A534 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0772459E7D5F6747EDC889F3 /* Pods-GlobalDependencies-Session-SessionTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-Session-SessionTests.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-Session-SessionTests/Pods-GlobalDependencies-Session-SessionTests.debug.xcconfig"; sourceTree = ""; }; - 07B7038C849F53378CD36B83 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 13D1714FDC4DAB121DA2C73A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 164F5FAD2DCE932054F61E78 /* Pods_GlobalDependencies_Session_SessionTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_Session_SessionTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1677131E9189A0043FF97ACB /* Pods_GlobalDependencies_Session.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_Session.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 285705D20F792E174C8A9BBA /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension.debug.xcconfig"; sourceTree = ""; }; - 32C10A2A536B58FC42C46C3C /* Pods_GlobalDependencies_Session_SessionTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_Session_SessionTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 29E827FDF6C1032BB985740C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 34040971CC7AF9C8A6C1E838 /* Pods-GlobalDependencies-Session.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-Session.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-Session/Pods-GlobalDependencies-Session.debug.xcconfig"; sourceTree = ""; }; 3427C64120F500DE00EEC730 /* OWSMessageTimerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSMessageTimerView.h; sourceTree = ""; }; 3427C64220F500DF00EEC730 /* OWSMessageTimerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSMessageTimerView.m; sourceTree = ""; }; @@ -1124,9 +1121,9 @@ 34D99CE3217509C1000AFB39 /* AppEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppEnvironment.swift; sourceTree = ""; }; 34F308A01ECB469700BB7697 /* OWSBezierPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSBezierPathView.h; sourceTree = ""; }; 34F308A11ECB469700BB7697 /* OWSBezierPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSBezierPathView.m; sourceTree = ""; }; + 3E517F8611575B37B76BCC54 /* Pods_GlobalDependencies_SessionUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_SessionUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4503F1BB20470A5B00CEE724 /* classic-quiet.aifc */ = {isa = PBXFileReference; lastKnownFileType = file; path = "classic-quiet.aifc"; sourceTree = ""; }; 4503F1BC20470A5B00CEE724 /* classic.aifc */ = {isa = PBXFileReference; lastKnownFileType = file; path = classic.aifc; sourceTree = ""; }; - 4509E7991DD653700025A59F /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = ThirdParty/WebRTC/Build/WebRTC.framework; sourceTree = ""; }; 450DF2081E0DD2C6003D14BE /* UserNotificationsAdaptee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = UserNotificationsAdaptee.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 451A13B01E13DED2000A50FD /* AppNotifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppNotifications.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 4520D8D41D417D8E00123472 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; @@ -1182,7 +1179,6 @@ 4C586925224FAB83003FD070 /* AVAudioSession+OWS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AVAudioSession+OWS.m"; sourceTree = ""; }; 4C63CBFF210A620B003AE45C /* SignalTSan.supp */ = {isa = PBXFileReference; lastKnownFileType = text; path = SignalTSan.supp; sourceTree = ""; }; 4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */ = {isa = PBXFileReference; lastKnownFileType = text; path = SignalUBSan.supp; sourceTree = ""; }; - 4C9CA25C217E676900607C63 /* ZXingObjC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZXingObjC.framework; path = ThirdParty/Carthage/Build/iOS/ZXingObjC.framework; sourceTree = ""; }; 4CA46F4B219CCC630038ABDE /* CaptionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaptionView.swift; sourceTree = ""; }; 4CA485BA2232339F004B9E7D /* PhotoCaptureViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoCaptureViewController.swift; sourceTree = ""; }; 4CC613352227A00400E21A3A /* ConversationSearch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConversationSearch.swift; sourceTree = ""; }; @@ -1190,12 +1186,12 @@ 5DA3BDDFFB9E937A49C35FCC /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests.app store release.xcconfig"; sourceTree = ""; }; 621B42AC592F3456ACD82F8B /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.app store release.xcconfig"; sourceTree = ""; }; 62B512CEB14BD4A4A53CF532 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionNotificationServiceExtension.app store release.xcconfig"; sourceTree = ""; }; - 678CFB04E76F7E388AFCFA86 /* Pods_GlobalDependencies_SessionUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_SessionUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6A71AD9BEAFF0C9E8016BC23 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionShareExtension.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionShareExtension.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionShareExtension/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionShareExtension.app store release.xcconfig"; sourceTree = ""; }; 6DA09080DD9779C860023A60 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit.debug.xcconfig"; sourceTree = ""; }; 70377AAA1918450100CAF501 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - 768A1A2A17FC9CD300E00ED8 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 76B2DECEBFEEEFA2221BA817 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; + 7A9C113D2086D3C8A68A371C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7B0EFDED274F598600FFAAE7 /* TimestampUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimestampUtils.swift; sourceTree = ""; }; 7B0EFDEF275084AA00FFAAE7 /* CallMessageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallMessageCell.swift; sourceTree = ""; }; 7B0EFDF3275490EA00FFAAE7 /* ringing.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ringing.mp3; sourceTree = ""; }; @@ -1272,10 +1268,10 @@ 8448EFF76CD3CA5B2283B8A0 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit-SessionUtilitiesKitTests.debug.xcconfig"; sourceTree = ""; }; 847091A12D82E41B1EBB8FB3 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit.debug.xcconfig"; sourceTree = ""; }; 8603226ED1C6F61F1F2D3734 /* Pods-GlobalDependencies-Session.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-Session.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-Session/Pods-GlobalDependencies-Session.app store release.xcconfig"; sourceTree = ""; }; - 86A3D36084020C9118DBCEE3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8727C47348B6EFA767EE583A /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit-SessionMessagingKitTests.debug.xcconfig"; sourceTree = ""; }; 8E946CB54A221018E23599DE /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit.debug.xcconfig"; sourceTree = ""; }; - 9E358E7590EB145A5047F885 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 92E8569C96285EE3CDB5960D /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 93359C81CF2660040B7CD106 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; A163E8AA16F3F6A90094D68B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; A1C32D4D17A0652C000A904E /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; @@ -1293,7 +1289,6 @@ B68CB7DC1AA547100065AC3F /* pt_BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_BR; path = pt_BR.lproj/Localizable.strings; sourceTree = ""; }; B68CB7E01AA548420065AC3F /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; B68CB7E61AA548870065AC3F /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Localizable.strings; sourceTree = ""; }; - B69CD25019773E79005CE69A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; B6B226961BE4B7D200860F4D /* ContactsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ContactsUI.framework; path = System/Library/Frameworks/ContactsUI.framework; sourceTree = SDKROOT; }; B6FE7EB61ADD62FA00A6D22F /* PushKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PushKit.framework; path = System/Library/Frameworks/PushKit.framework; sourceTree = SDKROOT; }; B8041A9425C8FA1D003C2166 /* MediaLoaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaLoaderView.swift; sourceTree = ""; }; @@ -1318,7 +1313,6 @@ B83524A425C3BA4B0089A44F /* InfoMessageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoMessageCell.swift; sourceTree = ""; }; B83F2B87240CB75A000A54AB /* UIImage+Scaling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Scaling.swift"; sourceTree = ""; }; B84664F4235022F30083A1CD /* MentionUtilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MentionUtilities.swift; sourceTree = ""; }; - B847570023D568EB00759540 /* SignalServiceKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SignalServiceKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B849789525D4A2F500D0D0B3 /* LinkPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkPreviewView.swift; sourceTree = ""; }; B84A89BB25DE328A0040017D /* ProfilePictureVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfilePictureVC.swift; sourceTree = ""; }; B85357BE23A1AE0800AAF6CD /* SeedReminderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SeedReminderView.swift; sourceTree = ""; }; @@ -1372,7 +1366,6 @@ B8D0A26825E4A2C200C1835E /* Onboarding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Onboarding.swift; sourceTree = ""; }; B8D84EA225DF745A005A043E /* LinkPreviewState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkPreviewState.swift; sourceTree = ""; }; B8D84ECE25E3108A005A043E /* ExpandingAttachmentsButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpandingAttachmentsButton.swift; sourceTree = ""; }; - B8DE1FAF26C228780079C9CE /* SignalRingRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SignalRingRTC.framework; path = Dependencies/SignalRingRTC.framework; sourceTree = ""; }; B8DE1FB326C22F2F0079C9CE /* WebRTCSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebRTCSession.swift; sourceTree = ""; }; B8DE1FB526C22FCB0079C9CE /* CallMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallMessage.swift; sourceTree = ""; }; B8EB20E6263F7E4B00773E52 /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/Localizable.strings; sourceTree = ""; }; @@ -1385,6 +1378,7 @@ B8FF8E7325C10FC3004D1F22 /* GeoLite2-Country-Locations-English */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = "GeoLite2-Country-Locations-English"; path = "Countries/GeoLite2-Country-Locations-English"; sourceTree = ""; }; B8FF8EA525C11FEF004D1F22 /* IPv4.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPv4.swift; sourceTree = ""; }; B9EB5ABC1884C002007CBB57 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + BE35EBADE13F7B7D979B71D5 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C300A5B12554AF9800555489 /* VisibleMessage+Profile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "VisibleMessage+Profile.swift"; sourceTree = ""; }; C300A5BC2554B00D00555489 /* ReadReceipt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadReceipt.swift; sourceTree = ""; }; C300A5D22554B05A00555489 /* TypingIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypingIndicator.swift; sourceTree = ""; }; @@ -1484,7 +1478,6 @@ C3548F0724456AB6009433A8 /* UIView+Wrapping.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Wrapping.swift"; sourceTree = ""; }; C354E75923FE2A7600CE22E3 /* BaseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseVC.swift; sourceTree = ""; }; C35D0DB425AE5F1200B6BF49 /* UIEdgeInsets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIEdgeInsets.swift; sourceTree = ""; }; - C35E8AA22485C72300ACB629 /* SwiftCSV.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftCSV.framework; path = ThirdParty/Carthage/Build/iOS/SwiftCSV.framework; sourceTree = ""; }; C35E8AAD2485E51D00ACB629 /* IP2Country.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IP2Country.swift; sourceTree = ""; }; C374EEEA25DA3CA70073A857 /* ConversationTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConversationTitleView.swift; sourceTree = ""; }; C374EEF325DB31D40073A857 /* VoiceMessageRecordingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageRecordingView.swift; sourceTree = ""; }; @@ -1610,8 +1603,6 @@ C3ECBF7A257056B700EA7FCE /* Threading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Threading.swift; sourceTree = ""; }; C3F0A52F255C80BC007BE2A3 /* NoopNotificationsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoopNotificationsManager.swift; sourceTree = ""; }; C3F0A5B2255C915C007BE2A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - C5828D9A55CD76B75E8FA367 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CC8D3B6504946442A0CF775C /* Pods_GlobalDependencies_Session.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_Session.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; D221A089169C9E5E00537ABF /* Session.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Session.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1622,14 +1613,14 @@ D221A0E7169DFFC500537ABF /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = ../../../../../../System/Library/Frameworks/AVFoundation.framework; sourceTree = ""; }; D24B5BD4169F568C00681372 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = ../../../../../../System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; - D3BE3061D535DBC1DF0C94D4 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E0B0F4C34363FE679EE3F203 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E1A0AD8B16E13FDD0071E604 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + E36D73700ED95C005B6BA026 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EB5B8ACA4C6F512FA3E21859 /* Pods-GlobalDependencies-SessionUIKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-SessionUIKit.debug.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-SessionUIKit/Pods-GlobalDependencies-SessionUIKit.debug.xcconfig"; sourceTree = ""; }; EED1CF82CAB23FE3345564F9 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-SessionSnodeKit.app store release.xcconfig"; sourceTree = ""; }; F154A10CE1ADA33C16B45357 /* Pods-GlobalDependencies-Session-SessionTests.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-Session-SessionTests.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-Session-SessionTests/Pods-GlobalDependencies-Session-SessionTests.app store release.xcconfig"; sourceTree = ""; }; F390F8E34CA76B3F7D3B1826 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionMessagingKit.app store release.xcconfig"; sourceTree = ""; }; F60C5B6CD14329816B0E8CC0 /* Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit.app store release.xcconfig"; path = "Target Support Files/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit/Pods-GlobalDependencies-FrameworkAndExtensionDependencies-ExtendedDependencies-SessionUtilitiesKit.app store release.xcconfig"; sourceTree = ""; }; + F8B0BA5257C58DC6FF797278 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FC3BD9871A30A790005B96BB /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; FCB11D8B1A129A76002F93FB /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; FD078E4727E02561000769AF /* CommonMockedExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonMockedExtensions.swift; sourceTree = ""; }; @@ -2043,7 +2034,7 @@ C3D90A5C25773A25002C9DF5 /* SessionUtilitiesKit.framework in Frameworks */, C3402FE52559036600EA6424 /* SessionUIKit.framework in Frameworks */, B8D64FCB25BA78A90029CFC0 /* SignalUtilitiesKit.framework in Frameworks */, - 4C4FE46740136D591D04261F /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework in Frameworks */, + FE5FDED6D91BB4B3FA5C104D /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2055,7 +2046,7 @@ B8D64FBD25BA78310029CFC0 /* SessionSnodeKit.framework in Frameworks */, B8D64FBE25BA78310029CFC0 /* SessionUtilitiesKit.framework in Frameworks */, C38EF00C255B61CC007E1867 /* SignalUtilitiesKit.framework in Frameworks */, - CB54B7E519F525FF27A7DAD3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework in Frameworks */, + 99978E3F7A80275823CA9014 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2064,7 +2055,7 @@ buildActionMask = 2147483647; files = ( FD37E9EF28A5ED70003AE748 /* SessionUtilitiesKit.framework in Frameworks */, - A0A69C9CB213DDDD85BF2207 /* Pods_GlobalDependencies_SessionUIKit.framework in Frameworks */, + E984778319BDF24A7ADF100A /* Pods_GlobalDependencies_SessionUIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2076,7 +2067,7 @@ C33FD9C2255A54EF00E217F9 /* SessionMessagingKit.framework in Frameworks */, C33FD9C4255A54EF00E217F9 /* SessionSnodeKit.framework in Frameworks */, C33FD9C5255A54EF00E217F9 /* SessionUtilitiesKit.framework in Frameworks */, - 6C1ADD1127CED42854542F78 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework in Frameworks */, + D53824DFCED7AE6BB61E7640 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2085,7 +2076,7 @@ buildActionMask = 2147483647; files = ( C3C2A6C62553896A00C340D1 /* SessionUtilitiesKit.framework in Frameworks */, - DE0001574AC103562A7CF31F /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework in Frameworks */, + 6D6C9F16F244E7FADB1ACBE9 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2093,7 +2084,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 42C48489AFF26BC9034C736C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework in Frameworks */, + 58860CDCE675B63CBDB1EEED /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2105,7 +2096,7 @@ FD9BDE012A5D24EA005F1EBC /* SessionUIKit.framework in Frameworks */, FDC4386C27B4E90300C60D73 /* SessionUtilitiesKit.framework in Frameworks */, C3C2A70B25539E1E00C340D1 /* SessionSnodeKit.framework in Frameworks */, - BE25D9230CA2C3A40A9216EF /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework in Frameworks */, + DE53B40717A9417578FB40DE /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2121,7 +2112,6 @@ 455A16DE1F1FEA0000F86704 /* MetalKit.framework in Frameworks */, 45847E871E4283C30080EAB3 /* Intents.framework in Frameworks */, 4520D8D51D417D8E00123472 /* Photos.framework in Frameworks */, - 4C9CA25D217E676900607C63 /* ZXingObjC.framework in Frameworks */, B6B226971BE4B7D200860F4D /* ContactsUI.framework in Frameworks */, 45BD60821DE9547E00A8F436 /* Contacts.framework in Frameworks */, B6FE7EB71ADD62FA00A6D22F /* PushKit.framework in Frameworks */, @@ -2131,7 +2121,6 @@ B9EB5ABD1884C002007CBB57 /* MessageUI.framework in Frameworks */, 3496956021A2FC8100DCFE74 /* CloudKit.framework in Frameworks */, 76C87F19181EFCE600C4ACAB /* MediaPlayer.framework in Frameworks */, - 768A1A2B17FC9CD300E00ED8 /* libz.dylib in Frameworks */, A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */, A163E8AB16F3F6AA0094D68B /* Security.framework in Frameworks */, A1C32D5117A06544000A904E /* AddressBook.framework in Frameworks */, @@ -2144,7 +2133,7 @@ D221A090169C9E5E00537ABF /* Foundation.framework in Frameworks */, D221A0E8169DFFC500537ABF /* AVFoundation.framework in Frameworks */, D24B5BD5169F568C00681372 /* AudioToolbox.framework in Frameworks */, - 41BA6B5C1C693C3A86070C15 /* Pods_GlobalDependencies_Session.framework in Frameworks */, + B7ED5A721C85869B379140C0 /* Pods_GlobalDependencies_Session.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2152,7 +2141,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 056ED47155A04437A1EF58C2 /* Pods_GlobalDependencies_Session_SessionTests.framework in Frameworks */, + AFF4D58C089CAD659A6A7D31 /* Pods_GlobalDependencies_Session_SessionTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2161,7 +2150,7 @@ buildActionMask = 2147483647; files = ( FD83B9B327CF200A005E1583 /* SessionUtilitiesKit.framework in Frameworks */, - 9A88F90C33C394513CB4C18A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework in Frameworks */, + B93FD3F211AE04B892F2F08A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2170,7 +2159,7 @@ buildActionMask = 2147483647; files = ( FDC4389227B9FFC700C60D73 /* SessionMessagingKit.framework in Frameworks */, - FE43694493EC2E1E438EBEB3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework in Frameworks */, + 3B59D92C6C15D82844A6BF16 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3488,30 +3477,23 @@ D221A08C169C9E5E00537ABF /* Frameworks */ = { isa = PBXGroup; children = ( - B8DE1FAF26C228780079C9CE /* SignalRingRTC.framework */, - C35E8AA22485C72300ACB629 /* SwiftCSV.framework */, - B847570023D568EB00759540 /* SignalServiceKit.framework */, 3496955F21A2FC8100DCFE74 /* CloudKit.framework */, - 4C9CA25C217E676900607C63 /* ZXingObjC.framework */, 455A16DB1F1FEA0000F86704 /* Metal.framework */, 455A16DC1F1FEA0000F86704 /* MetalKit.framework */, 45847E861E4283C30080EAB3 /* Intents.framework */, 45BD60811DE9547E00A8F436 /* Contacts.framework */, - 4509E7991DD653700025A59F /* WebRTC.framework */, 4520D8D41D417D8E00123472 /* Photos.framework */, B6B226961BE4B7D200860F4D /* ContactsUI.framework */, B6FE7EB61ADD62FA00A6D22F /* PushKit.framework */, FC3BD9871A30A790005B96BB /* Social.framework */, B60EDE031A05A01700D73516 /* AudioToolbox.framework */, FCB11D8B1A129A76002F93FB /* CoreMedia.framework */, - B69CD25019773E79005CE69A /* XCTest.framework */, 70377AAA1918450100CAF501 /* MobileCoreServices.framework */, B9EB5ABC1884C002007CBB57 /* MessageUI.framework */, A1C32D4D17A0652C000A904E /* AddressBook.framework */, A1C32D4F17A06537000A904E /* AddressBookUI.framework */, A163E8AA16F3F6A90094D68B /* Security.framework */, 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */, - 768A1A2A17FC9CD300E00ED8 /* libz.dylib */, A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */, E1A0AD8B16E13FDD0071E604 /* CoreFoundation.framework */, A1FDCBEE16DAA6C300868894 /* AVFoundation.framework */, @@ -3523,17 +3505,17 @@ D221A08D169C9E5E00537ABF /* UIKit.framework */, D221A08F169C9E5E00537ABF /* Foundation.framework */, D221A091169C9E5E00537ABF /* CoreGraphics.framework */, - 05E68C7F291EC08B8A43A534 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework */, - 13D1714FDC4DAB121DA2C73A /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework */, - E0B0F4C34363FE679EE3F203 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework */, - 86A3D36084020C9118DBCEE3 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework */, - 07B7038C849F53378CD36B83 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework */, - D3BE3061D535DBC1DF0C94D4 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework */, - C5828D9A55CD76B75E8FA367 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework */, - 9E358E7590EB145A5047F885 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework */, - CC8D3B6504946442A0CF775C /* Pods_GlobalDependencies_Session.framework */, - 32C10A2A536B58FC42C46C3C /* Pods_GlobalDependencies_Session_SessionTests.framework */, - 678CFB04E76F7E388AFCFA86 /* Pods_GlobalDependencies_SessionUIKit.framework */, + BE35EBADE13F7B7D979B71D5 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit.framework */, + 76B2DECEBFEEEFA2221BA817 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionMessagingKit_SessionMessagingKitTests.framework */, + 7A9C113D2086D3C8A68A371C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionShareExtension.framework */, + E36D73700ED95C005B6BA026 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit.framework */, + 93359C81CF2660040B7CD106 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SessionUtilitiesKit_SessionUtilitiesKitTests.framework */, + 92E8569C96285EE3CDB5960D /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_ExtendedDependencies_SignalUtilitiesKit.framework */, + 29E827FDF6C1032BB985740C /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionNotificationServiceExtension.framework */, + F8B0BA5257C58DC6FF797278 /* Pods_GlobalDependencies_FrameworkAndExtensionDependencies_SessionSnodeKit.framework */, + 1677131E9189A0043FF97ACB /* Pods_GlobalDependencies_Session.framework */, + 164F5FAD2DCE932054F61E78 /* Pods_GlobalDependencies_Session_SessionTests.framework */, + 3E517F8611575B37B76BCC54 /* Pods_GlobalDependencies_SessionUIKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -5357,8 +5339,8 @@ inputFileListPaths = ( ); inputPaths = ( - $BUILT_PRODUCTS_DIR/$INFOPLIST_PATH, - $TARGET_BUILD_DIR/$INFOPLIST_PATH, + "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH", + "$TARGET_BUILD_DIR/$INFOPLIST_PATH", ); name = "Add Commit Hash To Build Info Plist"; outputFileListPaths = ( diff --git a/Session.xcworkspace/xcshareddata/Signal.xcscmblueprint b/Session.xcworkspace/xcshareddata/Signal.xcscmblueprint deleted file mode 100644 index 15a2ce9a2..000000000 --- a/Session.xcworkspace/xcshareddata/Signal.xcscmblueprint +++ /dev/null @@ -1,121 +0,0 @@ -{ - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++2D5CBAE", - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { - - }, - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { - "8176314449001F06FB0E5B588C62133EAA2FE911+++72E8629" : 9223372036854775807, - "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" : 0, - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" : 0, - "ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" : 0, - "90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" : 0, - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" : 0, - "D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" : 0, - "8176314449001F06FB0E5B588C62133EAA2FE911+++692B8E4" : 9223372036854775807, - "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" : 0, - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++2D5CBAE" : 0, - "8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" : 9223372036854775807, - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" : 0, - "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++3F8B703" : 9223372036854775807, - "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" : 0, - "8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" : 9223372036854775807 - }, - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "D0F297E7-A82D-4657-A941-96B268F80ABC", - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "8176314449001F06FB0E5B588C62133EAA2FE911+++72E8629" : "Signal-iOS-2\/Carthage\/", - "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" : "SignalProtocolKit\/", - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" : "Signal-iOS-2\/", - "ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" : "SocketRocket\/", - "90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" : "JSQMessagesViewController\/", - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" : "Signal-iOS\/", - "D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" : "Signal-iOS\/Pods\/", - "8176314449001F06FB0E5B588C62133EAA2FE911+++692B8E4" : "Signal-iOS-4\/Carthage\/", - "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" : "SignalServiceKit\/", - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++2D5CBAE" : "Signal-iOS-4\/", - "8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" : "Signal-iOS\/Carthage\/", - "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" : "Signal-iOS-5\/", - "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++3F8B703" : "SignalServiceKit-2\/", - "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" : "SignalServiceKit\/", - "8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" : "Signal-iOS-5\/Carthage\/" - }, - "DVTSourceControlWorkspaceBlueprintNameKey" : "Signal", - "DVTSourceControlWorkspaceBlueprintVersion" : 204, - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Signal.xcworkspace", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SignalProtocolKit.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "01DE8628B025BC69C8C7D8B4612D57BE2C08B62C+++6A1C9FC" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SignalServiceKit.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++3F8B703" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SignalProtocolKit.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++901E7D4" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:FredericJacobs\/TextSecureKit.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "37054CE35CE656680D6FFFA9EE19249E0D149C5E+++E57A04A" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/Signal-iOS.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++03D0758" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/Signal-iOS.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++0BB03DB" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/Signal-iOS.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++2D5CBAE" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/Signal-iOS.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C+++ED4C31A" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:michaelkirk\/Signal-Carthage.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8176314449001F06FB0E5B588C62133EAA2FE911+++31C7255" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/WhisperSystems\/Signal-Carthage.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8176314449001F06FB0E5B588C62133EAA2FE911+++692B8E4" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/WhisperSystems\/Signal-Carthage.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8176314449001F06FB0E5B588C62133EAA2FE911+++72E8629" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/Signal-Carthage.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8176314449001F06FB0E5B588C62133EAA2FE911+++E19D6E3" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/JSQMessagesViewController.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "90530B99EB0008E7A50951FDFBE02169118FA649+++EF2C0B3" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/SocketRocket.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "ABB939127996C66F7E852A780552ADEEF03C6B13+++69179A3" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/FredericJacobs\/Precompiled-Signal-Dependencies.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D74FB800F048CB516BB4BC70047F7CC676D291B9+++375B249" - } - ] -} \ No newline at end of file diff --git a/Session/Meta/Session-Info.plist b/Session/Meta/Session-Info.plist index be0439a2f..87cdc72f3 100644 --- a/Session/Meta/Session-Info.plist +++ b/Session/Meta/Session-Info.plist @@ -2,13 +2,6 @@ - BuildDetails - - CarthageVersion - 0.36.0 - OSXVersion - 10.15.6 - CFBundleDevelopmentRegion en CFBundleDisplayName @@ -88,7 +81,7 @@ NSCameraUsageDescription Session needs camera access to take pictures and scan QR codes. NSFaceIDUsageDescription - Session's Screen Lock feature uses Face ID. + Session's Screen Lock feature uses Face ID. NSHumanReadableCopyright com.loki-project.loki-messenger NSMicrophoneUsageDescription From 5bd0d5d640557a8147a4586cd1ecd148f47e42a9 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:33:33 +1000 Subject: [PATCH 08/19] Attempting multiline bash command for xcpretty --- .drone.jsonnet | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index bf6c23802..9f4bf0f48 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -6,8 +6,16 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/ // xcpretty local xcpretty_commands = [ - 'if [[ $(command -v brew) != "" ]]; then; brew install xcpretty; fi;', - 'if [[ $(command -v brew) == "" ]]; then; gem install xcpretty; fi;' + ||| + if [[ $(command -v brew) != "" ]]; then + brew install xcpretty + fi + |||, + ||| + if [[ $(command -v brew) == "" ]]; then + gem install xcpretty + fi + |||, ]; From f8b69cd03c2f4ad4ea628baf65857c7b2739429b Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:36:12 +1000 Subject: [PATCH 09/19] Disabling XCPretty due to permission issue --- .drone.jsonnet | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 9f4bf0f48..606c37427 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -28,13 +28,13 @@ local xcpretty_commands = [ platform: { os: 'darwin', arch: 'amd64' }, steps: [ { name: 'Clone Submodules', commands: submodule_commands }, - { name: 'Install XCPretty', commands: xcpretty_commands }, + // { name: 'Install XCPretty', commands: xcpretty_commands }, { name: 'Install CocoaPods', commands: ['pod install'] }, { name: 'Run Unit Tests', commands: [ 'mkdir build', - 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcpretty --report html' + 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' // | xcpretty --report html' ], }, ], @@ -47,13 +47,13 @@ local xcpretty_commands = [ platform: { os: 'darwin', arch: 'amd64' }, steps: [ { name: 'Clone Submodules', commands: submodule_commands }, - { name: 'Install XCPretty', commands: xcpretty_commands }, + // { name: 'Install XCPretty', commands: xcpretty_commands }, { name: 'Install CocoaPods', commands: ['pod install'] }, { name: 'Build', commands: [ 'mkdir build', - 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator" | xcpretty', + 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator"', // | xcpretty', './.drone-static-upload.sh' ], }, @@ -67,7 +67,7 @@ local xcpretty_commands = [ // platform: { os: 'darwin', arch: 'amd64' }, // steps: [ // { name: 'Clone Submodules', commands: submodule_commands }, -// { name: 'Install XCPretty', commands: xcpretty_commands }, +// // { name: 'Install XCPretty', commands: xcpretty_commands }, // { name: 'Install CocoaPods', commands: ['pod install'] }, // { // name: 'Build', From f623db678edf7bfb4abeb1a4bcb45fbd20ecd9f3 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 15:43:36 +1000 Subject: [PATCH 10/19] Attempt to work around a stupid CocoaPods restriction --- .drone.jsonnet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 606c37427..40295c503 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -29,7 +29,7 @@ local xcpretty_commands = [ steps: [ { name: 'Clone Submodules', commands: submodule_commands }, // { name: 'Install XCPretty', commands: xcpretty_commands }, - { name: 'Install CocoaPods', commands: ['pod install'] }, + { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, { name: 'Run Unit Tests', commands: [ @@ -48,7 +48,7 @@ local xcpretty_commands = [ steps: [ { name: 'Clone Submodules', commands: submodule_commands }, // { name: 'Install XCPretty', commands: xcpretty_commands }, - { name: 'Install CocoaPods', commands: ['pod install'] }, + { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, { name: 'Build', commands: [ @@ -68,7 +68,7 @@ local xcpretty_commands = [ // steps: [ // { name: 'Clone Submodules', commands: submodule_commands }, // // { name: 'Install XCPretty', commands: xcpretty_commands }, -// { name: 'Install CocoaPods', commands: ['pod install'] }, +// { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, // { // name: 'Build', // commands: [ From c7f6b5a94e507cc6107b8a6f3396ed36b161d61b Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 17:13:59 +1000 Subject: [PATCH 11/19] Replaced the 'ZXingObjC' dependency with a native implementation for scanning QR Codes --- Podfile | 1 - Podfile.lock | 8 +- Session/Home/New Conversation/NewDMVC.swift | 17 +- Session/Onboarding/LinkDeviceVC.swift | 12 +- Session/Open Groups/JoinOpenGroupVC.swift | 26 +-- Session/Settings/QRCodeVC.swift | 9 +- .../Shared/QRCodeScanningViewController.swift | 161 ++++++++++++------ 7 files changed, 142 insertions(+), 92 deletions(-) diff --git a/Podfile b/Podfile index 5747d4620..76cf57a85 100644 --- a/Podfile +++ b/Podfile @@ -22,7 +22,6 @@ abstract_target 'GlobalDependencies' do pod 'PureLayout', '~> 3.1.8' pod 'NVActivityIndicatorView' pod 'YYImage/libwebp', git: 'https://github.com/signalapp/YYImage' - pod 'ZXingObjC' pod 'DifferenceKit' target 'SessionTests' do diff --git a/Podfile.lock b/Podfile.lock index 8810dd341..d0b6c6490 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -108,9 +108,6 @@ PODS: - YYImage/libwebp (1.0.4): - libwebp - YYImage/Core - - ZXingObjC (3.6.5): - - ZXingObjC/All (= 3.6.5) - - ZXingObjC/All (3.6.5) DEPENDENCIES: - Curve25519Kit (from `https://github.com/oxen-io/session-ios-curve-25519-kit.git`, branch `session-version`) @@ -129,7 +126,6 @@ DEPENDENCIES: - WebRTC-lib - YapDatabase/SQLCipher (from `https://github.com/oxen-io/session-ios-yap-database.git`, branch `signal-release`) - YYImage/libwebp (from `https://github.com/signalapp/YYImage`) - - ZXingObjC SPEC REPOS: https://github.com/CocoaPods/Specs.git: @@ -147,7 +143,6 @@ SPEC REPOS: - SQLCipher - SwiftProtobuf - WebRTC-lib - - ZXingObjC EXTERNAL SOURCES: Curve25519Kit: @@ -202,8 +197,7 @@ SPEC CHECKSUMS: WebRTC-lib: d83df8976fa608b980f1d85796b3de66d60a1953 YapDatabase: b418a4baa6906e8028748938f9159807fd039af4 YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331 - ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb -PODFILE CHECKSUM: 68799237a4dc046f5ac25c573af03b559f5b10c4 +PODFILE CHECKSUM: 4705728e69454d50805c70272479a7d4a04209d5 COCOAPODS: 1.12.1 diff --git a/Session/Home/New Conversation/NewDMVC.swift b/Session/Home/New Conversation/NewDMVC.swift index 2d900083d..4b9f80591 100644 --- a/Session/Home/New Conversation/NewDMVC.swift +++ b/Session/Home/New Conversation/NewDMVC.swift @@ -165,12 +165,12 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle dismiss(animated: true, completion: nil) } - func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String) { + func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String, onError: (() -> ())?) { let hexEncodedPublicKey = string - startNewDMIfPossible(with: hexEncodedPublicKey) + startNewDMIfPossible(with: hexEncodedPublicKey, onError: onError) } - fileprivate func startNewDMIfPossible(with onsNameOrPublicKey: String) { + fileprivate func startNewDMIfPossible(with onsNameOrPublicKey: String, onError: (() -> ())?) { let maybeSessionId: SessionId? = SessionId(from: onsNameOrPublicKey) if KeyPair.isValidHexEncodedPublicKey(candidate: onsNameOrPublicKey) { @@ -185,7 +185,8 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle title: "ALERT_ERROR_TITLE".localized(), body: .text("DM_ERROR_DIRECT_BLINDED_ID".localized()), cancelTitle: "BUTTON_OK".localized(), - cancelStyle: .alert_text + cancelStyle: .alert_text, + afterClosed: onError ) ) self.present(modal, animated: true) @@ -197,7 +198,8 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle title: "ALERT_ERROR_TITLE".localized(), body: .text("DM_ERROR_INVALID".localized()), cancelTitle: "BUTTON_OK".localized(), - cancelStyle: .alert_text + cancelStyle: .alert_text, + afterClosed: onError ) ) self.present(modal, animated: true) @@ -243,7 +245,8 @@ final class NewDMVC: BaseVC, UIPageViewControllerDataSource, UIPageViewControlle title: "ALERT_ERROR_TITLE".localized(), body: .text(message), cancelTitle: "BUTTON_OK".localized(), - cancelStyle: .alert_text + cancelStyle: .alert_text, + afterClosed: onError ) ) self?.present(modal, animated: true) @@ -663,7 +666,7 @@ private final class EnterPublicKeyVC: UIViewController { @objc fileprivate func startNewDMIfPossible() { let text = publicKeyTextView.text?.trimmingCharacters(in: .whitespaces) ?? "" - NewDMVC.startNewDMIfPossible(with: text) + NewDMVC.startNewDMIfPossible(with: text, onError: nil) } } diff --git a/Session/Onboarding/LinkDeviceVC.swift b/Session/Onboarding/LinkDeviceVC.swift index 0c4b0af0a..bef5d2460 100644 --- a/Session/Onboarding/LinkDeviceVC.swift +++ b/Session/Onboarding/LinkDeviceVC.swift @@ -134,12 +134,12 @@ final class LinkDeviceVC: BaseVC, UIPageViewControllerDataSource, UIPageViewCont dismiss(animated: true, completion: nil) } - func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String) { + func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String, onError: (() -> ())?) { let seed = Data(hex: string) - continueWithSeed(seed) + continueWithSeed(seed, onError: onError) } - func continueWithSeed(_ seed: Data) { + func continueWithSeed(_ seed: Data, onError: (() -> ())?) { if (seed.count != 16) { let modal: ConfirmationModal = ConfirmationModal( info: ConfirmationModal.Info( @@ -147,9 +147,7 @@ final class LinkDeviceVC: BaseVC, UIPageViewControllerDataSource, UIPageViewCont body: .text("INVALID_RECOVERY_PHRASE_MESSAGE".localized()), cancelTitle: "BUTTON_OK".localized(), cancelStyle: .alert_text, - afterClosed: { [weak self] in - self?.scanQRCodeWrapperVC.startCapture() - } + afterClosed: onError ) ) present(modal, animated: true) @@ -319,7 +317,7 @@ private final class RecoveryPhraseVC: UIViewController { let hexEncodedSeed = try Mnemonic.decode(mnemonic: mnemonic) let seed = Data(hex: hexEncodedSeed) mnemonicTextView.resignFirstResponder() - linkDeviceVC.continueWithSeed(seed) + linkDeviceVC.continueWithSeed(seed, onError: nil) } catch let error { let error = error as? Mnemonic.DecodingError ?? Mnemonic.DecodingError.generic showError(title: error.errorDescription!) diff --git a/Session/Open Groups/JoinOpenGroupVC.swift b/Session/Open Groups/JoinOpenGroupVC.swift index 71d39ec73..b9983fa8c 100644 --- a/Session/Open Groups/JoinOpenGroupVC.swift +++ b/Session/Open Groups/JoinOpenGroupVC.swift @@ -144,25 +144,26 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC dismiss(animated: true, completion: nil) } - func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String) { - joinOpenGroup(with: string) + func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String, onError: (() -> ())?) { + joinOpenGroup(with: string, onError: onError) } - fileprivate func joinOpenGroup(with urlString: String) { + fileprivate func joinOpenGroup(with urlString: String, onError: (() -> ())?) { // A V2 open group URL will look like: + + + + // The host doesn't parse if no explicit scheme is provided guard let (room, server, publicKey) = SessionUtil.parseCommunity(url: urlString) else { showError( title: "invalid_url".localized(), - message: "COMMUNITY_ERROR_INVALID_URL".localized() + message: "COMMUNITY_ERROR_INVALID_URL".localized(), + onError: onError ) return } - joinOpenGroup(roomToken: room, server: server, publicKey: publicKey, shouldOpenCommunity: true) + joinOpenGroup(roomToken: room, server: server, publicKey: publicKey, shouldOpenCommunity: true, onError: onError) } - fileprivate func joinOpenGroup(roomToken: String, server: String, publicKey: String, shouldOpenCommunity: Bool) { + fileprivate func joinOpenGroup(roomToken: String, server: String, publicKey: String, shouldOpenCommunity: Bool, onError: (() -> ())?) { guard !isJoining, let navigationController: UINavigationController = navigationController else { return } isJoining = true @@ -209,7 +210,8 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC self?.dismiss(animated: true) { // Dismiss the loader self?.showError( title: "COMMUNITY_ERROR_GENERIC".localized(), - message: error.localizedDescription + message: error.localizedDescription, + onError: onError ) } @@ -232,13 +234,14 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC // MARK: - Convenience - private func showError(title: String, message: String = "") { + private func showError(title: String, message: String = "", onError: (() -> ())?) { let confirmationModal: ConfirmationModal = ConfirmationModal( info: ConfirmationModal.Info( title: title, body: .text(message), cancelTitle: "BUTTON_OK".localized(), - cancelStyle: .alert_text + cancelStyle: .alert_text, + afterClosed: onError ) ) self.navigationController?.present(confirmationModal, animated: true, completion: nil) @@ -399,13 +402,14 @@ private final class EnterURLVC: UIViewController, UIGestureRecognizerDelegate, O roomToken: room.token, server: OpenGroupAPI.defaultServer, publicKey: OpenGroupAPI.defaultServerPublicKey, - shouldOpenCommunity: true + shouldOpenCommunity: true, + onError: nil ) } @objc private func joinOpenGroup() { let url = urlTextView.text?.trimmingCharacters(in: .whitespaces) ?? "" - joinOpenGroupVC?.joinOpenGroup(with: url) + joinOpenGroupVC?.joinOpenGroup(with: url, onError: nil) } // MARK: - Updating diff --git a/Session/Settings/QRCodeVC.swift b/Session/Settings/QRCodeVC.swift index 7f16b4bc7..e5dc85397 100644 --- a/Session/Settings/QRCodeVC.swift +++ b/Session/Settings/QRCodeVC.swift @@ -119,12 +119,12 @@ final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControl dismiss(animated: true, completion: nil) } - func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String) { + func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String, onError: (() -> ())?) { let hexEncodedPublicKey = string - startNewPrivateChatIfPossible(with: hexEncodedPublicKey) + startNewPrivateChatIfPossible(with: hexEncodedPublicKey, onError: onError) } - fileprivate func startNewPrivateChatIfPossible(with hexEncodedPublicKey: String) { + fileprivate func startNewPrivateChatIfPossible(with hexEncodedPublicKey: String, onError: (() -> ())?) { if !KeyPair.isValidHexEncodedPublicKey(candidate: hexEncodedPublicKey) { let modal: ConfirmationModal = ConfirmationModal( targetView: self.view, @@ -132,7 +132,8 @@ final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControl title: "invalid_session_id".localized(), body: .text("INVALID_SESSION_ID_MESSAGE".localized()), cancelTitle: "BUTTON_OK".localized(), - cancelStyle: .alert_text + cancelStyle: .alert_text, + afterClosed: onError ) ) self.present(modal, animated: true) diff --git a/Session/Shared/QRCodeScanningViewController.swift b/Session/Shared/QRCodeScanningViewController.swift index 011823fa1..b29db5fa5 100644 --- a/Session/Shared/QRCodeScanningViewController.swift +++ b/Session/Shared/QRCodeScanningViewController.swift @@ -2,55 +2,36 @@ import UIKit import AVFoundation -import ZXingObjC import SessionUIKit +import SessionUtilitiesKit protocol QRScannerDelegate: AnyObject { - func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String) + func controller(_ controller: QRCodeScanningViewController, didDetectQRCodeWith string: String, onError: (() -> ())?) } -class QRCodeScanningViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate, ZXCaptureDelegate { +class QRCodeScanningViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { public weak var scanDelegate: QRScannerDelegate? private let captureQueue: DispatchQueue = DispatchQueue.global(qos: .default) - private var capture: ZXCapture? + private var capture: AVCaptureSession? + private var captureLayer: AVCaptureVideoPreviewLayer? private var captureEnabled: Bool = false // MARK: - Initialization deinit { - self.capture?.layer.removeFromSuperlayer() + self.captureLayer?.removeFromSuperlayer() } // MARK: - Components - private let maskingView: UIView = { - let result: OWSBezierPathView = OWSBezierPathView() - result.configureShapeLayerBlock = { layer, bounds in - // Add a circular mask - let path: UIBezierPath = UIBezierPath(rect: bounds) - let margin: CGFloat = ScaleFromIPhone5To7Plus(24, 48) - let radius: CGFloat = ((min(bounds.size.width, bounds.size.height) * 0.5) - margin) - - // Center the circle's bounding rectangle - let circleRect: CGRect = CGRect( - x: ((bounds.size.width * 0.5) - radius), - y: ((bounds.size.height * 0.5) - radius), - width: (radius * 2), - height: (radius * 2) - ) - let circlePath: UIBezierPath = UIBezierPath.init( - roundedRect: circleRect, - cornerRadius: 16 - ) - path.append(circlePath) - path.usesEvenOddFillRule = true - - layer.path = path.cgPath - layer.fillRule = .evenOdd - layer.themeFillColor = .black - layer.opacity = 0.32 - } + private let maskingView: UIView = UIView() + + private lazy var maskLayer: CAShapeLayer = { + let result: CAShapeLayer = CAShapeLayer() + result.fillRule = .evenOdd + result.themeFillColor = .black + result.opacity = 0.32 return result }() @@ -61,7 +42,8 @@ class QRCodeScanningViewController: UIViewController, AVCaptureMetadataOutputObj super.loadView() self.view.addSubview(maskingView) - maskingView.pin(to: self.view) + + maskingView.layer.addSublayer(maskLayer) } override func viewWillAppear(_ animated: Bool) { @@ -81,11 +63,28 @@ class QRCodeScanningViewController: UIViewController, AVCaptureMetadataOutputObj override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() - // Note: When accessing 'capture.layer' if the setup hasn't been completed it - // will result in a layout being triggered which creates an infinite loop, this - // check prevents that case - if let capture: ZXCapture = self.capture { - capture.layer.frame = self.view.bounds + captureLayer?.frame = self.view.bounds + + if maskingView.frame != self.view.bounds { + // Add a circular mask + let path: UIBezierPath = UIBezierPath(rect: self.view.bounds) + let radius: CGFloat = ((min(self.view.bounds.size.width, self.view.bounds.size.height) * 0.5) - Values.largeSpacing) + + // Center the circle's bounding rectangle + let circleRect: CGRect = CGRect( + x: ((self.view.bounds.size.width * 0.5) - radius), + y: ((self.view.bounds.size.height * 0.5) - radius), + width: (radius * 2), + height: (radius * 2) + ) + let clippingPath: UIBezierPath = UIBezierPath.init( + roundedRect: circleRect, + cornerRadius: 16 + ) + path.append(clippingPath) + path.usesEvenOddFillRule = true + + maskLayer.path = path.cgPath } } @@ -101,31 +100,76 @@ class QRCodeScanningViewController: UIViewController, AVCaptureMetadataOutputObj #else if self.capture == nil { self.captureQueue.async { [weak self] in - let capture: ZXCapture = ZXCapture() - capture.camera = capture.back() - capture.focusMode = .autoFocus - capture.delegate = self - capture.start() + let maybeDevice: AVCaptureDevice? = { + if let result = AVCaptureDevice.default(.builtInDualCamera, for: .video, position: .back) { + return result + } + + return AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) + }() - // Note: When accessing the 'layer' for the first time it will create - // an instance of 'AVCaptureVideoPreviewLayer', this can hang a little - // so we do this on the background thread first - if capture.layer != nil {} + // Set the input device to autoFocus (since we don't have the interaction setup for + // doing it manually) + maybeDevice?.focusMode = .continuousAutoFocus + + // Device input + guard + let device: AVCaptureDevice = maybeDevice, + let input: AVCaptureInput = try? AVCaptureDeviceInput(device: device) + else { + return SNLog("Failed to retrieve the device for enabling the QRCode scanning camera") + } + + // Image output + let output: AVCaptureVideoDataOutput = AVCaptureVideoDataOutput() + output.alwaysDiscardsLateVideoFrames = true + + // Metadata output the session + let metadataOutput: AVCaptureMetadataOutput = AVCaptureMetadataOutput() + metadataOutput.setMetadataObjectsDelegate(self, queue: DispatchQueue.main) + + let capture: AVCaptureSession = AVCaptureSession() + capture.beginConfiguration() + if capture.canAddInput(input) { capture.addInput(input) } + if capture.canAddOutput(output) { capture.addOutput(output) } + if capture.canAddOutput(metadataOutput) { capture.addOutput(metadataOutput) } + + guard !capture.inputs.isEmpty && capture.outputs.count == 2 else { + return SNLog("Failed to attach the input/output to the capture session") + } + + guard metadataOutput.availableMetadataObjectTypes.contains(.qr) else { + return SNLog("The output is unable to process QR codes") + } + + // Specify that we want to capture QR Codes (Needs to be done after being added + // to the session, 'availableMetadataObjectTypes' is empty beforehand) + metadataOutput.metadataObjectTypes = [.qr] + + capture.commitConfiguration() + + // Create the layer for rendering the camera video + let layer: AVCaptureVideoPreviewLayer = AVCaptureVideoPreviewLayer(session: capture) + layer.videoGravity = AVLayerVideoGravity.resizeAspectFill + + // Start running the capture session + capture.startRunning() DispatchQueue.main.async { - capture.layer.frame = (self?.view.bounds ?? .zero) - self?.view.layer.addSublayer(capture.layer) + layer.frame = (self?.view.bounds ?? .zero) + self?.view.layer.addSublayer(layer) if let maskingView: UIView = self?.maskingView { self?.view.bringSubviewToFront(maskingView) } self?.capture = capture + self?.captureLayer = layer } } } else { - self.capture?.start() + self.capture?.startRunning() } #endif } @@ -133,18 +177,25 @@ class QRCodeScanningViewController: UIViewController, AVCaptureMetadataOutputObj private func stopCapture() { self.captureEnabled = false self.captureQueue.async { [weak self] in - self?.capture?.stop() + self?.capture?.stopRunning() } } - internal func captureResult(_ capture: ZXCapture, result: ZXResult) { - guard self.captureEnabled else { return } + func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) { + guard + self.captureEnabled, + let metadata: AVMetadataObject = metadataObjects.first(where: { ($0 as? AVMetadataMachineReadableCodeObject)?.type == .qr }), + let qrCodeInfo: AVMetadataMachineReadableCodeObject = metadata as? AVMetadataMachineReadableCodeObject, + let qrCode: String = qrCodeInfo.stringValue + else { return } self.stopCapture() // Vibrate AudioServicesPlaySystemSound(kSystemSoundID_Vibrate) - - self.scanDelegate?.controller(self, didDetectQRCodeWith: result.text) + + self.scanDelegate?.controller(self, didDetectQRCodeWith: qrCode) { [weak self] in + self?.startCapture() + } } } From 2833cef5e4e9ca116d943e9c58e80ba0eeba06fd Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 12 Jul 2023 17:15:21 +1000 Subject: [PATCH 12/19] Tweaks to test the static upload script --- .drone-static-upload.sh | 7 ++- .drone.jsonnet | 126 +++++++++++++++++++++++++--------------- 2 files changed, 85 insertions(+), 48 deletions(-) mode change 100644 => 100755 .drone-static-upload.sh diff --git a/.drone-static-upload.sh b/.drone-static-upload.sh old mode 100644 new mode 100755 index 4730e5c30..b1f7c0887 --- a/.drone-static-upload.sh +++ b/.drone-static-upload.sh @@ -30,8 +30,11 @@ fi mkdir -v "$base" -# Copy over the build products -cp -av build/Build/Products/App\ Store\ Release-iphonesimulator/Session.app "$base" +# Copy over the build products +mkdir build +echo "Test" > "build/test.txt" +cp -av build/test.txt "$base" +# cp -av build/Build/Products/App\ Store\ Release-iphonesimulator/Session.app "$base" # tar dat shiz up yo archive="$base.tar.xz" diff --git a/.drone.jsonnet b/.drone.jsonnet index 40295c503..1d204720a 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,64 +1,98 @@ // Intentionally doing a depth of 2 as libSession-util has it's own submodules (and libLokinet likely will as well) -local submodule_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=2']; +local clone_submodules = { + name: 'Clone Submodules', + commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=2'] +}; // cmake options for static deps mirror local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https://oxen.rocks/deps ' else ''); // xcpretty -local xcpretty_commands = [ - ||| - if [[ $(command -v brew) != "" ]]; then - brew install xcpretty - fi - |||, - ||| - if [[ $(command -v brew) == "" ]]; then - gem install xcpretty - fi - |||, -]; +local install_xcpretty = { + name: 'Install XCPretty', + commands: [ + ||| + if [[ $(command -v brew) != "" ]]; then + brew install xcpretty + fi + |||, + ||| + if [[ $(command -v brew) == "" ]]; then + gem install xcpretty + fi + |||, + ] +}; + +// Cocoapods +// +// Unfortunately Cocoapods has a dumb restriction which requires you to use UTF-8 for the +// 'LANG' env var so we need to work around the with https://github.com/CocoaPods/CocoaPods/issues/6333 +local install_cocoapods = { + name: 'Install CocoaPods', + commands: ['LANG=en_US.UTF-8 pod install'] +}; [ - // Unit tests { kind: 'pipeline', type: 'exec', - name: 'Unit Tests', + name: 'Test Upload', platform: { os: 'darwin', arch: 'amd64' }, steps: [ - { name: 'Clone Submodules', commands: submodule_commands }, - // { name: 'Install XCPretty', commands: xcpretty_commands }, - { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, { - name: 'Run Unit Tests', + name: 'Upload artifacts', commands: [ - 'mkdir build', - 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' // | xcpretty --report html' - ], - }, - ], - }, - // Simulator build - { - kind: 'pipeline', - type: 'exec', - name: 'Simulator Build', - platform: { os: 'darwin', arch: 'amd64' }, - steps: [ - { name: 'Clone Submodules', commands: submodule_commands }, - // { name: 'Install XCPretty', commands: xcpretty_commands }, - { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, - { - name: 'Build', - commands: [ - 'mkdir build', - 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator"', // | xcpretty', './.drone-static-upload.sh' - ], - }, - ], + ] + } + ] }, +// // Unit tests +// { +// kind: 'pipeline', +// type: 'exec', +// name: 'Unit Tests', +// platform: { os: 'darwin', arch: 'amd64' }, +// steps: [ +// clone_submodules, +// // install_xcpretty, +// install_cocoapods, +// { +// name: 'Run Unit Tests', +// commands: [ +// 'mkdir build', +// 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' // | xcpretty --report html' +// ], +// }, +// ], +// }, +// // Simulator build +// { +// kind: 'pipeline', +// type: 'exec', +// name: 'Simulator Build', +// platform: { os: 'darwin', arch: 'amd64' }, +// steps: [ +// clone_submodules, +// // install_xcpretty, +// install_cocoapods, +// { +// name: 'Build', +// commands: [ +// 'mkdir build', +// 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator"' // | xcpretty' +// ], +// }, +// { +// name: 'Upload artifacts', +// commands: [ +// './.drone-static-upload.sh' +// ] +// } +// ], +// }, // // AppStore build (generate an archive to be signed later) // { // kind: 'pipeline', @@ -66,9 +100,9 @@ local xcpretty_commands = [ // name: 'AppStore Build', // platform: { os: 'darwin', arch: 'amd64' }, // steps: [ -// { name: 'Clone Submodules', commands: submodule_commands }, -// // { name: 'Install XCPretty', commands: xcpretty_commands }, -// { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, +// clone_submodules, +// // install_xcpretty, +// install_cocoapods, // { // name: 'Build', // commands: [ From b72bf426054043130c5894252c4e559b7df870a0 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 14:47:10 +1000 Subject: [PATCH 13/19] Updated the CI and fixed a couple of config bugs Updated to the 1.0.0 release of libSession Set the User Config feature flag to July 31st 10am AEST Shifted quote thumbnail generation out of the DBWrite thread Stopped the CurrentUserPoller from polling the user config namespaces if the feature flag is off Fixed an issue where the scrollToBottom behaviour could be a little buggy when an optimistic update is replaced with the proper change Fixed an issue where the 'attachmentsNotUploaded' error wouldn't result in a message entering an error state Fixed a bug where sync messages with attachments weren't being sent --- .drone.jsonnet | 159 ++++++------- LibSession-Util | 2 +- Scripts/LintLocalizableStrings.swift | 1 + .../drone-static-upload.sh | 18 +- .../ConversationVC+Interaction.swift | 119 +++++----- Session/Conversations/ConversationVC.swift | 31 ++- .../GIFs/GiphyAPI.swift | 4 +- .../Jobs/Types/MessageSendJob.swift | 214 +++++++++--------- .../Sending & Receiving/MessageSender.swift | 16 +- .../Pollers/CurrentUserPoller.swift | 7 +- .../Quotes/QuotedReplyModel.swift | 13 -- .../SessionUtil/SessionUtil.swift | 4 +- .../Shared Models/MessageViewModel.swift | 5 +- 13 files changed, 309 insertions(+), 284 deletions(-) rename .drone-static-upload.sh => Scripts/drone-static-upload.sh (83%) diff --git a/.drone.jsonnet b/.drone.jsonnet index 1d204720a..07634ce4c 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -7,23 +7,6 @@ local clone_submodules = { // cmake options for static deps mirror local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https://oxen.rocks/deps ' else ''); -// xcpretty -local install_xcpretty = { - name: 'Install XCPretty', - commands: [ - ||| - if [[ $(command -v brew) != "" ]]; then - brew install xcpretty - fi - |||, - ||| - if [[ $(command -v brew) == "" ]]; then - gem install xcpretty - fi - |||, - ] -}; - // Cocoapods // // Unfortunately Cocoapods has a dumb restriction which requires you to use UTF-8 for the @@ -35,81 +18,89 @@ local install_cocoapods = { [ + // Unit tests { kind: 'pipeline', type: 'exec', - name: 'Test Upload', + name: 'Unit Tests', platform: { os: 'darwin', arch: 'amd64' }, steps: [ + clone_submodules, + // install_xcpretty, + install_cocoapods, + { + name: 'Run Unit Tests', + commands: [ + 'mkdir build', + ||| + if command -v xcpretty >/dev/null 2>&1; then + 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcpretty' + else + 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' + fi + ||| + ], + }, + ], + }, + // Simulator build + { + kind: 'pipeline', + type: 'exec', + name: 'Simulator Build', + platform: { os: 'darwin', arch: 'amd64' }, + steps: [ + clone_submodules, + install_cocoapods, + { + name: 'Build', + commands: [ + 'mkdir build', + ||| + if command -v xcpretty >/dev/null 2>&1; then + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -derivedDataPath ./build -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' | xcpretty + else + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -derivedDataPath ./build -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' + fi + ||| + ], + }, { name: 'Upload artifacts', commands: [ - './.drone-static-upload.sh' + './Scripts/drone-static-upload.sh' ] - } - ] + }, + ], + }, + // AppStore build (generate an archive to be signed later) + { + kind: 'pipeline', + type: 'exec', + name: 'AppStore Build', + platform: { os: 'darwin', arch: 'amd64' }, + steps: [ + clone_submodules, + install_cocoapods, + { + name: 'Build', + commands: [ + 'mkdir build', + ||| + if command -v xcpretty >/dev/null 2>&1; then + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -derivedDataPath ./build -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' | xcpretty + else + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -derivedDataPath ./build -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' + fi + ||| + ], + }, + { + name: 'Upload artifacts', + commands: [ + './Scripts/drone-static-upload.sh' + ] + }, + ], }, -// // Unit tests -// { -// kind: 'pipeline', -// type: 'exec', -// name: 'Unit Tests', -// platform: { os: 'darwin', arch: 'amd64' }, -// steps: [ -// clone_submodules, -// // install_xcpretty, -// install_cocoapods, -// { -// name: 'Run Unit Tests', -// commands: [ -// 'mkdir build', -// 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' // | xcpretty --report html' -// ], -// }, -// ], -// }, -// // Simulator build -// { -// kind: 'pipeline', -// type: 'exec', -// name: 'Simulator Build', -// platform: { os: 'darwin', arch: 'amd64' }, -// steps: [ -// clone_submodules, -// // install_xcpretty, -// install_cocoapods, -// { -// name: 'Build', -// commands: [ -// 'mkdir build', -// 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator"' // | xcpretty' -// ], -// }, -// { -// name: 'Upload artifacts', -// commands: [ -// './.drone-static-upload.sh' -// ] -// } -// ], -// }, -// // AppStore build (generate an archive to be signed later) -// { -// kind: 'pipeline', -// type: 'exec', -// name: 'AppStore Build', -// platform: { os: 'darwin', arch: 'amd64' }, -// steps: [ -// clone_submodules, -// // install_xcpretty, -// install_cocoapods, -// { -// name: 'Build', -// commands: [ -// 'mkdir build', -// 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -archivePath ./build/Session.xcarchive -destination "platform=generic/iOS" | xcpretty' -// ], -// }, -// ], -// }, ] \ No newline at end of file diff --git a/LibSession-Util b/LibSession-Util index e0b994201..d8f07fa92 160000 --- a/LibSession-Util +++ b/LibSession-Util @@ -1 +1 @@ -Subproject commit e0b994201a016cc5bf9065526a0ceb4291f60d5a +Subproject commit d8f07fa92c12c5c2409774e03e03395d7847d1c2 diff --git a/Scripts/LintLocalizableStrings.swift b/Scripts/LintLocalizableStrings.swift index 12bd626aa..910179348 100755 --- a/Scripts/LintLocalizableStrings.swift +++ b/Scripts/LintLocalizableStrings.swift @@ -26,6 +26,7 @@ var pathFiles: [String] = { return fileUrls .filter { ((try? $0.resourceValues(forKeys: [.isDirectoryKey]))?.isDirectory == false) && // No directories + !$0.path.contains("build/") && // Exclude files under the build folder (CI) !$0.path.contains("Pods/") && // Exclude files under the pods folder !$0.path.contains(".xcassets") && // Exclude asset bundles !$0.path.contains(".app/") && // Exclude files in the app build directories diff --git a/.drone-static-upload.sh b/Scripts/drone-static-upload.sh similarity index 83% rename from .drone-static-upload.sh rename to Scripts/drone-static-upload.sh index b1f7c0887..4fd13faa5 100755 --- a/.drone-static-upload.sh +++ b/Scripts/drone-static-upload.sh @@ -31,10 +31,20 @@ fi mkdir -v "$base" # Copy over the build products +prod_path="build/Session.xcarchive" +sim_path="build/Session_sim.xcarchive/Products/Applications/Session.app" + mkdir build echo "Test" > "build/test.txt" -cp -av build/test.txt "$base" -# cp -av build/Build/Products/App\ Store\ Release-iphonesimulator/Session.app "$base" + +if [ ! -d $prod_path ]; then + cp -av $prod_path "$base" +else if [ ! -d $sim_path ]; then + cp -av $sim_path "$base" +else + echo "Expected a file to upload, found none" >&2 + exit 1 +fi # tar dat shiz up yo archive="$base.tar.xz" @@ -54,9 +64,7 @@ for p in "${upload_dirs[@]}"; do mkdirs="$mkdirs -mkdir $dir_tmp" done -if [ -e "$base-debug-symbols.tar.xz" ] ; then - put_debug="put $base-debug-symbols.tar.xz $upload_to" -fi + sftp -i ssh_key -b - -o StrictHostKeyChecking=off drone@oxen.rocks < 1 && + changeset[changeset.count - 2].elementDeleted == changeset[changeset.count - 1].elementInserted + else { return false } + + let deletedModels: [MessageViewModel] = changeset[changeset.count - 2] + .elementDeleted + .map { self.viewModel.interactionData[$0.section].elements[$0.element] } + let insertedModels: [MessageViewModel] = changeset[changeset.count - 1] + .elementInserted + .map { updatedData[$0.section].elements[$0.element] } + + // Make sure all the deleted models were optimistic updates, the inserted models were not + // optimistic updates and they have the same timestamps + return ( + deletedModels.map { $0.id }.asSet() == [MessageViewModel.optimisticUpdateId] && + insertedModels.map { $0.id }.asSet() != [MessageViewModel.optimisticUpdateId] && + deletedModels.map { $0.timestampMs }.asSet() == insertedModels.map { $0.timestampMs }.asSet() + ) + }() let wasOnlyUpdates: Bool = ( - changeset.count == 1 && - changeset[0].elementUpdated.count == changeset[0].changeCount + onlyReplacedOptimisticUpdate || ( + changeset.count == 1 && + changeset[0].elementUpdated.count == changeset[0].changeCount + ) ) self.viewModel.sentMessageBeforeUpdate = false @@ -912,13 +937,13 @@ final class ConversationVC: BaseVC, SessionUtilRespondingViewController, Convers guard !didSendMessageBeforeUpdate && !wasOnlyUpdates else { self.viewModel.updateInteractionData(updatedData) self.tableView.reloadData() - self.tableView.layoutIfNeeded() // If we just sent a message then we want to jump to the bottom of the conversation instantly if didSendMessageBeforeUpdate { // We need to dispatch to the next run loop because it seems trying to scroll immediately after // triggering a 'reloadData' doesn't work DispatchQueue.main.async { [weak self] in + self?.tableView.layoutIfNeeded() self?.scrollToBottom(isAnimated: false) // Note: The scroll button alpha won't get set correctly in this case so we forcibly set it to diff --git a/Session/Media Viewing & Editing/GIFs/GiphyAPI.swift b/Session/Media Viewing & Editing/GIFs/GiphyAPI.swift index 1a3f6eef5..57ce17769 100644 --- a/Session/Media Viewing & Editing/GIFs/GiphyAPI.swift +++ b/Session/Media Viewing & Editing/GIFs/GiphyAPI.swift @@ -299,7 +299,7 @@ enum GiphyAPI { return HTTPError.generic } .map { data, _ in - Logger.error("search request succeeded") + Logger.debug("search request succeeded") guard let imageInfos = self.parseGiphyImages(responseData: data) else { Logger.error("unable to parse trending images") @@ -347,7 +347,7 @@ enum GiphyAPI { return HTTPError.generic } .tryMap { data, _ -> [GiphyImageInfo] in - Logger.error("search request succeeded") + Logger.debug("search request succeeded") guard let imageInfos = self.parseGiphyImages(responseData: data) else { throw HTTPError.invalidResponse diff --git a/SessionMessagingKit/Jobs/Types/MessageSendJob.swift b/SessionMessagingKit/Jobs/Types/MessageSendJob.swift index ad8f54c77..a9c4ffb8d 100644 --- a/SessionMessagingKit/Jobs/Types/MessageSendJob.swift +++ b/SessionMessagingKit/Jobs/Types/MessageSendJob.swift @@ -39,8 +39,7 @@ public enum MessageSendJob: JobExecutor { /// already have attachments in a valid state if details.message is VisibleMessage, - (details.message as? VisibleMessage)?.reaction == nil && - details.isSyncMessage == false + (details.message as? VisibleMessage)?.reaction == nil { guard let jobId: Int64 = job.id, @@ -51,122 +50,111 @@ public enum MessageSendJob: JobExecutor { return } - // If the original interaction no longer exists then don't bother sending the message (ie. the - // message was deleted before it even got sent) - guard Storage.shared.read({ db in try Interaction.exists(db, id: interactionId) }) == true else { - SNLog("[MessageSendJob] Failing due to missing interaction") - failure(job, StorageError.objectNotFound, true) - return - } - - // Check if there are any attachments associated to this message, and if so - // upload them now - // - // Note: Normal attachments should be sent in a non-durable way but any - // attachments for LinkPreviews and Quotes will be processed through this mechanism - let attachmentState: (shouldFail: Bool, shouldDefer: Bool, fileIds: [String])? = Storage.shared.write { db in - let allAttachmentStateInfo: [Attachment.StateInfo] = try Attachment - .stateInfo(interactionId: interactionId) - .fetchAll(db) - let maybeFileIds: [String?] = allAttachmentStateInfo - .sorted { lhs, rhs in lhs.albumIndex < rhs.albumIndex } - .map { Attachment.fileId(for: $0.downloadUrl) } - let fileIds: [String] = maybeFileIds.compactMap { $0 } - - // If there were failed attachments then this job should fail (can't send a - // message which has associated attachments if the attachments fail to upload) - guard !allAttachmentStateInfo.contains(where: { $0.state == .failedDownload }) else { - return (true, false, fileIds) - } - - // Create jobs for any pending (or failed) attachment jobs and insert them into the - // queue before the current job (this will mean the current job will re-run - // after these inserted jobs complete) - // - // Note: If there are any 'downloaded' attachments then they also need to be - // uploaded (as a 'downloaded' attachment will be on the current users device - // but not on the message recipients device - both LinkPreview and Quote can - // have this case) - try allAttachmentStateInfo - .filter { attachment -> Bool in - // Non-media quotes won't have thumbnails so so don't try to upload them - guard attachment.downloadUrl != Attachment.nonMediaQuoteFileId else { return false } - - switch attachment.state { - case .uploading, .pendingDownload, .downloading, .failedUpload, .downloaded: - return true - - default: return false + // Retrieve the current attachment state + typealias AttachmentState = (error: Error?, pendingUploadAttachmentIds: [String], preparedFileIds: [String]) + + let attachmentState: AttachmentState = Storage.shared + .read { db in + // If the original interaction no longer exists then don't bother sending the message (ie. the + // message was deleted before it even got sent) + guard try Interaction.exists(db, id: interactionId) else { + SNLog("[MessageSendJob] Failing due to missing interaction") + return (StorageError.objectNotFound, [], []) + } + + // Get the current state of the attachments + let allAttachmentStateInfo: [Attachment.StateInfo] = try Attachment + .stateInfo(interactionId: interactionId) + .fetchAll(db) + let maybeFileIds: [String?] = allAttachmentStateInfo + .sorted { lhs, rhs in lhs.albumIndex < rhs.albumIndex } + .map { Attachment.fileId(for: $0.downloadUrl) } + let fileIds: [String] = maybeFileIds.compactMap { $0 } + + // If there were failed attachments then this job should fail (can't send a + // message which has associated attachments if the attachments fail to upload) + guard !allAttachmentStateInfo.contains(where: { $0.state == .failedDownload }) else { + SNLog("[MessageSendJob] Failing due to failed attachment upload") + return (AttachmentError.notUploaded, [], fileIds) + } + + /// Find all attachmentIds for attachments which need to be uploaded + /// + /// **Note:** If there are any 'downloaded' attachments then they also need to be uploaded (as a + /// 'downloaded' attachment will be on the current users device but not on the message recipients + /// device - both `LinkPreview` and `Quote` can have this case) + let pendingUploadAttachmentIds: [String] = allAttachmentStateInfo + .filter { attachment -> Bool in + // Non-media quotes won't have thumbnails so so don't try to upload them + guard attachment.downloadUrl != Attachment.nonMediaQuoteFileId else { return false } + + switch attachment.state { + case .uploading, .pendingDownload, .downloading, .failedUpload, .downloaded: + return true + + default: return false + } } - } - .filter { stateInfo in - // Don't add a new job if there is one already in the queue - !JobRunner.hasPendingOrRunningJob( - with: .attachmentUpload, - details: AttachmentUploadJob.Details( - messageSendJobId: jobId, - attachmentId: stateInfo.attachmentId - ) - ) - } - .compactMap { stateInfo -> (jobId: Int64, job: Job)? in - JobRunner - .insert( - db, - job: Job( - variant: .attachmentUpload, - behaviour: .runOnce, - threadId: job.threadId, - interactionId: interactionId, - details: AttachmentUploadJob.Details( - messageSendJobId: jobId, - attachmentId: stateInfo.attachmentId - ) - ), - before: job - ) - } - .forEach { otherJobId, _ in - // Create the dependency between the jobs - try JobDependencies( - jobId: jobId, - dependantId: otherJobId - ) - .insert(db) - } - - // If there were pending or uploading attachments then stop here (we want to - // upload them first and then re-run this send job - the 'JobRunner.insert' - // method will take care of this) - let isMissingFileIds: Bool = (maybeFileIds.count != fileIds.count) - let hasPendingUploads: Bool = allAttachmentStateInfo.contains(where: { $0.state != .uploaded }) - - return ( - (isMissingFileIds && !hasPendingUploads), - hasPendingUploads, - fileIds - ) - } - - // Don't send messages with failed attachment uploads - // - // Note: If we have gotten to this point then any dependant attachment upload - // jobs will have permanently failed so this message send should also do so - guard attachmentState?.shouldFail == false else { - SNLog("[MessageSendJob] Failing due to failed attachment upload") - failure(job, AttachmentError.notUploaded, true) - return + .map { $0.attachmentId } + + return (nil, pendingUploadAttachmentIds, fileIds) + } + .defaulting(to: (MessageSenderError.invalidMessage, [], [])) + + /// If we got an error when trying to retrieve the attachment state then this job is actually invalid so it + /// should permanently fail + guard attachmentState.error == nil else { + return failure(job, (attachmentState.error ?? MessageSenderError.invalidMessage), true) } - // Defer the job if we found incomplete uploads - guard attachmentState?.shouldDefer == false else { - SNLog("[MessageSendJob] Deferring pending attachment uploads") - deferred(job) - return + /// If we have any pending (or failed) attachment uploads then we should create jobs for them and insert them into the + /// queue before the current job and defer it (this will mean the current job will re-run after these inserted jobs complete) + guard attachmentState.pendingUploadAttachmentIds.isEmpty else { + Storage.shared.write { db in + try attachmentState.pendingUploadAttachmentIds + .filter { attachmentId in + // Don't add a new job if there is one already in the queue + !JobRunner.hasPendingOrRunningJob( + with: .attachmentUpload, + details: AttachmentUploadJob.Details( + messageSendJobId: jobId, + attachmentId: attachmentId + ) + ) + } + .compactMap { attachmentId -> (jobId: Int64, job: Job)? in + JobRunner + .insert( + db, + job: Job( + variant: .attachmentUpload, + behaviour: .runOnce, + threadId: job.threadId, + interactionId: interactionId, + details: AttachmentUploadJob.Details( + messageSendJobId: jobId, + attachmentId: attachmentId + ) + ), + before: job + ) + } + .forEach { otherJobId, _ in + // Create the dependency between the jobs + try JobDependencies( + jobId: jobId, + dependantId: otherJobId + ) + .insert(db) + } + } + + SNLog("[MessageSendJob] Deferring due to pending attachment uploads") + return deferred(job) } - + // Store the fileIds so they can be sent with the open group message content - messageFileIds = (attachmentState?.fileIds ?? []) + messageFileIds = attachmentState.preparedFileIds } // Store the sentTimestamp from the message in case it fails due to a clockOutOfSync error diff --git a/SessionMessagingKit/Sending & Receiving/MessageSender.swift b/SessionMessagingKit/Sending & Receiving/MessageSender.swift index 9005bf1b8..2893c8aa1 100644 --- a/SessionMessagingKit/Sending & Receiving/MessageSender.swift +++ b/SessionMessagingKit/Sending & Receiving/MessageSender.swift @@ -606,6 +606,21 @@ public final class MessageSender { ) guard expectedAttachmentUploadCount == preparedSendData.totalAttachmentsUploaded else { + // Make sure to actually handle this as a failure (if we don't then the message + // won't go into an error state correctly) + if let message: Message = preparedSendData.message { + dependencies.storage.read { db in + MessageSender.handleFailedMessageSend( + db, + message: message, + with: .attachmentsNotUploaded, + interactionId: preparedSendData.interactionId, + isSyncMessage: (preparedSendData.isSyncMessage == true), + using: dependencies + ) + } + } + return Fail(error: MessageSenderError.attachmentsNotUploaded) .eraseToAnyPublisher() } @@ -992,7 +1007,6 @@ public final class MessageSender { isSyncMessage: Bool = false, using dependencies: SMKDependencies = SMKDependencies() ) -> Error { - // TODO: Revert the local database change // If the message was a reaction then we don't want to do anything to the original // interaciton (which the 'interactionId' is pointing to guard (message as? VisibleMessage)?.reaction == nil else { return error } diff --git a/SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift b/SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift index 02b793160..3936baf4f 100644 --- a/SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift +++ b/SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift @@ -14,7 +14,12 @@ public final class CurrentUserPoller: Poller { // MARK: - Settings - override var namespaces: [SnodeAPI.Namespace] { CurrentUserPoller.namespaces } + override var namespaces: [SnodeAPI.Namespace] { + // FIXME: Remove this once `useSharedUtilForUserConfig` is permanent + guard SessionUtil.userConfigsEnabled else { return [.default] } + + return CurrentUserPoller.namespaces + } /// After polling a given snode this many times we always switch to a new one. /// diff --git a/SessionMessagingKit/Sending & Receiving/Quotes/QuotedReplyModel.swift b/SessionMessagingKit/Sending & Receiving/Quotes/QuotedReplyModel.swift index 562621a36..94a6c2ee4 100644 --- a/SessionMessagingKit/Sending & Receiving/Quotes/QuotedReplyModel.swift +++ b/SessionMessagingKit/Sending & Receiving/Quotes/QuotedReplyModel.swift @@ -71,16 +71,3 @@ public struct QuotedReplyModel { ) } } - -// MARK: - Convenience - -public extension QuotedReplyModel { - func generateAttachmentThumbnailIfNeeded(_ db: Database) throws -> String? { - guard let sourceAttachment: Attachment = self.attachment else { return nil } - - return try sourceAttachment - .cloneAsQuoteThumbnail()? - .inserted(db) - .id - } -} diff --git a/SessionMessagingKit/SessionUtil/SessionUtil.swift b/SessionMessagingKit/SessionUtil/SessionUtil.swift index 62b77c9fe..d933238a5 100644 --- a/SessionMessagingKit/SessionUtil/SessionUtil.swift +++ b/SessionMessagingKit/SessionUtil/SessionUtil.swift @@ -10,9 +10,7 @@ import SessionUtilitiesKit public extension Features { static func useSharedUtilForUserConfig(_ db: Database? = nil) -> Bool { - return true - // TODO: Need to set this timestamp to the correct date (currently start of 2030) -// guard Date().timeIntervalSince1970 < 1893456000 else { return true } + guard Date().timeIntervalSince1970 < 1690761600 else { return true } guard !SessionUtil.hasCheckedMigrationsCompleted.wrappedValue else { return SessionUtil.userConfigsEnabledIgnoringFeatureFlag } diff --git a/SessionMessagingKit/Shared Models/MessageViewModel.swift b/SessionMessagingKit/Shared Models/MessageViewModel.swift index 67d719d74..57fd9acc8 100644 --- a/SessionMessagingKit/Shared Models/MessageViewModel.swift +++ b/SessionMessagingKit/Shared Models/MessageViewModel.swift @@ -527,6 +527,7 @@ public extension MessageViewModel { public extension MessageViewModel { static let genericId: Int64 = -1 static let typingIndicatorId: Int64 = -2 + static let optimisticUpdateId: Int64 = -3 /// This init method is only used for system-created cells or empty states init( @@ -634,8 +635,8 @@ public extension MessageViewModel { // Interaction Info - self.rowId = -1 - self.id = -1 + self.rowId = MessageViewModel.optimisticUpdateId + self.id = MessageViewModel.optimisticUpdateId self.openGroupServerMessageId = nil self.variant = .standardOutgoing self.timestampMs = timestampMs From f15f16be708d88b3eb70f929669f0bef8a833279 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 15:35:35 +1000 Subject: [PATCH 14/19] More CI tweaks Updated the Podfile to use the CocoaPods CDN (hopefully much faster than the master spec repo) Removed the custom derivedDataPath (seemed to break the Copy Frameworks step of CocoaPods) --- .drone.jsonnet | 8 ++++---- Podfile | 3 ++- Podfile.lock | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 07634ce4c..16946af5d 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -58,9 +58,9 @@ local install_cocoapods = { 'mkdir build', ||| if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -derivedDataPath ./build -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' | xcpretty + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' | xcpretty else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -derivedDataPath ./build -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' fi ||| ], @@ -88,9 +88,9 @@ local install_cocoapods = { 'mkdir build', ||| if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -derivedDataPath ./build -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' | xcpretty + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' | xcpretty else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -derivedDataPath ./build -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' fi ||| ], diff --git a/Podfile b/Podfile index 76cf57a85..69fbc174f 100644 --- a/Podfile +++ b/Podfile @@ -1,9 +1,10 @@ platform :ios, '13.0' -source 'https://github.com/CocoaPods/Specs.git' use_frameworks! inhibit_all_warnings! +install! 'cocoapods', :warn_for_unused_master_specs_repo => false + # Dependencies to be included in the app and all extensions/frameworks abstract_target 'GlobalDependencies' do # FIXME: If https://github.com/jedisct1/swift-sodium/pull/249 gets resolved then revert this back to the standard pod diff --git a/Podfile.lock b/Podfile.lock index d0b6c6490..a2e1e4dae 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -198,6 +198,6 @@ SPEC CHECKSUMS: YapDatabase: b418a4baa6906e8028748938f9159807fd039af4 YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331 -PODFILE CHECKSUM: 4705728e69454d50805c70272479a7d4a04209d5 +PODFILE CHECKSUM: f56c28baefe3077effcb3a2ea5941b52c4cc6e86 COCOAPODS: 1.12.1 From 9bdae9dee8c469da2bdbd0916fabd62e15beff0d Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 15:40:32 +1000 Subject: [PATCH 15/19] Fixed a typo in the Ci config --- .drone.jsonnet | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 16946af5d..f0a2e8beb 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -34,9 +34,9 @@ local install_cocoapods = { 'mkdir build', ||| if command -v xcpretty >/dev/null 2>&1; then - 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcpretty' + xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcpretty else - 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' + xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" fi ||| ], @@ -58,9 +58,9 @@ local install_cocoapods = { 'mkdir build', ||| if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' | xcpretty + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | xcpretty else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination 'generic/platform=iOS Simulator' + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" fi ||| ], @@ -88,9 +88,9 @@ local install_cocoapods = { 'mkdir build', ||| if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' | xcpretty + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" | xcpretty else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination 'generic/platform=iOS' + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" fi ||| ], From 69ddb782a1a23e4a8f01e42b354b7902b7adb4d7 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 16:01:57 +1000 Subject: [PATCH 16/19] Attempting to cache the Pods folder to speed up the CI Fixed a CocoaPods warning --- .drone.jsonnet | 50 +++++++++++++++++++++++++++++-- Session.xcodeproj/project.pbxproj | 7 +++-- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index f0a2e8beb..c610d730b 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -16,6 +16,45 @@ local install_cocoapods = { commands: ['LANG=en_US.UTF-8 pod install'] }; +// Load from the cached CocoaPods directory (to speed up the build) +local load_cocoapods_cache = { + name: 'Load CocoaPods Cache', + commands: [ + ||| + while test -e /Users/drone/.cocoapods_cache.lock; do + sleep 1 + done + |||, + 'touch /Users/drone/.cocoapods_cache.lock' + ||| + if [[ -d /Users/drone/.cocoapods_cache ]]; then + cp -r /Users/drone/.cocoapods_cache ./Pods + fi + |||, + 'rm /Users/drone/.cocoapods_cache.lock' + ] +}; + +// Override the cached CocoaPods directory (to speed up the next build) +local update_cocoapods_cache = { + name: 'Update CocoaPods Cache', + commands: [ + ||| + while test -e /Users/drone/.cocoapods_cache.lock; do + sleep 1 + done + |||, + 'touch /Users/drone/.cocoapods_cache.lock' + ||| + if [[ -d ./Pods ]]; then + rm -rf /Users/drone/.cocoapods_cache + cp -r ./Pods /Users/drone/.cocoapods_cache + fi + |||, + 'rm /Users/drone/.cocoapods_cache.lock' + ] +}; + [ // Unit tests @@ -26,7 +65,7 @@ local install_cocoapods = { platform: { os: 'darwin', arch: 'amd64' }, steps: [ clone_submodules, - // install_xcpretty, + load_cocoapods_cache, install_cocoapods, { name: 'Run Unit Tests', @@ -41,6 +80,7 @@ local install_cocoapods = { ||| ], }, + update_cocoapods_cache ], }, // Simulator build @@ -51,6 +91,7 @@ local install_cocoapods = { platform: { os: 'darwin', arch: 'amd64' }, steps: [ clone_submodules, + load_cocoapods_cache, install_cocoapods, { name: 'Build', @@ -65,6 +106,7 @@ local install_cocoapods = { ||| ], }, + update_cocoapods_cache, { name: 'Upload artifacts', commands: [ @@ -81,6 +123,7 @@ local install_cocoapods = { platform: { os: 'darwin', arch: 'amd64' }, steps: [ clone_submodules, + load_cocoapods_cache, install_cocoapods, { name: 'Build', @@ -88,13 +131,14 @@ local install_cocoapods = { 'mkdir build', ||| if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" | xcpretty + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates | xcpretty else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" + xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates fi ||| ], }, + update_cocoapods_cache, { name: 'Upload artifacts', commands: [ diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index b1d01de68..927af5747 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -5339,8 +5339,8 @@ inputFileListPaths = ( ); inputPaths = ( - "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH", - "$TARGET_BUILD_DIR/$INFOPLIST_PATH", + $BUILT_PRODUCTS_DIR/$INFOPLIST_PATH, + $TARGET_BUILD_DIR/$INFOPLIST_PATH, ); name = "Add Commit Hash To Build Info Plist"; outputFileListPaths = ( @@ -7677,6 +7677,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "$(inherited)"; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; @@ -7731,7 +7732,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "$(inherited)"; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; From 6e32e759c50363317bdc64172e54a654306ca843 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 16:03:00 +1000 Subject: [PATCH 17/19] Added missing commas in CI config file --- .drone.jsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index c610d730b..b18251c5a 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -25,7 +25,7 @@ local load_cocoapods_cache = { sleep 1 done |||, - 'touch /Users/drone/.cocoapods_cache.lock' + 'touch /Users/drone/.cocoapods_cache.lock', ||| if [[ -d /Users/drone/.cocoapods_cache ]]; then cp -r /Users/drone/.cocoapods_cache ./Pods @@ -44,7 +44,7 @@ local update_cocoapods_cache = { sleep 1 done |||, - 'touch /Users/drone/.cocoapods_cache.lock' + 'touch /Users/drone/.cocoapods_cache.lock', ||| if [[ -d ./Pods ]]; then rm -rf /Users/drone/.cocoapods_cache From c86cc0ed9c7b5ac4c07cae9f19ca28a0377c9bdd Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 17:57:08 +1000 Subject: [PATCH 18/19] CI tweaks and incremented build number Added the XCBeautify pod (so the CI doesn't need to separately install something) Updated the CI build script to use XCBeautify Fixed some broken unit tests --- .drone.jsonnet | 24 ++-------- Podfile | 3 ++ Podfile.lock | 7 ++- Session.xcodeproj/project.pbxproj | 12 ++--- SessionMessagingKit/Configuration.swift | 7 +-- .../Open Groups/OpenGroupAPISpec.swift | 6 +-- .../Open Groups/OpenGroupManagerSpec.swift | 6 +-- .../MessageReceiverDecryptionSpec.swift | 6 +-- .../MessageSenderEncryptionSpec.swift | 6 +-- SessionSnodeKit/Configuration.swift | 5 ++- ...eadDisappearingMessagesViewModelSpec.swift | 10 ++--- .../ThreadSettingsViewModelSpec.swift | 10 ++--- .../NotificationContentViewModelSpec.swift | 10 ++--- SessionUIKit/Configuration.swift | 5 ++- SessionUtilitiesKit/Configuration.swift | 5 ++- SessionUtilitiesKit/Database/Storage.swift | 45 ++++++++++++------- .../Database/Types/TargetMigrations.swift | 5 +++ .../Database/Models/IdentitySpec.swift | 4 +- .../PersistableRecordUtilitiesSpec.swift | 20 ++++++--- SignalUtilitiesKit/Utilities/AppSetup.swift | 10 ++--- 20 files changed, 113 insertions(+), 93 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index b18251c5a..f6b9eb6d4 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -71,13 +71,7 @@ local update_cocoapods_cache = { name: 'Run Unit Tests', commands: [ 'mkdir build', - ||| - if command -v xcpretty >/dev/null 2>&1; then - xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcpretty - else - xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" - fi - ||| + 'NSUnbufferedIO=YES set -o pipefail && xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro" -maximum-test-execution-time-allowance 2 -collect-test-diagnostics never 2>&1 | ./Pods/xcbeautify/xcbeautify' ], }, update_cocoapods_cache @@ -97,13 +91,7 @@ local update_cocoapods_cache = { name: 'Build', commands: [ 'mkdir build', - ||| - if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | xcpretty - else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" - fi - ||| + 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | ./Pods/xcbeautify/xcbeautify' ], }, update_cocoapods_cache, @@ -129,13 +117,7 @@ local update_cocoapods_cache = { name: 'Build', commands: [ 'mkdir build', - ||| - if command -v xcpretty >/dev/null 2>&1; then - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates | xcpretty - else - xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates - fi - ||| + 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates | ./Pods/xcbeautify/xcbeautify' ], }, update_cocoapods_cache, diff --git a/Podfile b/Podfile index 69fbc174f..201db8853 100644 --- a/Podfile +++ b/Podfile @@ -5,6 +5,9 @@ inhibit_all_warnings! install! 'cocoapods', :warn_for_unused_master_specs_repo => false +# CI Dependencies +pod 'xcbeautify' + # Dependencies to be included in the app and all extensions/frameworks abstract_target 'GlobalDependencies' do # FIXME: If https://github.com/jedisct1/swift-sodium/pull/249 gets resolved then revert this back to the standard pod diff --git a/Podfile.lock b/Podfile.lock index a2e1e4dae..4a101f497 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -42,6 +42,7 @@ PODS: - SQLCipher/common - SwiftProtobuf (1.5.0) - WebRTC-lib (114.0.0) + - xcbeautify (0.17.0) - YapDatabase/SQLCipher (3.1.1): - YapDatabase/SQLCipher/Core (= 3.1.1) - YapDatabase/SQLCipher/Extensions (= 3.1.1) @@ -124,6 +125,7 @@ DEPENDENCIES: - SQLCipher (~> 4.5.3) - SwiftProtobuf (~> 1.5.0) - WebRTC-lib + - xcbeautify - YapDatabase/SQLCipher (from `https://github.com/oxen-io/session-ios-yap-database.git`, branch `signal-release`) - YYImage/libwebp (from `https://github.com/signalapp/YYImage`) @@ -143,6 +145,8 @@ SPEC REPOS: - SQLCipher - SwiftProtobuf - WebRTC-lib + trunk: + - xcbeautify EXTERNAL SOURCES: Curve25519Kit: @@ -195,9 +199,10 @@ SPEC CHECKSUMS: SQLCipher: 57fa9f863fa4a3ed9dd3c90ace52315db8c0fdca SwiftProtobuf: 241400280f912735c1e1b9fe675fdd2c6c4d42e2 WebRTC-lib: d83df8976fa608b980f1d85796b3de66d60a1953 + xcbeautify: 6e2f57af5c3a86d490376d5758030a8dcc201c1b YapDatabase: b418a4baa6906e8028748938f9159807fd039af4 YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331 -PODFILE CHECKSUM: f56c28baefe3077effcb3a2ea5941b52c4cc6e86 +PODFILE CHECKSUM: dd814a5a92577bb2a94dac6a1cc482f193721cdf COCOAPODS: 1.12.1 diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 927af5747..8dd26fc33 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -6366,7 +6366,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 418; + CURRENT_PROJECT_VERSION = 419; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -6438,7 +6438,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 418; + CURRENT_PROJECT_VERSION = 419; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; ENABLE_NS_ASSERTIONS = NO; @@ -6503,7 +6503,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 418; + CURRENT_PROJECT_VERSION = 419; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -6577,7 +6577,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 418; + CURRENT_PROJECT_VERSION = 419; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; ENABLE_NS_ASSERTIONS = NO; @@ -7537,7 +7537,7 @@ CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 418; + CURRENT_PROJECT_VERSION = 419; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -7608,7 +7608,7 @@ CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 418; + CURRENT_PROJECT_VERSION = 419; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/SessionMessagingKit/Configuration.swift b/SessionMessagingKit/Configuration.swift index c6d92487c..384aa7249 100644 --- a/SessionMessagingKit/Configuration.swift +++ b/SessionMessagingKit/Configuration.swift @@ -1,8 +1,9 @@ import Foundation +import GRDB import SessionUtilitiesKit -public enum SNMessagingKit { // Just to make the external API nice - public static func migrations() -> TargetMigrations { +public enum SNMessagingKit: MigratableTarget { // Just to make the external API nice + public static func migrations(_ db: Database) -> TargetMigrations { return TargetMigrations( identifier: .messagingKit, migrations: [ @@ -33,7 +34,7 @@ public enum SNMessagingKit { // Just to make the external API nice // Wait until the feature is turned on before doing the migration that generates // the config dump data // FIXME: Remove this once `useSharedUtilForUserConfig` is permanent - (Features.useSharedUtilForUserConfig() ? + (Features.useSharedUtilForUserConfig(db) ? _014_GenerateInitialUserConfigDumps.self : (nil as Migration.Type?) ) diff --git a/SessionMessagingKitTests/Open Groups/OpenGroupAPISpec.swift b/SessionMessagingKitTests/Open Groups/OpenGroupAPISpec.swift index c74bf5c2c..d87bfdca3 100644 --- a/SessionMessagingKitTests/Open Groups/OpenGroupAPISpec.swift +++ b/SessionMessagingKitTests/Open Groups/OpenGroupAPISpec.swift @@ -37,9 +37,9 @@ class OpenGroupAPISpec: QuickSpec { beforeEach { mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNMessagingKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNMessagingKit.self ] ) mockSodium = MockSodium() diff --git a/SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift b/SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift index cfc807596..5386c3207 100644 --- a/SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift +++ b/SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift @@ -103,9 +103,9 @@ class OpenGroupManagerSpec: QuickSpec { mockGeneralCache = MockGeneralCache() mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNMessagingKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNMessagingKit.self ] ) mockSodium = MockSodium() diff --git a/SessionMessagingKitTests/Sending & Receiving/MessageReceiverDecryptionSpec.swift b/SessionMessagingKitTests/Sending & Receiving/MessageReceiverDecryptionSpec.swift index b9066ba26..7f9a45a13 100644 --- a/SessionMessagingKitTests/Sending & Receiving/MessageReceiverDecryptionSpec.swift +++ b/SessionMessagingKitTests/Sending & Receiving/MessageReceiverDecryptionSpec.swift @@ -27,9 +27,9 @@ class MessageReceiverDecryptionSpec: QuickSpec { beforeEach { mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNMessagingKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNMessagingKit.self ] ) mockSodium = MockSodium() diff --git a/SessionMessagingKitTests/Sending & Receiving/MessageSenderEncryptionSpec.swift b/SessionMessagingKitTests/Sending & Receiving/MessageSenderEncryptionSpec.swift index 6334229a1..f937b3744 100644 --- a/SessionMessagingKitTests/Sending & Receiving/MessageSenderEncryptionSpec.swift +++ b/SessionMessagingKitTests/Sending & Receiving/MessageSenderEncryptionSpec.swift @@ -24,9 +24,9 @@ class MessageSenderEncryptionSpec: QuickSpec { beforeEach { mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNMessagingKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNMessagingKit.self ] ) mockBox = MockBox() diff --git a/SessionSnodeKit/Configuration.swift b/SessionSnodeKit/Configuration.swift index dcf685839..7f8a597d4 100644 --- a/SessionSnodeKit/Configuration.swift +++ b/SessionSnodeKit/Configuration.swift @@ -1,10 +1,11 @@ // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved. import Foundation +import GRDB import SessionUtilitiesKit -public enum SNSnodeKit { // Just to make the external API nice - public static func migrations() -> TargetMigrations { +public enum SNSnodeKit: MigratableTarget { // Just to make the external API nice + public static func migrations(_ db: Database) -> TargetMigrations { return TargetMigrations( identifier: .snodeKit, migrations: [ diff --git a/SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift b/SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift index 89d8453f7..0a9dfcf21 100644 --- a/SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift +++ b/SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift @@ -26,11 +26,11 @@ class ThreadDisappearingMessagesSettingsViewModelSpec: QuickSpec { beforeEach { mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNSnodeKit.migrations(), - SNMessagingKit.migrations(), - SNUIKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNSnodeKit.self, + SNMessagingKit.self, + SNUIKit.self ] ) dependencies = Dependencies( diff --git a/SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift b/SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift index eaf4b915b..60ed929db 100644 --- a/SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift +++ b/SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift @@ -28,11 +28,11 @@ class ThreadSettingsViewModelSpec: QuickSpec { beforeEach { mockStorage = SynchronousStorage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNSnodeKit.migrations(), - SNMessagingKit.migrations(), - SNUIKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNSnodeKit.self, + SNMessagingKit.self, + SNUIKit.self ] ) mockGeneralCache = MockGeneralCache() diff --git a/SessionTests/Settings/NotificationContentViewModelSpec.swift b/SessionTests/Settings/NotificationContentViewModelSpec.swift index 81a838f15..e6d1e5999 100644 --- a/SessionTests/Settings/NotificationContentViewModelSpec.swift +++ b/SessionTests/Settings/NotificationContentViewModelSpec.swift @@ -25,11 +25,11 @@ class NotificationContentViewModelSpec: QuickSpec { beforeEach { mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations(), - SNSnodeKit.migrations(), - SNMessagingKit.migrations(), - SNUIKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self, + SNSnodeKit.self, + SNMessagingKit.self, + SNUIKit.self ] ) viewModel = NotificationContentViewModel(storage: mockStorage, scheduling: .immediate) diff --git a/SessionUIKit/Configuration.swift b/SessionUIKit/Configuration.swift index d305968e9..798ba98eb 100644 --- a/SessionUIKit/Configuration.swift +++ b/SessionUIKit/Configuration.swift @@ -1,10 +1,11 @@ // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved. import Foundation +import GRDB import SessionUtilitiesKit -public enum SNUIKit { - public static func migrations() -> TargetMigrations { +public enum SNUIKit: MigratableTarget { + public static func migrations(_ db: Database) -> TargetMigrations { return TargetMigrations( identifier: .uiKit, migrations: [ diff --git a/SessionUtilitiesKit/Configuration.swift b/SessionUtilitiesKit/Configuration.swift index 616e27ed3..df5b5b366 100644 --- a/SessionUtilitiesKit/Configuration.swift +++ b/SessionUtilitiesKit/Configuration.swift @@ -1,9 +1,10 @@ // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved. import Foundation +import GRDB -public enum SNUtilitiesKit { // Just to make the external API nice - public static func migrations() -> TargetMigrations { +public enum SNUtilitiesKit: MigratableTarget { // Just to make the external API nice + public static func migrations(_ db: Database) -> TargetMigrations { return TargetMigrations( identifier: .utilitiesKit, migrations: [ diff --git a/SessionUtilitiesKit/Database/Storage.swift b/SessionUtilitiesKit/Database/Storage.swift index 1667f1384..c00a2a45f 100644 --- a/SessionUtilitiesKit/Database/Storage.swift +++ b/SessionUtilitiesKit/Database/Storage.swift @@ -47,14 +47,14 @@ open class Storage { public init( customWriter: DatabaseWriter? = nil, - customMigrations: [TargetMigrations]? = nil + customMigrationTargets: [MigratableTarget.Type]? = nil ) { - configureDatabase(customWriter: customWriter, customMigrations: customMigrations) + configureDatabase(customWriter: customWriter, customMigrationTargets: customMigrationTargets) } private func configureDatabase( customWriter: DatabaseWriter? = nil, - customMigrations: [TargetMigrations]? = nil + customMigrationTargets: [MigratableTarget.Type]? = nil ) { // Create the database directory if needed and ensure it's protection level is set before attempting to // create the database KeySpec or the database itself @@ -66,7 +66,12 @@ open class Storage { dbWriter = customWriter isValid = true Storage.internalHasCreatedValidInstance.mutate { $0 = true } - perform(migrations: (customMigrations ?? []), async: false, onProgressUpdate: nil, onComplete: { _, _ in }) + perform( + migrationTargets: (customMigrationTargets ?? []), + async: false, + onProgressUpdate: nil, + onComplete: { _, _ in } + ) return } @@ -128,7 +133,7 @@ open class Storage { } public func perform( - migrations: [TargetMigrations], + migrationTargets: [MigratableTarget.Type], async: Bool = true, onProgressUpdate: ((CGFloat, TimeInterval) -> ())?, onComplete: @escaping (Swift.Result, Bool) -> () @@ -141,18 +146,28 @@ open class Storage { } typealias MigrationInfo = (identifier: TargetMigrations.Identifier, migrations: TargetMigrations.MigrationSet) - let sortedMigrationInfo: [MigrationInfo] = migrations - .sorted() - .reduce(into: [[MigrationInfo]]()) { result, next in - next.migrations.enumerated().forEach { index, migrationSet in - if result.count <= index { - result.append([]) - } + let maybeSortedMigrationInfo: [MigrationInfo]? = try? dbWriter + .read { db -> [MigrationInfo] in + migrationTargets + .map { target -> TargetMigrations in target.migrations(db) } + .sorted() + .reduce(into: [[MigrationInfo]]()) { result, next in + next.migrations.enumerated().forEach { index, migrationSet in + if result.count <= index { + result.append([]) + } - result[index] = (result[index] + [(next.identifier, migrationSet)]) - } + result[index] = (result[index] + [(next.identifier, migrationSet)]) + } + } + .reduce(into: []) { result, next in result.append(contentsOf: next) } } - .reduce(into: []) { result, next in result.append(contentsOf: next) } + + guard let sortedMigrationInfo: [MigrationInfo] = maybeSortedMigrationInfo else { + SNLog("[Database Error] Statup failed with error: Unable to prepare migrations") + onComplete(.failure(StorageError.startupFailed), false) + return + } // Setup and run any required migrations migrator = { [weak self] in diff --git a/SessionUtilitiesKit/Database/Types/TargetMigrations.swift b/SessionUtilitiesKit/Database/Types/TargetMigrations.swift index ad305ab73..f9627a7e8 100644 --- a/SessionUtilitiesKit/Database/Types/TargetMigrations.swift +++ b/SessionUtilitiesKit/Database/Types/TargetMigrations.swift @@ -1,6 +1,11 @@ // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved. import Foundation +import GRDB + +public protocol MigratableTarget { + static func migrations(_ db: Database) -> TargetMigrations +} public struct TargetMigrations: Comparable { /// This identifier is used to determine the order each set of migrations should run in. diff --git a/SessionUtilitiesKitTests/Database/Models/IdentitySpec.swift b/SessionUtilitiesKitTests/Database/Models/IdentitySpec.swift index 7f5ed9da6..7eeb39293 100644 --- a/SessionUtilitiesKitTests/Database/Models/IdentitySpec.swift +++ b/SessionUtilitiesKitTests/Database/Models/IdentitySpec.swift @@ -18,8 +18,8 @@ class IdentitySpec: QuickSpec { beforeEach { mockStorage = Storage( customWriter: try! DatabaseQueue(), - customMigrations: [ - SNUtilitiesKit.migrations() + customMigrationTargets: [ + SNUtilitiesKit.self ] ) } diff --git a/SessionUtilitiesKitTests/Database/Utilities/PersistableRecordUtilitiesSpec.swift b/SessionUtilitiesKitTests/Database/Utilities/PersistableRecordUtilitiesSpec.swift index 2c7b09ce4..e17536fe7 100644 --- a/SessionUtilitiesKitTests/Database/Utilities/PersistableRecordUtilitiesSpec.swift +++ b/SessionUtilitiesKitTests/Database/Utilities/PersistableRecordUtilitiesSpec.swift @@ -84,6 +84,17 @@ class PersistableRecordUtilitiesSpec: QuickSpec { } } + private struct TestTarget: MigratableTarget { + static func migrations(_ db: Database) -> TargetMigrations { + return TargetMigrations( + identifier: .test, + migrations: (0..<100) + .map { _ in [] } + .appending([TestInsertTestTypeMigration.self]) + ) + } + } + // MARK: - Spec override func spec() { @@ -96,13 +107,8 @@ class PersistableRecordUtilitiesSpec: QuickSpec { PersistableRecordUtilitiesSpec.customWriter = customWriter mockStorage = Storage( customWriter: customWriter, - customMigrations: [ - TargetMigrations( - identifier: .test, - migrations: (0..<100) - .map { _ in [] } - .appending([TestInsertTestTypeMigration.self]) - ) + customMigrationTargets: [ + TestTarget.self ] ) } diff --git a/SignalUtilitiesKit/Utilities/AppSetup.swift b/SignalUtilitiesKit/Utilities/AppSetup.swift index efc6d1c25..58f0c6856 100644 --- a/SignalUtilitiesKit/Utilities/AppSetup.swift +++ b/SignalUtilitiesKit/Utilities/AppSetup.swift @@ -66,11 +66,11 @@ public enum AppSetup { var backgroundTask: OWSBackgroundTask? = (backgroundTask ?? OWSBackgroundTask(labelStr: #function)) Storage.shared.perform( - migrations: [ - SNUtilitiesKit.migrations(), - SNSnodeKit.migrations(), - SNMessagingKit.migrations(), - SNUIKit.migrations() + migrationTargets: [ + SNUtilitiesKit.self, + SNSnodeKit.self, + SNMessagingKit.self, + SNUIKit.self ], onProgressUpdate: migrationProgressChanged, onComplete: { result, needsConfigSync in From f13f75eedf3ca10336e3400a7ca773ff62ceddd9 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 13 Jul 2023 17:58:15 +1000 Subject: [PATCH 19/19] Fixed some bad CI script commas --- .drone.jsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index f6b9eb6d4..1377b86f4 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -91,7 +91,7 @@ local update_cocoapods_cache = { name: 'Build', commands: [ 'mkdir build', - 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | ./Pods/xcbeautify/xcbeautify' + 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -archivePath ./build/Session_sim.xcarchive -destination "generic/platform=iOS Simulator" | ./Pods/xcbeautify/xcbeautify' ], }, update_cocoapods_cache, @@ -117,7 +117,7 @@ local update_cocoapods_cache = { name: 'Build', commands: [ 'mkdir build', - 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration 'App Store Release' -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates | ./Pods/xcbeautify/xcbeautify' + 'xcodebuild archive -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphoneos -archivePath ./build/Session.xcarchive -destination "generic/platform=iOS" -allowProvisioningUpdates | ./Pods/xcbeautify/xcbeautify' ], }, update_cocoapods_cache,