Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a staging configuration that automatically targets the staging environment #5677

Conversation

buggmagnet
Copy link
Contributor

@buggmagnet buggmagnet commented Jan 11, 2024

This PR creates a staging environment. The API endpoint and IP are now hardcoded in the Api.xcconfig file.
The API endpoint and IP address are now loaded and stored in the Info.plist files of both the packet tunnel and the main host application.

In order to use the staging environment, In Xcode go to the following menu :
Product > Scheme > Edit Scheme
In the Run section, select the Staging environment

Screenshot 2024-01-11 at 09 55 36

⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️

If you want to test this PR

  • Copy the Api.xcconfig.template file and replace the values with the API endpoint, and the staging endpoint.
  • Delete the application from your device
  • Select the Staging build scheme
  • Install the application

⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️


This change is Reviewable

@buggmagnet buggmagnet added the iOS Issues related to iOS label Jan 11, 2024
@buggmagnet buggmagnet self-assigned this Jan 11, 2024
@buggmagnet buggmagnet force-pushed the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch from de89dfb to f8c6ed3 Compare January 11, 2024 09:35
@buggmagnet
Copy link
Contributor Author

Looks like I forgot about GH CI, will fix soon

Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 10 files at r1, 2 of 10 files at r2.
Reviewable status: 4 of 16 files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPN.xcodeproj/project.pbxproj line 6443 at r2 (raw file):

				GCC_NO_COMMON_BLOCKS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (

Could we also change the fake release schema to be a build configuration? Then we have less schemas, which I see as only a good thing. And the only thing that's different for the fake release is that the debug flag is not set.

Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm. :lgtm:

Reviewed 4 of 10 files at r1, 8 of 10 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)

Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6 of 10 files at r1, 10 of 10 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pinkisemils)


ios/MullvadVPN.xcodeproj/project.pbxproj line 6443 at r2 (raw file):

Previously, pinkisemils (Emīls Piņķis) wrote…

Could we also change the fake release schema to be a build configuration? Then we have less schemas, which I see as only a good thing. And the only thing that's different for the fake release is that the debug flag is not set.

Sounds good to me

@buggmagnet buggmagnet force-pushed the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch 2 times, most recently from 9cb81e9 to 5edfe8e Compare January 15, 2024 08:35
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 8 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@buggmagnet buggmagnet force-pushed the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch from 5edfe8e to fb4cfb3 Compare January 15, 2024 12:39
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6 of 8 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPN.xcodeproj/project.pbxproj line 6975 at r4 (raw file):

			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;

Can this be inherited from other the base config?

Copy link
Contributor Author

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pinkisemils)


ios/MullvadVPN.xcodeproj/project.pbxproj line 6975 at r4 (raw file):

Previously, pinkisemils (Emīls Piņķis) wrote…

Can this be inherited from other the base config?

According to the documentation, we should be able to use $(inherited) to do that.
Any setting we find in this list should be overridable via xcconfig files

Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pinkisemils)

@buggmagnet buggmagnet force-pushed the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch from 021235f to 7063688 Compare January 16, 2024 14:49
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:, still :)

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@buggmagnet buggmagnet force-pushed the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch from 7063688 to 6e6d503 Compare January 17, 2024 15:44
@buggmagnet buggmagnet force-pushed the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch from 6e6d503 to 93bd690 Compare January 18, 2024 08:20
@buggmagnet buggmagnet merged commit 11f6628 into main Jan 18, 2024
5 of 6 checks passed
@buggmagnet buggmagnet deleted the add-new-build-scheme-to-make-dev-and-release-builds-that-use-ios-422 branch January 18, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants