mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
- Added new SecureConfig package that encrypts/decrypts configuration in a JSON-based file - Added tooling to the project to read the encrypted config files at runtime - Documented how to add the config files in README - Removed variables from .xcconfig files and from info.plist - Replaced info.plist-based variables with protected config variables - Removed unused 'enfroce ssl pinning' build variable - Temporary enabled archiving to test the pipeline
190 lines
8.8 KiB
Plaintext
190 lines
8.8 KiB
Plaintext
//
|
|
// Config.xcconfig
|
|
// Multisig
|
|
//
|
|
// Created by Dmitry Bespalov on 27.05.20.
|
|
// Copyright © 2020 Gnosis Ltd. All rights reserved.
|
|
//
|
|
|
|
// Configuration settings file format documentation can be found at:
|
|
// https://help.apple.com/xcode/#/dev745c5c974
|
|
|
|
// NOTE: the '//' is always treated as a comment by Xcode, so we
|
|
// insert an empty reference between slashes: /$()/
|
|
|
|
// These are 2 variables that we care for. They are used as a substitutions
|
|
// for the variable names of respective services, so that we can use them
|
|
// to specify all of the configurations.
|
|
|
|
// DEV | STAGING | PROD
|
|
SERVICE_ENV = STAGING
|
|
|
|
|
|
// Keys
|
|
|
|
// Configuration Values
|
|
|
|
// Safe Client Gateway Service
|
|
_CLIENT_GATEWAY_URL_DEV = https:/$()/safe-client.staging.5afe.dev/
|
|
_CLIENT_GATEWAY_URL_STAGING = https:/$()/safe-client.staging.5afe.dev/
|
|
_CLIENT_GATEWAY_URL_PROD = https:/$()/safe-client.safe.global/
|
|
|
|
// Apps
|
|
_APP_BUNDLE_ID_PROD = io.gnosis.multisig.prod.mainnet
|
|
_APP_BUNDLE_ID_STAGING = io.gnosis.multisig.staging.mainnet
|
|
_APP_BUNDLE_ID_DEV = io.gnosis.multisig.dev.mainnet
|
|
|
|
// Claiming app service
|
|
_CLAIMING_DATA_URL_DEV = https:/$()/safe-claiming-app-data.staging.5afe.dev/
|
|
_CLAIMING_DATA_URL_STAGING = https:/$()/safe-claiming-app-data.staging.5afe.dev/
|
|
_CLAIMING_DATA_URL_PROD = https:/$()/safe-claiming-app-data.safe.global/
|
|
|
|
// Gelato relay service
|
|
_RELAY_URL_DEV = https:/$()/safe-client.staging.5afe.dev/
|
|
_RELAY_URL_STAGING = https:/$()/safe-client.staging.5afe.dev/
|
|
_RELAY_URL_PROD = https:/$()/safe-client.safe.global/
|
|
|
|
// Gelato Service
|
|
GELATO_SERVICE_URL = https:/$()/relay.gelato.digital
|
|
|
|
// Moonpay Service
|
|
MOONPAY_SERVICE_URL = https:/$()/api.moonpay.com
|
|
|
|
// App Groups
|
|
_APP_GROUP_ID_PROD = group.io.gnosis.multisig.prod.mainnet
|
|
_APP_GROUP_ID_STAGING = group.io.gnosis.multisig.staging.mainnet
|
|
_APP_GROUP_ID_DEV = group.io.gnosis.multisig.dev.mainnet
|
|
|
|
APP_GROUP_ID = $(_APP_GROUP_ID_$(SERVICE_ENV):default=$(_APP_GROUP_ID_PROD))
|
|
|
|
|
|
// User-facing name of the app on the Home screen
|
|
_DISPLAY_NAME_PROD = Safe{Wallet}
|
|
_DISPLAY_NAME_STAGING = Safe{Wallet} Staging
|
|
_DISPLAY_NAME_DEV = Safe{Wallet} Dev
|
|
|
|
// Firebase Config File Names
|
|
_FIREBASE_CONFIG_PROD = GoogleService-Info.Production
|
|
_FIREBASE_CONFIG_STAGING = GoogleService-Info.Staging
|
|
_FIREBASE_CONFIG_DEV = GoogleService-Info.Development
|
|
|
|
// Loggers (comma-separated). Available options: [crashlytics, console]
|
|
_LOGGERS_PROD = crashlytics
|
|
_LOGGERS_DEV = console
|
|
|
|
// Log level. Available options: [DEBUG, INFO, ERROR, FATAL, OFF]
|
|
// Check LogLevel.swift for more details
|
|
_LOG_LEVEL_PROD = ERROR
|
|
_LOG_LEVEL_DEV = DEBUG
|
|
|
|
// Configuration variables for the app
|
|
CLIENT_GATEWAY_URL = $(_CLIENT_GATEWAY_URL_$(SERVICE_ENV):default=$(_CLIENT_GATEWAY_URL_PROD))
|
|
CLAIMING_DATA_URL = $(_CLAIMING_DATA_URL_$(SERVICE_ENV):default=$(_CLAIMING_DATA_URL_PROD))
|
|
RELAY_URL = $(_RELAY_URL_$(SERVICE_ENV):default=$(_RELAY_URL_PROD))
|
|
FIREBASE_CONFIG = $(_FIREBASE_CONFIG_$(SERVICE_ENV):default=$(_FIREBASE_CONFIG_PROD))
|
|
LOGGERS = $(_LOGGERS_$(SERVICE_ENV):default=$(_LOGGERS_PROD))
|
|
LOG_LEVEL = $(_LOG_LEVEL_$(SERVICE_ENV):default=$(_LOG_LEVEL_PROD))
|
|
GNOSIS_SAFE_WEB_URL = $(GNOSIS_SAFE_WEB_URL_$(SERVICE_ENV):default=$(GNOSIS_SAFE_WEB_URL_PROD))
|
|
|
|
// Make sure to review/change the SSL pinning configuration in the
|
|
// Info.plist file (TSKConfiguration key). For details, read documentation:
|
|
// at https://datatheorem.github.io/TrustKit/documentation/Classes/TrustKit.html
|
|
|
|
// Whether to enforce SSL pinning. If enabled, the connections will break
|
|
// if the certificate pinning fails.
|
|
// Range of values: 1 is YES, 0 is NO.
|
|
SSL_ENFORCE_PINNING = 1
|
|
|
|
|
|
// WalletConnect bridge server for client
|
|
// gnosis wc bridge: https://safe-walletconnect.gnosis.io/
|
|
// zerion wc bridge: https://wcbridge.zerion.io
|
|
// test bridge with latest protocol version: https://bridge.walletconnect.org
|
|
WALLETCONNECT_BRIDGE_URL = https:/$()/safe-walletconnect.safe.global/
|
|
|
|
WALLETCONNECT_REGISTRY_URL = https:/$()/5afe.github.io/
|
|
|
|
// Help URLs
|
|
ADD_OWNERS_URL = https:/$()/help.safe.global/en/articles/40864-add-owners
|
|
CONFLICT_URL = https:/$()/help.safe.global/en/articles/40839-why-are-transactions-with-the-same-nonce-conflicting-with-each-other
|
|
FALLBACKHANDLER_URL = https:/$()/help.safe.global/en/articles/40838-what-is-a-fallback-handler-and-how-does-it-relate-to-safe
|
|
DELEGATE_KEY_URL = https:/$()/help.safe.global/en/articles/40799-what-is-a-delegate-key
|
|
GUARD_URL = https:/$()/help.safe.global/en/articles/40809-what-is-a-transaction-guard
|
|
PAY_FOR_CANCELLATION_URL = https:/$()/help.safe.global/en/articles/40836-why-do-i-need-to-pay-for-cancelling-a-transaction
|
|
CONNECT_DAPP_ON_MOBILE_URL = https:/$()/help.safe.global/en/articles/40810-connect-to-dapps-with-walletconnect-on-mobile
|
|
DESKTOP_PAIRING_URL = https:/$()/help.safe.global/en/articles/40801-connect-to-web-with-mobile-safe
|
|
ADVANCED_TX_PARAMS_URL = https:/$()/help.safe.global/en/articles/40837-advanced-transaction-parameters
|
|
LEDGER_PAIRING_URL = https:/$()/support.ledger.com/hc/en-us/articles/360019138694-Set-up-Bluetooth-connection
|
|
CREATE_SAFE_URL = https:/$()/help.safe.global/en/articles/40792-how-to-create-a-safe-on-your-ios
|
|
CONFIRMATIONS_URL = https:/$()/help.safe.global/en/articles/40863-signature-policies
|
|
RELAYER_INFO_URL = https:/$()/help.safe.global/en/articles/59203-what-is-gas-fee-sponsoring
|
|
UNEXPECTED_DELEGATE_URL = https:/$()/help.safe.global/en/articles/40794-why-do-i-see-an-unexpected-delegate-call-warning-in-my-transaction
|
|
KEY_SECURITY_URL = https:/$()/help.safe.global/en/articles/40829-how-signer-keys-are-stored
|
|
SOCIAL_LOGIN_INFO_URL = https:/$()/help.safe.global/en/articles/82471-how-does-onboarding-with-your-social-logins-work-on-ios
|
|
ONRAMPING_INFO_URL = https:/$()/help.safe.global/en/articles/...
|
|
|
|
// Legal URLs
|
|
TERMS_URL = https:/$()/app.safe.global/terms
|
|
PRIVACY_URL = https:/$()/app.safe.global/privacy
|
|
LICENSES_URL = https:/$()/app.safe.global/licenses
|
|
|
|
// Contact Information
|
|
DISCORD_URL = https:/$()/chat.safe.global/
|
|
TWITTER_URL = https:/$()/twitter.com/safe
|
|
HELP_CENTER_URL = https:/$()/help.safe.global/
|
|
FEATURE_SUGGESTION_URL = https:/$()/safe.cnflx.io/
|
|
CONTACT_EMAIL = [email protected]
|
|
FORUM_URL = https:/$()/forum.safe.global/
|
|
//TODO: adjust safe dao url
|
|
SAFE_DAO_URL = https:/$()/snapshot.org/#/safe.eth
|
|
|
|
// Web app url
|
|
GNOSIS_SAFE_WEB_URL_PROD = https:/$()/app.safe.global/
|
|
GNOSIS_SAFE_WEB_URL_STAGING = https:/$()/safe-wallet-web.staging.5afe.dev/
|
|
|
|
// App Review URLs
|
|
_APP_STORE_REVIEW_URL_DEV = https:/$()/apps.apple.com/app/id1515758190?action=write-review
|
|
_APP_STORE_REVIEW_URL_STAGING = https:/$()/apps.apple.com/app/id1518013939?action=write-review
|
|
_APP_STORE_REVIEW_URL_PROD = https:/$()/apps.apple.com/app/id1515759131?action=write-review
|
|
|
|
APP_STORE_REVIEW_URL = $(_APP_STORE_REVIEW_URL_$(SERVICE_ENV):default=$(_APP_STORE_REVIEW_URL_PROD))
|
|
|
|
// Claim URLS
|
|
CLAIM_DISCUSS_URL = https:/$()/forum.safe.global/
|
|
CLAIM_PROPOSE_URL = https:/$()/forum.safe.global/t/how-to-safedao-governance-process/846
|
|
CLAIM_CHAT_URL = https:/$()/discord.com/invite/AjG7AQD9Qn
|
|
|
|
// App name on the home screen (will be used for CFBundleDisplayName)
|
|
DISPLAY_NAME = $(_DISPLAY_NAME_$(SERVICE_ENV):default=$(_DISPLAY_NAME_PROD))
|
|
|
|
// Xcode Build Settings
|
|
PRODUCT_BUNDLE_IDENTIFIER = $(_APP_BUNDLE_ID_$(SERVICE_ENV):default=$(_APP_BUNDLE_ID_PROD))
|
|
|
|
// Different product names are fixing an iOS bug that disables Touch ID
|
|
// or Face ID when multiple apps with the same executable name are installed.
|
|
APP_PRODUCT_NAME = Multisig_$(SERVICE_ENV)
|
|
|
|
PRODUCT_NAME = $(APP_PRODUCT_NAME)
|
|
|
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_$(SERVICE_ENV)
|
|
|
|
// This fixes SwiftUI previews not working due to code coverage enabled
|
|
// see https://stackoverflow.com/questions/58127940/undefined-symbols-llvm-profile-runtime
|
|
//
|
|
// Also, Firebase Analytics requires clients to add -ObjC linker option.
|
|
OTHER_LDFLAGS = $(inherited) -fprofile-instr-generate -ObjC
|
|
|
|
// Use value from ios OAuth client. Credentials -> Safe{Wallet} (type ios) -> Additional Information -> iOS URL scheme
|
|
// Do not add :/$()/ at the end. It won't pass the build stage
|
|
|
|
WEB3AUTH_APPLE_VERIFIER_AGGREGATE = apple-aggregate-prod
|
|
_WEB3AUTH_APPLE_VERIFIER_DEV = apple-sub-dev
|
|
_WEB3AUTH_APPLE_VERIFIER_STAGING = apple-sub-staging
|
|
_WEB3AUTH_APPLE_VERIFIER_PROD = apple-sub-prod
|
|
WEB3AUTH_APPLE_VERIFIER = $(_WEB3AUTH_APPLE_VERIFIER_$(SERVICE_ENV):default=$(_WEB3AUTH_APPLE_VERIFIER_PROD))
|
|
|
|
CONFIG_KEY_DEV = your-staging-config-key
|
|
CONFIG_KEY_STAGING = your-staging-config-key
|
|
CONFIG_KEY_PROD = your-production-config-key
|
|
CONFIG_KEY = $(CONFIG_KEY_$(SERVICE_ENV):default=$(CONFIG_KEY_PROD))
|