Skip to content

Commit

Permalink
refactor: use MobileStack references in ios build (#6012)
Browse files Browse the repository at this point in the history
### Description

Related to making the iOS build brand agnostic. Main changes here:
- rename `celo` -> `MobileStack`
- remove unused CeloTest and Celo-tvOS targets
- since the xcode workspace is renamed, also update any scripts and
workflows that rely on the path

### Test plan

Tested the iOS build locally + CI.

### Related issues

- Related to RET-1157

### Backwards compatibility

Y

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [ ] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
  • Loading branch information
kathaypacific authored Sep 17, 2024
1 parent fba9c30 commit d4067d4
Show file tree
Hide file tree
Showing 69 changed files with 192 additions and 901 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/automergeCrowdinPr.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const CROWDIN_BRANCH = 'l10n/main'
const CROWDIN_PR_USER = 'valora-bot-crowdin'

const ALLOWED_UPDATED_FILE_MATCHER = new RegExp(
`locales\/.*\/translation\.json|ios/celo\/.*\/InfoPlist.strings`
`locales\/.*\/translation\.json|ios/MobileStack\/.*\/InfoPlist.strings`
)
const DISALLOWED_UPDATED_FILES = [
'locales/base/translation.json',
'ios/celo/Base.lproj/InfoPlist.strings',
'ios/MobileStack/Base.lproj/InfoPlist.strings',
]
const enableAutomergeQuery = `mutation ($pullRequestId: ID!, $mergeMethod: PullRequestMergeMethod!) {
enablePullRequestAutoMerge(input: {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-app-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
const allowedUpdatedFiles = [
'android/app/build.gradle',
'android/gradle.properties',
'ios/celo.xcodeproj/project.pbxproj',
'ios/MobileStack.xcodeproj/project.pbxproj',
'package.json'
]
const script = require('.github/scripts/autoApprovePr.js')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-translation-files-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
with:
files: |
locales/*/translation.json
ios/celo/*.lproj/InfoPlist.strings
ios/MobileStack/*.lproj/InfoPlist.strings
files_ignore: |
locales/base/translation.json
ios/celo/Base.lproj/InfoPlist.strings
ios/MobileStack/Base.lproj/InfoPlist.strings
- name: Fail if translation files are changed
if: ${{ (github.event_name != 'merge_group') && (github.head_ref != 'l10n/main') && (steps.changed-files.outputs.any_changed == 'true') }}
run: |
Expand Down
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ package.json

android/app/build
# Ignore Images.xcassets as Xcode reformats them anyway when saving
branding/celo/ios/celo/Images.xcassets
ios/build
ios/celo/Images.xcassets
ios/MobileStack/Images.xcassets
ios/Pods
# Ignore Crowdin generated files (often they are written with no final newline)
locales/*/*.json
Expand Down
4 changes: 2 additions & 2 deletions WALLET.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ The below steps should help you successfully run the mobile wallet on either a U

### iOS

3. Launch Xcode and use it to open the directory `celo.xcworkspace`. Confirm your iOS device has been detected by Xcode.
3. Launch Xcode and use it to open the directory `MobileStack.xcworkspace`. Confirm your iOS device has been detected by Xcode.

4. Build the project by pressing the play button in the top left corner or selecting `Product > Build` from the Xcode menu bar.

Expand All @@ -341,7 +341,7 @@ you may require a fresh install of the app. Instead of rebuilding the app to get
a fresh install, you can drag drop the generated app into the simulator after
uninstalling the app. It is typically available in the following paths:

- For iOS: `$HOME/Library/Developer/Xcode/DerivedData/celo-<randomid>/Build/Products/Debug-iphonesimulator/celo.app`
- For iOS: `$HOME/Library/Developer/Xcode/DerivedData/MobileStack-<randomid>/Build/Products/Debug-iphonesimulator/Valora.app`
- For Android: `<path-to-wallet>/android/app/build/outputs/apk/alfajoresdev/debug/app-alfajoresdev-debug.apk`

## Debugging & App Profiling
Expand Down
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "celo",
"displayName": "Celo"
"name": "mobilestack",
"displayName": "MobileStack"
}
4 changes: 2 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ files:
- source: /locales/base/*.json
translation: /locales/%locale%/%original_file_name%
type: i18next_json
- source: /ios/celo/Base.lproj/InfoPlist.strings
translation: /ios/celo/%osx_code%/%original_file_name%
- source: /ios/MobileStack/Base.lproj/InfoPlist.strings
translation: /ios/MobileStack/%osx_code%/%original_file_name%
4 changes: 2 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ platform :ios do
desc 'Build the iOS application - requires environment param'
lane :build do |options|
gym(
workspace: 'ios/celo.xcworkspace',
workspace: 'ios/MobileStack.xcworkspace',
# Needs double quotes because Ruby differentiates
# https://stackoverflow.com/questions/6395288/double-vs-single-quotes
scheme: "celo-#{options[:environment]}",
scheme: "MobileStack-#{options[:environment]}",
configuration: 'Release',
xcargs: [
"-allowProvisioningUpdates",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
Expand All @@ -33,23 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "celoTests.xctest"
BlueprintName = "celoTests"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -63,22 +49,12 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "celoTests.xctest"
BlueprintName = "celoTests"
ReferencedContainer = "container:celo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand All @@ -96,9 +72,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
Expand All @@ -113,9 +89,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
Expand All @@ -33,23 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "celoTests.xctest"
BlueprintName = "celoTests"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -63,22 +49,12 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "celoTests.xctest"
BlueprintName = "celoTests"
ReferencedContainer = "container:celo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand All @@ -96,9 +72,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
Expand All @@ -113,9 +89,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
Expand All @@ -33,23 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "celoTests.xctest"
BlueprintName = "celoTests"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -63,22 +49,12 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "celoTests.xctest"
BlueprintName = "celoTests"
ReferencedContainer = "container:celo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand All @@ -96,9 +72,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
Expand All @@ -113,9 +89,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "valora.app"
BlueprintName = "celo"
ReferencedContainer = "container:celo.xcodeproj">
BuildableName = "Valora.app"
BlueprintName = "MobileStack"
ReferencedContainer = "container:MobileStack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
Loading

0 comments on commit d4067d4

Please sign in to comment.