diff --git a/CHANGELOG.md b/CHANGELOG.md index 66d66d9dd4..cb2fcbf15f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ # Changelog ## Unreleased +- Android: enable export logs feature + +# 4.45.0 +- Bundle BitBox02 firmware version v9.21.0 - Bitcoin: add support for sending to silent payment (BIP-352) addresses +- Prevent macOS from going to sleep on long running interactions with the BitBox ## 4.44.0 - Bundle BitBox02 firmware version v9.20.0 diff --git a/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.20.0.signed.bin.gz b/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.20.0.signed.bin.gz deleted file mode 100644 index 5f4a308bab..0000000000 Binary files a/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.20.0.signed.bin.gz and /dev/null differ diff --git a/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.20.0.signed.bin.sha256 b/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.20.0.signed.bin.sha256 deleted file mode 100644 index 3567bbf4f1..0000000000 --- a/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.20.0.signed.bin.sha256 +++ /dev/null @@ -1 +0,0 @@ -b6d3152f3b601bb8bace731a392221d510b50929f3e40fe258534f7bdd4f5f86 \ No newline at end of file diff --git a/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.21.0.signed.bin.gz b/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.21.0.signed.bin.gz new file mode 100644 index 0000000000..89785c2609 Binary files /dev/null and b/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.21.0.signed.bin.gz differ diff --git a/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.21.0.signed.bin.sha256 b/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.21.0.signed.bin.sha256 new file mode 100644 index 0000000000..5a239a1012 --- /dev/null +++ b/backend/devices/bitbox02bootloader/assets/firmware-btc.v9.21.0.signed.bin.sha256 @@ -0,0 +1 @@ +36895857c346c1fbd0d206853b7031e985c1a959e9f7f9396a7ae94dfffa9679 \ No newline at end of file diff --git a/backend/devices/bitbox02bootloader/assets/firmware.v9.20.0.signed.bin.gz b/backend/devices/bitbox02bootloader/assets/firmware.v9.20.0.signed.bin.gz deleted file mode 100644 index 018cc37d7a..0000000000 Binary files a/backend/devices/bitbox02bootloader/assets/firmware.v9.20.0.signed.bin.gz and /dev/null differ diff --git a/backend/devices/bitbox02bootloader/assets/firmware.v9.20.0.signed.bin.sha256 b/backend/devices/bitbox02bootloader/assets/firmware.v9.20.0.signed.bin.sha256 deleted file mode 100644 index ec1a10ed51..0000000000 --- a/backend/devices/bitbox02bootloader/assets/firmware.v9.20.0.signed.bin.sha256 +++ /dev/null @@ -1 +0,0 @@ -8f43ba379c025242ca1313b7cb36b20aca750845c4d2c630dc31a6ed162c32a3 \ No newline at end of file diff --git a/backend/devices/bitbox02bootloader/assets/firmware.v9.21.0.signed.bin.gz b/backend/devices/bitbox02bootloader/assets/firmware.v9.21.0.signed.bin.gz new file mode 100644 index 0000000000..138e884a5f Binary files /dev/null and b/backend/devices/bitbox02bootloader/assets/firmware.v9.21.0.signed.bin.gz differ diff --git a/backend/devices/bitbox02bootloader/assets/firmware.v9.21.0.signed.bin.sha256 b/backend/devices/bitbox02bootloader/assets/firmware.v9.21.0.signed.bin.sha256 new file mode 100644 index 0000000000..2f65433e4f --- /dev/null +++ b/backend/devices/bitbox02bootloader/assets/firmware.v9.21.0.signed.bin.sha256 @@ -0,0 +1 @@ +35c691d69d22f96cb0efc201dddf57c25afd09c850104925b8cea6d7f60850f5 \ No newline at end of file diff --git a/backend/devices/bitbox02bootloader/firmware.go b/backend/devices/bitbox02bootloader/firmware.go index b88343d90e..c41f2bf680 100644 --- a/backend/devices/bitbox02bootloader/firmware.go +++ b/backend/devices/bitbox02bootloader/firmware.go @@ -32,15 +32,15 @@ var intermediateFirmwareBinaryBTCOnly_9_17_1 []byte //go:embed assets/firmware.v9.17.1.signed.bin.gz var intermediateFirmwareBinaryMulti_9_17_1 []byte -//go:embed assets/firmware-btc.v9.20.0.signed.bin.gz +//go:embed assets/firmware-btc.v9.21.0.signed.bin.gz var firmwareBinaryBTCOnly []byte -var firmwareVersionBTCOnly = semver.NewSemVer(9, 20, 0) -var firmwareMonotonicVersionBtcOnly uint32 = 40 +var firmwareVersionBTCOnly = semver.NewSemVer(9, 21, 0) +var firmwareMonotonicVersionBtcOnly uint32 = 41 -//go:embed assets/firmware.v9.20.0.signed.bin.gz +//go:embed assets/firmware.v9.21.0.signed.bin.gz var firmwareBinaryMulti []byte -var firmwareVersionMulti = semver.NewSemVer(9, 20, 0) -var firmwareMonotonicVersionMulti uint32 = 40 +var firmwareVersionMulti = semver.NewSemVer(9, 21, 0) +var firmwareMonotonicVersionMulti uint32 = 41 type firmwareInfo struct { version *semver.SemVer diff --git a/backend/mobileserver/mobileserver.go b/backend/mobileserver/mobileserver.go index c71b088d0a..57b21bf8de 100644 --- a/backend/mobileserver/mobileserver.go +++ b/backend/mobileserver/mobileserver.go @@ -176,7 +176,7 @@ func (hook goLogHook) Fire(entry *logrus.Entry) error { // Serve serves the BitBoxApp API for use in a mobile client. It is called when the application // is started or wakes up from sleep. -func Serve(dataDir string, environment GoEnvironmentInterface, goAPI GoAPIInterface) { +func Serve(dataDir string, testnet bool, environment GoEnvironmentInterface, goAPI GoAPIInterface) { once.Do(func() { // SetAppDir can only be called once, but this is okay, since the data dir does not change // between during sleep between Shutdown and Serve. @@ -186,7 +186,6 @@ func Serve(dataDir string, environment GoEnvironmentInterface, goAPI GoAPIInterf logging.Get().AddHook(goLogHook{}) }) - testnet := false bridgecommon.Serve( testnet, nil, diff --git a/backend/update.go b/backend/update.go index 62cd29ba05..793ffa503a 100644 --- a/backend/update.go +++ b/backend/update.go @@ -27,7 +27,7 @@ const updateFileURL = "https://bitboxapp.shiftcrypto.io/desktop.json" var ( // Version of the backend as displayed to the user. - Version = semver.NewSemVer(4, 44, 0) + Version = semver.NewSemVer(4, 45, 0) ) // UpdateFile is retrieved from the server. diff --git a/frontends/android/BitBoxApp/app/build.gradle b/frontends/android/BitBoxApp/app/build.gradle index 78dca626d3..4d024d092a 100644 --- a/frontends/android/BitBoxApp/app/build.gradle +++ b/frontends/android/BitBoxApp/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "ch.shiftcrypto.bitboxapp" minSdkVersion 21 targetSdkVersion 34 - versionCode 52 - versionName "android-4.44.0" + versionCode 53 + versionName "android-4.45.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/GoService.java b/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/GoService.java index 57881c1fc8..ba633dd0cc 100644 --- a/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/GoService.java +++ b/frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp/GoService.java @@ -83,7 +83,8 @@ public void startServer(String filePath, GoEnvironmentInterface goEnvironment, G Util.log("GoService: Starting server..."); startedLock.lock(); if (!started) { - Mobileserver.serve(filePath, goEnvironment, goAPI); + boolean testnet = false; + Mobileserver.serve(filePath, testnet, goEnvironment, goAPI); started = true; Util.log("server started!"); } else { diff --git a/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/project.pbxproj b/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/project.pbxproj index 7bb2747eeb..52ed76be49 100644 --- a/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/project.pbxproj +++ b/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/project.pbxproj @@ -8,6 +8,13 @@ /* Begin PBXBuildFile section */ D700B5F62C884C34000496D4 /* Mobileserver.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D76518BB2B1F8F7400DC03A9 /* Mobileserver.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D700B5FD2CA2FFAF000496D4 /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D76516322B1F3D1A00DC03A9 /* WebView.swift */; }; + D700B5FE2CA2FFAF000496D4 /* BitBoxAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D76516082B1F3B1300DC03A9 /* BitBoxAppApp.swift */; }; + D700B6002CA2FFAF000496D4 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D76518C12B1F910C00DC03A9 /* libresolv.tbd */; }; + D700B6022CA2FFAF000496D4 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = D76518B52B1F45B300DC03A9 /* assets */; }; + D700B6032CA2FFAF000496D4 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D765160F2B1F3B1500DC03A9 /* Preview Assets.xcassets */; }; + D700B6042CA2FFAF000496D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D765160C2B1F3B1500DC03A9 /* Assets.xcassets */; }; + D700B6062CA2FFAF000496D4 /* Mobileserver.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D76518BB2B1F8F7400DC03A9 /* Mobileserver.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; D76516092B1F3B1300DC03A9 /* BitBoxAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D76516082B1F3B1300DC03A9 /* BitBoxAppApp.swift */; }; D765160D2B1F3B1500DC03A9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D765160C2B1F3B1500DC03A9 /* Assets.xcassets */; }; D76516102B1F3B1500DC03A9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D765160F2B1F3B1500DC03A9 /* Preview Assets.xcassets */; }; @@ -48,11 +55,23 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + D700B6052CA2FFAF000496D4 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D700B6062CA2FFAF000496D4 /* Mobileserver.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ D700B5F82C888CB9000496D4 /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; D700B5F92C986A3C000496D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + D700B60A2CA2FFAF000496D4 /* BitBoxApp Testnet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BitBoxApp Testnet.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D76516052B1F3B1300DC03A9 /* BitBoxApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BitBoxApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; D76516082B1F3B1300DC03A9 /* BitBoxAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BitBoxAppApp.swift; sourceTree = ""; }; D765160C2B1F3B1500DC03A9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -69,6 +88,14 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + D700B5FF2CA2FFAF000496D4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D700B6002CA2FFAF000496D4 /* libresolv.tbd in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D76516022B1F3B1300DC03A9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -113,6 +140,7 @@ D76516052B1F3B1300DC03A9 /* BitBoxApp.app */, D76516152B1F3B1500DC03A9 /* BitBoxAppTests.xctest */, D765161F2B1F3B1500DC03A9 /* BitBoxAppUITests.xctest */, + D700B60A2CA2FFAF000496D4 /* BitBoxApp Testnet.app */, ); name = Products; sourceTree = ""; @@ -166,6 +194,25 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + D700B5FA2CA2FFAF000496D4 /* BitBoxApp Testnet */ = { + isa = PBXNativeTarget; + buildConfigurationList = D700B6072CA2FFAF000496D4 /* Build configuration list for PBXNativeTarget "BitBoxApp Testnet" */; + buildPhases = ( + D700B5FB2CA2FFAF000496D4 /* Run Script */, + D700B5FC2CA2FFAF000496D4 /* Sources */, + D700B5FF2CA2FFAF000496D4 /* Frameworks */, + D700B6012CA2FFAF000496D4 /* Resources */, + D700B6052CA2FFAF000496D4 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "BitBoxApp Testnet"; + productName = BitBoxApp; + productReference = D700B60A2CA2FFAF000496D4 /* BitBoxApp Testnet.app */; + productType = "com.apple.product-type.application"; + }; D76516042B1F3B1300DC03A9 /* BitBoxApp */ = { isa = PBXNativeTarget; buildConfigurationList = D76516292B1F3B1500DC03A9 /* Build configuration list for PBXNativeTarget "BitBoxApp" */; @@ -258,6 +305,7 @@ projectRoot = ""; targets = ( D76516042B1F3B1300DC03A9 /* BitBoxApp */, + D700B5FA2CA2FFAF000496D4 /* BitBoxApp Testnet */, D76516142B1F3B1500DC03A9 /* BitBoxAppTests */, D765161E2B1F3B1500DC03A9 /* BitBoxAppUITests */, ); @@ -265,6 +313,16 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + D700B6012CA2FFAF000496D4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D700B6022CA2FFAF000496D4 /* assets in Resources */, + D700B6032CA2FFAF000496D4 /* Preview Assets.xcassets in Resources */, + D700B6042CA2FFAF000496D4 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D76516032B1F3B1300DC03A9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -292,6 +350,25 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + D700B5FB2CA2FFAF000496D4 /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# rm -rf ${SRCROOT}/BitBoxApp/assets/web/\n# mkdir -p ${SRCROOT}/BitBoxApp/assets/web/\n# cp -aR ${SRCROOT}/../../web/build/* ${SRCROOT}/BitBoxApp/assets/web/\n"; + }; D76518B42B1F446200DC03A9 /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -314,6 +391,15 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + D700B5FC2CA2FFAF000496D4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D700B5FD2CA2FFAF000496D4 /* WebView.swift in Sources */, + D700B5FE2CA2FFAF000496D4 /* BitBoxAppApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D76516012B1F3B1300DC03A9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -356,6 +442,70 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + D700B6082CA2FFAF000496D4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIconTestnet; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"BitBoxApp/Preview Content\""; + DEVELOPMENT_TEAM = XK248TQN88; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = BitBoxApp/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "BitBoxApp Testnet"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_SWIFT_FLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = swiss.bitbox.BitBoxAppTestnet; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG TARGET_TESTNET"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D700B6092CA2FFAF000496D4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIconTestnet; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"BitBoxApp/Preview Content\""; + DEVELOPMENT_TEAM = XK248TQN88; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = BitBoxApp/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = "BitBoxApp Testnet"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_SWIFT_FLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = swiss.bitbox.BitBoxAppTestnet; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = TARGET_TESTNET; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; D76516272B1F3B1500DC03A9 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D700B5F82C888CB9000496D4 /* Config.xcconfig */; @@ -483,6 +633,7 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = BitBoxApp/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = BitBoxApp; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; @@ -493,6 +644,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = swiss.bitbox.BitBoxApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -512,6 +664,7 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = BitBoxApp/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = BitBoxApp; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; @@ -522,6 +675,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = swiss.bitbox.BitBoxApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -609,6 +763,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + D700B6072CA2FFAF000496D4 /* Build configuration list for PBXNativeTarget "BitBoxApp Testnet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D700B6082CA2FFAF000496D4 /* Debug */, + D700B6092CA2FFAF000496D4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; D76516002B1F3B1300DC03A9 /* Build configuration list for PBXProject "BitBoxApp" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/xcshareddata/xcschemes/BitBoxApp Testnet.xcscheme b/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/xcshareddata/xcschemes/BitBoxApp Testnet.xcscheme new file mode 100644 index 0000000000..18a23a22b1 --- /dev/null +++ b/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/xcshareddata/xcschemes/BitBoxApp Testnet.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/xcshareddata/xcschemes/BitBoxApp.xcscheme b/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/xcshareddata/xcschemes/BitBoxApp.xcscheme new file mode 100644 index 0000000000..5dc14fa3f0 --- /dev/null +++ b/frontends/ios/BitBoxApp/BitBoxApp.xcodeproj/xcshareddata/xcschemes/BitBoxApp.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontends/ios/BitBoxApp/BitBoxApp/Assets.xcassets/AppIconTestnet.appiconset/Contents.json b/frontends/ios/BitBoxApp/BitBoxApp/Assets.xcassets/AppIconTestnet.appiconset/Contents.json new file mode 100644 index 0000000000..86cd179db2 --- /dev/null +++ b/frontends/ios/BitBoxApp/BitBoxApp/Assets.xcassets/AppIconTestnet.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "icon-testnet.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/frontends/ios/BitBoxApp/BitBoxApp/Assets.xcassets/AppIconTestnet.appiconset/icon-testnet.png b/frontends/ios/BitBoxApp/BitBoxApp/Assets.xcassets/AppIconTestnet.appiconset/icon-testnet.png new file mode 100644 index 0000000000..accd12aede Binary files /dev/null and b/frontends/ios/BitBoxApp/BitBoxApp/Assets.xcassets/AppIconTestnet.appiconset/icon-testnet.png differ diff --git a/frontends/ios/BitBoxApp/BitBoxApp/BitBoxAppApp.swift b/frontends/ios/BitBoxApp/BitBoxApp/BitBoxAppApp.swift index 38f9406f33..d488825dcc 100644 --- a/frontends/ios/BitBoxApp/BitBoxApp/BitBoxAppApp.swift +++ b/frontends/ios/BitBoxApp/BitBoxApp/BitBoxAppApp.swift @@ -132,7 +132,11 @@ struct BitBoxAppApp: App { print("Could not create Application Support directory: \(error)") } let goEnvironment = GoEnvironment() - - MobileserverServe(appSupportDirectory.path, goEnvironment, goAPI) + #if TARGET_TESTNET + let testnet = true; + #else + let testnet = false; + #endif + MobileserverServe(appSupportDirectory.path, testnet, goEnvironment, goAPI) } } diff --git a/frontends/ios/BitBoxApp/BitBoxApp/Info.plist b/frontends/ios/BitBoxApp/BitBoxApp/Info.plist index bc11256bd7..a1dc653195 100644 --- a/frontends/ios/BitBoxApp/BitBoxApp/Info.plist +++ b/frontends/ios/BitBoxApp/BitBoxApp/Info.plist @@ -4,5 +4,7 @@ ITSAppUsesNonExemptEncryption + NSCameraUsageDescription + We need access to the camera to scan QR codes. diff --git a/frontends/ios/BitBoxApp/BitBoxApp/WebView.swift b/frontends/ios/BitBoxApp/BitBoxApp/WebView.swift index 89e44a559d..60cf049da1 100644 --- a/frontends/ios/BitBoxApp/BitBoxApp/WebView.swift +++ b/frontends/ios/BitBoxApp/BitBoxApp/WebView.swift @@ -118,6 +118,12 @@ struct WebView: UIViewRepresentable { // TODO: check if official - needed to allow loading the bundle with