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

IOS migration. #880

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
7866eb6
Started working on IOS migration.
jigar-f Jul 13, 2023
b8c5aa9
[IOS APP] Updated App icon. (#881)
jigar-f Jul 17, 2023
37d1b35
IOS App Env Setup (#883)
jigar-f Aug 30, 2023
0eac32d
Merge branch 'main' into ios-migrate
jigar-f Aug 30, 2023
9b5c309
Updated dependencies and make changes for ads support.
jigar-f Aug 30, 2023
720c2be
Updated session model to support new flashlight changes.
jigar-f Aug 30, 2023
30cb3a3
[IOS] VPN core (#901)
jigar-f Oct 3, 2023
3095b99
implemented reportIssue on Session model.
jigar-f Oct 3, 2023
3c07eac
Attempt at code simplification
oxtoacart Oct 3, 2023
d89cf54
Formatted swift code with swift-format
oxtoacart Oct 3, 2023
fe40f14
Some progress on switching on VPN
oxtoacart Oct 3, 2023
941e542
Changed scheme for passing Flutter arguments to Go
oxtoacart Oct 4, 2023
8a62b56
Cleaner initialization of SessionModel
oxtoacart Oct 4, 2023
bc174ab
Fixed issue with report and issue.
jigar-f Oct 4, 2023
7a90c8d
Merge pull request #923 from getlantern/ox/ios-migrate-suggestions
oxtoacart Oct 4, 2023
8b569c7
Replace serverInfo from VPN to session model, due to go model changes.
jigar-f Oct 5, 2023
57e4568
Merge branch 'ios-migrate' into ios-report-issue
jigar-f Oct 5, 2023
2aa0cef
Merge latest.
jigar-f Oct 5, 2023
ecced9d
Added back language method in session model.
jigar-f Oct 5, 2023
dd31a5c
Merge pull request #921 from getlantern/ios-report-issue
oxtoacart Oct 5, 2023
35e4cb0
Merge branch 'main' into ios-migrate
jigar-f Oct 5, 2023
452088a
Merge latest
jigar-f Oct 5, 2023
abb10f3
Use separate connection for each transaction
oxtoacart Oct 5, 2023
b200b69
Moved PATH_SERVER_INFO to session_model.go
oxtoacart Oct 5, 2023
dabceb2
Target iOS 12 for Tunnel
oxtoacart Oct 5, 2023
f52db8c
Use separate database connection for each transaction
oxtoacart Oct 5, 2023
8008c1d
Stop using JSON across Go/Swift boundary and use pathdb's built-in su…
oxtoacart Oct 11, 2023
fc02012
Merge pull request #930 from getlantern/ox/ios-migrate/pathdb-changes
oxtoacart Oct 11, 2023
777e409
Merged from main
oxtoacart Oct 11, 2023
86a840e
Upgraded gomobile
oxtoacart Oct 11, 2023
c863b52
Got android build working again
oxtoacart Oct 11, 2023
6ff34a2
Added support for Go models
oxtoacart Oct 12, 2023
c6f45d4
Integrated vpn_model.go into Android app
oxtoacart Oct 12, 2023
214648b
Changes to make iOS work with new pathdb and model
oxtoacart Oct 12, 2023
3d1275a
upgrade Google Services Gradle Plugin
atavism Oct 12, 2023
4a79f87
Merge pull request #933 from getlantern/atavism/ios-migrate-android
oxtoacart Oct 13, 2023
0ef55a0
Merge pull request #932 from getlantern/ox/ios-migrate/android
oxtoacart Oct 13, 2023
92aad9f
Miscellaneous code review suggestions
oxtoacart Oct 13, 2023
333d129
Merge pull request #934 from getlantern/ox/ios-migrate-prsuggestions
oxtoacart Oct 16, 2023
1a85b13
Merge branch 'main' into ios-migrate
jigar-f Oct 20, 2023
c791ec1
Ios hotfix (#926)
jigar-f Oct 23, 2023
4a987bb
Sentry for IOS (#937)
jigar-f Oct 25, 2023
ecd75f3
Change CI to run on ios-migrate branch.
jigar-f Oct 25, 2023
331f902
Build framework in CI.
jigar-f Oct 25, 2023
4c4abdc
Update browerstack.yml
jigar-f Oct 25, 2023
1363634
Update browerstack.yml
jigar-f Oct 25, 2023
9dd340e
Update browerstack.yml
jigar-f Oct 25, 2023
43b6cf8
Update browerstack.yml
jigar-f Oct 25, 2023
fbe80b9
Update browerstack.yml
jigar-f Oct 25, 2023
31edce5
fix navigation issue (#938)
jigar-f Oct 25, 2023
24783f4
Make changes on Appstore build flow.
jigar-f Oct 26, 2023
5c0304d
Show build info and SDK version.
jigar-f Oct 26, 2023
64bb05d
Format code.
jigar-f Oct 26, 2023
22915f8
Uploaded build to testflight.
jigar-f Oct 26, 2023
75677e9
Fix ConnectivityWarning showing up for release build.
jigar-f Oct 27, 2023
7e45a1e
pop route instead pusj
jigar-f Oct 27, 2023
e962b7f
Added command to ios release automate. (#939)
jigar-f Oct 27, 2023
c47ccee
Uploaded build to testflight.
jigar-f Oct 30, 2023
f3d2d2e
update token
myleshorton Oct 30, 2023
eb11397
fix protoc token
myleshorton Oct 30, 2023
4abc00b
fix protoc token
myleshorton Oct 30, 2023
1f71fd8
bump flashlight to latest
myleshorton Oct 30, 2023
6b182f1
bumped deps
myleshorton Oct 30, 2023
ceaed4a
use proxy 2.0.1
myleshorton Oct 30, 2023
6d05b39
bump checkout action versions
myleshorton Oct 30, 2023
dbcd6bb
run on demand
myleshorton Oct 30, 2023
46bd245
fix checksum issue for proxy-2.0
jigar-f Oct 31, 2023
3cde9dc
bump flashlight and associated dependencies
myleshorton Nov 1, 2023
3b388bd
fix build
myleshorton Nov 1, 2023
3df5757
Added macos support. (#945)
jigar-f Nov 5, 2023
960fb3e
Ios readme (#940)
jigar-f Nov 5, 2023
c1450b5
Fixed local range issue.
jigar-f Nov 8, 2023
a99a4d0
Remove protoc steps.
jigar-f Nov 8, 2023
37a5f43
Remove vpn.pb.go from make file.
jigar-f Nov 9, 2023
ce21e0d
Change make file for generating protos for Go.
jigar-f Nov 9, 2023
c044e9a
Update Makefile
jigar-f Nov 9, 2023
7c2e240
Run it on Macos.
jigar-f Nov 9, 2023
177e57f
Run on macos-12.
jigar-f Nov 9, 2023
5b44a04
Run on macos-13.
jigar-f Nov 9, 2023
22d73a1
Moved some operation on BG thread
jigar-f Nov 9, 2023
1e494c1
Format code.
jigar-f Nov 9, 2023
eab0e69
Update flashlight and go versions (#949)
myleshorton Nov 19, 2023
dc0d648
Revert "Update flashlight and go versions (#949)" (#950)
atavism Nov 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
android/app/libs/opuslib-release.aar filter=lfs diff=lfs merge=lfs -text
screenshots/ filter=lfs diff=lfs merge=lfs -text
assets/testing/ filter=lfs diff=lfs merge=lfs -text
android/app/libs/alipaySdk-15.7.6-20200521195109.aar filter=lfs diff=lfs merge=lfs -text
Internalsdk.xcframework filter=lfs diff=lfs merge=lfs -text
android/app/libs/liblantern-all.aar filter=lfs diff=lfs merge=lfs -text
55 changes: 26 additions & 29 deletions .github/workflows/browerstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: BrowserStack CI

on:
push:
branches: [ main ]
branches: [ ios-migrate ]
pull_request:
branches: [ main ]
branches: [ ios-migrate ]
env:
GOPRIVATE: github.com/getlantern

jobs:
build:
runs-on:
group: large-runners
runs-on: macos-13
# group: large-runners
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true

Expand All @@ -28,50 +28,36 @@ jobs:
- run: flutter --version

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19

- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"

- name: Setup Sentry CLI
uses: mathieu-bour/setup-sentry-cli@v1
with:
version: latest
token: ${{ SECRETS.SENTRY_TOKEN }} # from GitHub secrets
organization: getlantern
project: android
git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Setup protoc
uses: arduino/[email protected]
with:
version: '3.x'

- name: Activate protoc-gen-dart plugin
run: |
echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH
dart pub global activate protoc_plugin
mkdir -p "${HOME}/.pub-cache/bin"
mv "${FLUTTER_ROOT}/.pub-cache/bin/protoc-gen-dart" "${HOME}/.pub-cache/bin"

- name: Build Android-Lib
run: make android-lib ANDROID_ARCH=all

- name: Build APK
env:
CI: "true"
run: |
flutter pub get
make appium-test-build

- name: Build IOS-Framework
run: make build-framework

- name: Build IPA
run: |
flutter pub get
make appium-ios-ipa

- name: List files in current directory
run: ls -la

Expand All @@ -83,6 +69,7 @@ jobs:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
BROWSERSTACK_APP_PATH: "build/app/outputs/flutter-apk/app-appiumtest-debug.apk"
BROWSERSTACK_IOS_APP_PATH: "build/ios/ipa/Lantern.ipa"
run: |
response=$(curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
Expand All @@ -92,6 +79,16 @@ jobs:
echo "$app_url"
echo "BROWSERSTACK_APP_ID=$app_url" >> $GITHUB_ENV

# Upload iOS app
response_ios=$(curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
-F "file=@$BROWSERSTACK_IOS_APP_PATH" \
-F "ios_keychain_support=true" \
-F "custom_id=LanternAppIOS") # Custom ID for the iOS app
app_url_ios=$(echo $response_ios | jq -r .app_url)
echo "iOS app URL: $app_url_ios"
echo "BROWSERSTACK_APP_ID_IOS=$app_url_ios" >> $GITHUB_ENV

- name: Run Tests
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:

build:
runs-on:
group: large-runners
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install libpcap
run: sudo apt-get install libpcap-dev
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- name: Run Unit tests
run: |
go test -failfast -coverprofile=profile.cov ./...
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"

- name: Setup Sentry CLI
uses: mathieu-bour/setup-sentry-cli@v1
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Setup protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GH_TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Activate protoc-gen-dart plugin
run: |
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
releaseFiles: lantern-installer.aab
track: production
- name: Grant private modules access
run: git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
run: git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- name: Clone binaries repo
run: git clone --depth 1 https://github.com/getlantern/lantern-binaries
- name: Rename builds
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/transifex-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- uses: actions/checkout@v3
- name: "Pull new translations"
env:
Expand All @@ -28,4 +28,3 @@ jobs:
git config user.email [email protected]
git ls-files --modified assets/locales android/app/src/main/res | xargs git add
git diff --cached --exit-code || git commit -m "updated translations..." && git push origin main

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ web*.pem
screenshots
profile.cov
appium_kotlin/app/src/test/resources/local/local_config.json

ios/internalsdk/Internalsdk.xcframework/
android/app/libs/liblantern-all.aar
30 changes: 30 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: macos
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
2 changes: 1 addition & 1 deletion .run/Appium Test.run.xml → .run/appiumTest.run.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Appium Test" type="FlutterRunConfigurationType" factoryName="Flutter">
<configuration default="false" name="appiumTest" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="additionalArgs" value="--dart-define=app.flavor=appiumTest" />
<option name="buildFlavor" value="appiumTest" />
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
Expand Down
8 changes: 0 additions & 8 deletions .run/main.dart.run.xml

This file was deleted.

7 changes: 7 additions & 0 deletions .run/prod.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="prod" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="buildFlavor" value="prod" />
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method v="2" />
</configuration>
</component>
9 changes: 9 additions & 0 deletions DBModule/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
4 changes: 4 additions & 0 deletions DBModule/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: test

test:
xcodebuild -scheme DBModule -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.4' test
14 changes: 14 additions & 0 deletions DBModule/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "sqlite.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"state" : {
"revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb",
"version" : "0.14.1"
}
}
],
"version" : 2
}
33 changes: 33 additions & 0 deletions DBModule/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "DBModule",
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "DBModule",
targets: ["DBModule"])
],
dependencies: [
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.14.1")
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.binaryTarget(
name: "Internalsdk",
path: "../ios/internalsdk/Internalsdk.xcframework"),
.target(
name: "DBModule",
dependencies: [
"Internalsdk",
.product(name: "SQLite", package: "SQLite.swift"),
]),
.testTarget(
name: "DBModuleTests",
dependencies: ["DBModule"]),
]
)
Loading
Loading