diff --git a/Wallet/Sources/AppDelegate.swift b/Wallet/Sources/AppDelegate.swift index ebc8cc17ed..cefa741684 100644 --- a/Wallet/Sources/AppDelegate.swift +++ b/Wallet/Sources/AppDelegate.swift @@ -595,7 +595,8 @@ final class AppDelegate: NSObject, UIApplicationDelegate { secondaryColor: UIColor(rgb: 0x5e5e5e), accentColor: accentColor, destructiveColor: UIColor(rgb: 0xff3b30), - disabledColor: UIColor(rgb: 0xd0d0d0) + disabledColor: UIColor(rgb: 0xd0d0d0), + baseFontSize: 17.0 ), actionSheet: ActionSheetControllerTheme( dimColor: UIColor(white: 0.0, alpha: 0.4), @@ -611,7 +612,8 @@ final class AppDelegate: NSObject, UIApplicationDelegate { controlColor: UIColor(rgb: 0x7e8791), switchFrameColor: UIColor(rgb: 0xe0e0e0), switchContentColor: UIColor(rgb: 0x77d572), - switchHandleColor: UIColor(rgb: 0xffffff) + switchHandleColor: UIColor(rgb: 0xffffff), + baseFontSize: 17.0 ) ), strings: WalletStrings( primaryComponent: WalletStringsComponent( diff --git a/submodules/BuildConfig/BUILD b/submodules/BuildConfig/BUILD index 8f7198ad43..8aa50e3447 100644 --- a/submodules/BuildConfig/BUILD +++ b/submodules/BuildConfig/BUILD @@ -19,7 +19,7 @@ objc_library( copts = [ '-DAPP_CONFIG_API_ID=0', '-DAPP_CONFIG_API_HASH="1"', - '-DAPP_CONFIG_HOCKEYAPP_ID="1"', + '-DAPP_CONFIG_APP_CENTER_ID="1"', '-DAPP_CONFIG_IS_INTERNAL_BUILD=false', '-DAPP_CONFIG_IS_APPSTORE_BUILD=true', '-DAPP_CONFIG_APPSTORE_ID=0', diff --git a/submodules/Display/Source/ListViewItemHeader.swift b/submodules/Display/Source/ListViewItemHeader.swift index fb288b3187..e81635ae8f 100644 --- a/submodules/Display/Source/ListViewItemHeader.swift +++ b/submodules/Display/Source/ListViewItemHeader.swift @@ -50,24 +50,9 @@ open class ListViewItemHeaderNode: ASDisplayNode { self.spring = ListViewItemSpring(stiffness: -280.0, damping: -24.0, mass: 0.85) } - if seeThrough { - if (layerBacked) { - super.init() - self.setLayerBlock({ - return CASeeThroughTracingLayer() - }) - } else { - super.init() - - self.setViewBlock({ - return CASeeThroughTracingView() - }) - } - } else { - super.init() + super.init() - self.isLayerBacked = layerBacked - } + self.isLayerBacked = layerBacked } open func updateStickDistanceFactor(_ factor: CGFloat, transition: ContainedViewLayoutTransition) { diff --git a/submodules/openssl/BUILD b/submodules/openssl/BUILD index a6bc6e5e39..95403b1c26 100644 --- a/submodules/openssl/BUILD +++ b/submodules/openssl/BUILD @@ -109,40 +109,37 @@ openssl_libs = [ "libcrypto.a", ] -archs = ["arm64", "armv7", "x86_64"] - -rules = [ - genrule( - name = "openssl_build_" + arch, - srcs = [ - "build-openssl.sh", - "openssl-1.1.1d.tar.gz", - "patch-conf.patch", - "patch-include.patch", - ], - cmd_bash = - "mkdir -p $(RULEDIR)/{} && cp $(SRCS) $(RULEDIR)/{}/ && sh $(RULEDIR)/{}/build-openssl.sh $(RULEDIR)/{} $(RULEDIR)/{} ".format(arch, arch, arch, arch, arch) + arch + "\n" + - ("\n".join(["cp \"$(RULEDIR)/{}/build/arm64/include/openssl/{}\" \"$(location :{})\"\n".format(arch, x, x) for x in openssl_headers]) if arch == "arm64" else "") + - "\n".join([ - "cp \"$(RULEDIR)/{}/build/{}/lib/{}\" \"$(location :{})\"\n".format(arch, arch, x, arch + "_" + x) for x in openssl_libs - ]), - outs = - (openssl_headers if arch == "arm64" else []) + - [arch + "_" + x for x in openssl_libs], - visibility = [ - "//visibility:public", - ] - ) for arch in archs -] - genrule( - name = "openssl_fat_libraries", - srcs = [":" + arch + "_" + openssl_libs[0] for arch in archs], - cmd_bash = "xcrun lipo {} -output {} -create".format(" ".join(["$(location :" + arch + "_" + openssl_libs[0] + ")" for arch in archs]), "$(location " + openssl_libs[0] + ")"), - outs = openssl_libs, + name = "openssl_build", + srcs = [ + "build-openssl.sh", + "openssl-1.1.1d.tar.gz", + "patch-conf.patch", + "patch-include.patch", + ], + cmd_bash = + """ + if [ "$(TARGET_CPU)" == "ios_armv7" ]; then + BUILD_ARCH="armv7" + elif [ "$(TARGET_CPU)" == "ios_arm64" ]; then + BUILD_ARCH="arm64" + elif [ "$(TARGET_CPU)" == "ios_x86_64" ]; then + BUILD_ARCH="x86_64" + else + echo "Unsupported architecture $(TARGET_CPU)" + fi + """ + "\n" + + "mkdir -p $(RULEDIR)/$$BUILD_ARCH && cp $(SRCS) $(RULEDIR)/$$BUILD_ARCH/ && sh $(RULEDIR)/$$BUILD_ARCH/build-openssl.sh $(RULEDIR)/$$BUILD_ARCH $(RULEDIR)/$$BUILD_ARCH $$BUILD_ARCH" + "\n" + + "\n".join([ + "cp \"$(RULEDIR)/$$BUILD_ARCH/build/arm64/include/openssl/{}\" \"$(location :{})\"\n".format(x, x) for x in openssl_headers + ]) + + "\n".join([ + "cp \"$(RULEDIR)/$$BUILD_ARCH/build/$$BUILD_ARCH/lib/{}\" \"$(location :{})\"\n".format(x, x) for x in openssl_libs + ]), + outs = openssl_headers + openssl_libs, visibility = [ "//visibility:public", - ], + ] ) genrule( diff --git a/submodules/ton/BUILD b/submodules/ton/BUILD index 88fd81982a..f7346410f8 100644 --- a/submodules/ton/BUILD +++ b/submodules/ton/BUILD @@ -48,6 +48,16 @@ genrule( """ set -ex + if [ "$(TARGET_CPU)" == "ios_armv7" ]; then + BUILD_ARCH="armv7" + elif [ "$(TARGET_CPU)" == "ios_arm64" ]; then + BUILD_ARCH="arm64" + elif [ "$(TARGET_CPU)" == "ios_x86_64" ]; then + BUILD_ARCH="x86_64" + else + echo "Unsupported architecture $(TARGET_CPU)" + fi + cp $(location :build-ton.sh) "$(RULEDIR)/" cp $(location :iOS.cmake) "$(RULEDIR)/" tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/" @@ -60,7 +70,7 @@ genrule( done mkdir -p "$(RULEDIR)/Public/ton" - sh $(RULEDIR)/build-ton.sh "$(RULEDIR)" "$(RULEDIR)" "$(RULEDIR)/openssl_headers" + sh $(RULEDIR)/build-ton.sh "$(RULEDIR)" "$(RULEDIR)" "$(RULEDIR)/openssl_headers" $$BUILD_ARCH """ + "\n".join([ "cp -f \"$(RULEDIR)/build/out/include/{}\" \"$(location Public/ton/include/{})\"".format(header, header) for header in ton_headers diff --git a/submodules/ton/build-ton.sh b/submodules/ton/build-ton.sh index 3b01b3f51d..b56466551d 100755 --- a/submodules/ton/build-ton.sh +++ b/submodules/ton/build-ton.sh @@ -6,6 +6,7 @@ set -e OUT_DIR="$(pwd)/$1" SOURCE_DIR="$(pwd)/$2" openssl_base_path="$(pwd)/$3" +arch="$4" if [ -z "$openssl_base_path" ]; then echo "Usage: sh build-ton.sh path/to/openssl" @@ -25,52 +26,44 @@ mkdir -p "$OUT_DIR" mkdir -p "$OUT_DIR/build" cd "$OUT_DIR/build" -platforms="iOS" -for platform in $platforms; do - openssl_path="$openssl_base_path" - echo "OpenSSL path = ${openssl_path}" - openssl_crypto_library="${openssl_path}/lib/libcrypto.a" - openssl_ssl_library="${openssl_path}/lib/libssl.a" - options="$options -DOPENSSL_FOUND=1" - options="$options -DOPENSSL_CRYPTO_LIBRARY=${openssl_crypto_library}" - options="$options -DOPENSSL_INCLUDE_DIR=${openssl_path}/include" - options="$options -DOPENSSL_LIBRARIES=${openssl_crypto_library}" - options="$options -DCMAKE_BUILD_TYPE=Release" - if [[ $skip_build = "" ]]; then - simulators="0 1" - else - simulators="" - fi - for simulator in $simulators; - do - build="build-${platform}" - install="install-${platform}" - if [[ $simulator = "1" ]]; then - build="${build}-simulator" - install="${install}-simulator" - ios_platform="SIMULATOR" - else - ios_platform="OS" - fi - echo "Platform = ${platform} Simulator = ${simulator}" - echo $ios_platform - rm -rf $build - mkdir -p $build - mkdir -p $install - cd $build - cmake $td_path $options -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DIOS_PLATFORM=${ios_platform} -DTON_ARCH= -DCMAKE_INSTALL_PREFIX=../${install} - CORE_COUNT=`sysctl -n hw.logicalcpu` - make -j$CORE_COUNT install || exit - cd .. - done - mkdir -p $platform +openssl_path="$openssl_base_path" +echo "OpenSSL path = ${openssl_path}" +openssl_crypto_library="${openssl_path}/lib/libcrypto.a" +openssl_ssl_library="${openssl_path}/lib/libssl.a" +options="$options -DOPENSSL_FOUND=1" +options="$options -DOPENSSL_CRYPTO_LIBRARY=${openssl_crypto_library}" +options="$options -DOPENSSL_INCLUDE_DIR=${openssl_path}/include" +options="$options -DOPENSSL_LIBRARIES=${openssl_crypto_library}" +options="$options -DCMAKE_BUILD_TYPE=Release" - mkdir -p "out" - cp -r "install-iOS/include" "out/" - mkdir -p "out/lib" +build="build-${arch}" +install="install-${arch}" - for f in install-iOS/lib/*.a; do - lib_name=$(basename "$f") - lipo -create "install-iOS/lib/$lib_name" "install-iOS-simulator/lib/$lib_name" -o "out/lib/$lib_name" - done +if [ "$arch" == "armv7" ]; then + ios_platform="OSV7" +elif [ "$arch" == "arm64" ]; then + ios_platform="OS64" +elif [ "$arch" == "x86_64" ]; then + ios_platform="SIMULATOR" +else + echo "Unsupported architecture $arch" + exit 1 +fi + +rm -rf $build +mkdir -p $build +mkdir -p $install +cd $build +cmake $td_path $options -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DIOS_PLATFORM=${ios_platform} -DTON_ARCH= -DCMAKE_INSTALL_PREFIX=../${install} +CORE_COUNT=`sysctl -n hw.logicalcpu` +make -j$CORE_COUNT install || exit +cd .. + +mkdir -p "out" +cp -r "$install/include" "out/" +mkdir -p "out/lib" + +for f in $install/lib/*.a; do + lib_name=$(basename "$f") + cp "$install/lib/$lib_name" "out/lib/$lib_name" done diff --git a/submodules/ton/iOS.cmake b/submodules/ton/iOS.cmake index e983c8d277..de46c17972 100644 --- a/submodules/ton/iOS.cmake +++ b/submodules/ton/iOS.cmake @@ -66,6 +66,22 @@ if (${IOS_PLATFORM} STREQUAL "OS") # This causes the installers to properly locate the output libraries set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") + set (APPLE_IOS True) +elseif (${IOS_PLATFORM} STREQUAL "OSV7") + set (IOS_PLATFORM_LOCATION "iPhoneOS.platform") + set (XCODE_IOS_PLATFORM iphoneos) + + # This causes the installers to properly locate the output libraries + set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") + + set (APPLE_IOS True) +elseif (${IOS_PLATFORM} STREQUAL "OS64") + set (IOS_PLATFORM_LOCATION "iPhoneOS.platform") + set (XCODE_IOS_PLATFORM iphoneos) + + # This causes the installers to properly locate the output libraries + set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") + set (APPLE_IOS True) elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR") set (SIMULATOR_FLAG true) @@ -194,6 +210,10 @@ set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS su # set the architecture for iOS if (IOS_PLATFORM STREQUAL "OS") set (IOS_ARCH "armv7;arm64") +elseif (IOS_PLATFORM STREQUAL "OSV7") + set (IOS_ARCH "armv7") +elseif (IOS_PLATFORM STREQUAL "OS64") + set (IOS_ARCH "arm64") elseif (IOS_PLATFORM STREQUAL "SIMULATOR") set (IOS_ARCH "x86_64") elseif (IOS_PLATFORM STREQUAL "WATCHOS")