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

build(apple): Migrate Tun2Socks to xcframework #1271

Merged
merged 8 commits into from
Apr 27, 2022
Merged

build(apple): Migrate Tun2Socks to xcframework #1271

merged 8 commits into from
Apr 27, 2022

Conversation

fortuna
Copy link
Collaborator

@fortuna fortuna commented Apr 22, 2022

This PR migrates Tun2Socks with xcframework to support the iOS simulator and Apple Sillicon. It removes the arm64 restriction.

Addresses #1252

Simulator:
image

@fortuna fortuna changed the title Migrate Tun2Socks to xcframework build(apple): Migrate Tun2Socks to xcframework Apr 22, 2022
Base automatically changed from fortuna-deps to master April 22, 2022 20:26
@fortuna
Copy link
Collaborator Author

fortuna commented Apr 25, 2022

I found out more about the supported macOS version.

From the Go release notes:

  • Go 1.16 is the last release that will run on macOS 10.12 Sierra.
  • Go 1.17 requires macOS 10.13 High Sierra or later; support for previous versions has been discontinued.
  • Go 1.18 now requires iOS 12 or later; support for previous versions has been discontinued.

Looking at the App Store metrics, we don't have any numbers for 1.14 or below. So I'll upgrade our macOS minimum supported version to 10.14 and downgrade Go here to 1.17.

@fortuna fortuna requested a review from bemasc April 27, 2022 04:51
@fortuna
Copy link
Collaborator Author

fortuna commented Apr 27, 2022

This is now ready for review.

/cc @daniellacosse @jyyi1

@fortuna fortuna marked this pull request as ready for review April 27, 2022 04:56
@fortuna fortuna requested review from a team as code owners April 27, 2022 04:56
README.md Outdated Show resolved Hide resolved
README.md Outdated
- Android SDK 30 (with build-tools) via commandline `sdkmanager "platforms;android-30" "build-tools;30.0.3"`
- Place it at `~/Android/Sdk/cmdline-tools/latest`
- Android SDK 30 (with build-tools) via commandline `~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-30" "build-tools;30.0.3"`
- Set up the environment: `export ANDROID_SDK_ROOT=~/Android/Sdk`
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't assume this is where they've installed their SDK - mine certainly isn't there

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not really assuming that. It's just a recommendation. We have no recommendation otherwise and it was a pain to get it set up.
It's aligned with the recommendation I added to outline-go-tun2socks: https://github.com/Jigsaw-Code/outline-go-tun2socks#set-up

@@ -757,7 +757,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
Copy link
Contributor

@daniellacosse daniellacosse Apr 27, 2022

Choose a reason for hiding this comment

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

does this affect our supported ios version? safari tends to be updated in lockstep with the os version, and ios safari with desktop safari

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It only affects macOS. iOS is 9.0.
I don't see any data for macOS <10.14 on the app Store, and it's old.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, just want to keep an eye on things deprecated in mac 14 or that aren't supported in ios 9

// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
Copy link
Contributor

Choose a reason for hiding this comment

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

What stops us from generating these on build and removing them from git?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to pull the outline-go-tun2socks code into this repository and make sure the developer has Go properly set up.
Also, we need an incremental build, because the gomobile bind takes a while.

Co-authored-by: Benjamin M. Schwartz <bemasc@google.com>
@fortuna
Copy link
Collaborator Author

fortuna commented Apr 27, 2022

I was able to validate the networking on my phone. Merging

@fortuna fortuna merged commit afee016 into master Apr 27, 2022
@fortuna fortuna deleted the fortuna-tun branch April 27, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants