Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Oct 17, 2022
1 parent 9a1d1fb commit 9df40c4
Show file tree
Hide file tree
Showing 25 changed files with 128 additions and 55 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ app.*.map.json
/go/mobile/lib/*.xcframework/

/lib/assets/version.txt
desiredFileName.txt
1 change: 0 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
## 使用前必读

- 根据地区的不同DNS拦截器不一定有效, 请使用科学上网测试本软件的可用性
- 由于官方网站使用了反DDOS攻击, 如果漫画列表拉取失败, 请过5秒之后重试

## 软件截图

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ A beautiful and cross platform *NHentai Client*. Support desktop and mobile phon
## Must readme

The official website uses the page to prevent DDoS attacks.
If the comic list is not obtained successfully, you need to wait 5 seconds and try again.

## Captures

Expand Down
2 changes: 1 addition & 1 deletion ci/version.code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.8
v0.0.9
4 changes: 2 additions & 2 deletions ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- 通过网页加载Cookie, 帮助穿过DDoS防御 (实验性)
- 可以直接打开 https://nhentai.com/g/12345/ 类似的网址进入详情页(安卓)
- Cross DDoS (only phone)
- 通过ddos (仅手机端)
4 changes: 4 additions & 0 deletions go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ require (
github.com/mattn/go-sqlite3 v1.14.9 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20220615171555-694bf12d69de // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
)
28 changes: 28 additions & 0 deletions go/go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
github.com/Xuanwo/go-locale v1.1.0 h1:51gUxhxl66oXAjI9uPGb2O0qwPECpriKQb2hl35mQkg=
Expand Down Expand Up @@ -59,17 +60,36 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20220321031419-a8550c1d254a h1:LnH9RNcpPv5Kzi15lXg42lYMPUf0x8CuPv1YnvBWZAg=
golang.org/x/image v0.0.0-20220321031419-a8550c1d254a/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105 h1:3vUV5x5+3LfQbgk7paCM6INOaJG9xXQbn79xoNkwfIk=
golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220615171555-694bf12d69de h1:ogOG2+P6LjO2j55AkRScrkB2BFpd+Z8TY2wcM0Z3MGo=
golang.org/x/net v0.0.0-20220615171555-694bf12d69de/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211023085530-d6a326fbbf70/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand All @@ -80,7 +100,15 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098 h1:YuekqPskqwCCPM79F1X5Dhv4ezTCj+Ki1oNwiafxkA0=
golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
6 changes: 3 additions & 3 deletions go/nhentai/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (

func availableWebAddresses(_ string) (string, error) {
return serialize([]string{
"104.27.194.88:443",
"104.27.195.88:443",
"104.21.66.123:443",
"172.67.159.231:443",
}, nil)
}

func availableImgAddresses(_ string) (string, error) {
return serialize([]string{
"23.237.126.122:443",
"185.107.44.3:443",
"185.177.127.78:443",
"185.177.127.77:443",
}, nil)
Expand Down
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
27 changes: 19 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,50 @@ PODS:
- app_links (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_inappwebview (0.0.1):
- Flutter
- flutter_inappwebview/Core (= 0.0.1)
- OrderedSet (~> 5.0)
- flutter_inappwebview/Core (0.0.1):
- Flutter
- OrderedSet (~> 5.0)
- OrderedSet (5.0.0)
- "permission_handler (5.1.0+2)":
- Flutter
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter

DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
- Flutter (from `Flutter`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

SPEC REPOS:
trunk:
- OrderedSet

EXTERNAL SOURCES:
app_links:
:path: ".symlinks/plugins/app_links/ios"
Flutter:
:path: Flutter
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
app_links: 8941e7bac086136bae70d619141c36f258f4381d
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.11.3
1 change: 1 addition & 0 deletions l10n.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
untranslated-messages-file: desiredFileName.txt
1 change: 1 addition & 0 deletions lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"failed": "失败",
"autoCheckNewVersion": "自动检查更新",
"disabled": "已禁用",
"disable": "禁用",
"enabled": "已开启",
"enable": "开启",
"nextTime": "下一次",
Expand Down
15 changes: 8 additions & 7 deletions lib/screens/comic_reader_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,10 @@ class _ComicReaderWebToonState extends _ComicReaderState {
.toList()
.cast<double>();
} else {
final height = constraints.maxHeight -
var height = constraints.maxHeight -
super._appBarHeight() -
(_fullScreen ? super._appBarHeight() : super._bottomBarHeight());
super._bottomBarHeight() -
MediaQuery.of(context).padding.bottom;
_offsets = widget.comicInfo.images.pages
.map((e) => height * e.w / e.h)
.toList()
Expand All @@ -447,9 +448,10 @@ class _ComicReaderWebToonState extends _ComicReaderState {
.toList()
.cast<Size>();
} else {
final height = constraints.maxHeight -
var height = constraints.maxHeight -
super._appBarHeight() -
(_fullScreen ? super._appBarHeight() : super._bottomBarHeight());
super._bottomBarHeight() -
MediaQuery.of(context).padding.bottom;
_sizes = widget.comicInfo.images.pages
.map((e) => Size(height * e.w / e.h, height))
.toList()
Expand All @@ -469,9 +471,8 @@ class _ComicReaderWebToonState extends _ComicReaderState {
top: super._appBarHeight(),
bottom: _direction == ReaderDirection.topToBottom
? 130
: (_fullScreen
? super._appBarHeight()
: super._bottomBarHeight()),
: (super._bottomBarHeight() +
MediaQuery.of(context).padding.bottom)
),
itemCount: widget.comicInfo.images.pages.length,
itemBuilder: (BuildContext context, int index) {
Expand Down
2 changes: 0 additions & 2 deletions lib/screens/comics_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import 'dart:io';

import 'package:flutter_gen/gen_l10n/app_localizations.dart';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:nhentai/basic/channels/nhentai.dart';
import 'package:nhentai/screens/comic_search_screen.dart';
import 'package:nhentai/screens/components/pager.dart';
import 'package:nhentai/screens/webview_screen.dart';
import 'package:webview_flutter/webview_flutter.dart';

import 'comic_downloads_screen.dart';
import 'components/actions.dart';
Expand Down
68 changes: 49 additions & 19 deletions lib/screens/webview_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:nhentai/basic/channels/nhentai.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:nhentai/basic/common/common.dart';

class WebViewScreen extends StatefulWidget {
const WebViewScreen({Key? key}) : super(key: key);
Expand All @@ -10,34 +13,61 @@ class WebViewScreen extends StatefulWidget {
}

class _WebViewScreenState extends State<WebViewScreen> {
late WebViewController _webViewController;
late InAppWebViewController _webViewController;
late CookieManager _cookieManager;

@override
void initState() {
_cookieManager = CookieManager.instance();
super.initState();
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Load web cookies"),
actions: [
IconButton(onPressed: () {
_webViewController.loadUrl('https://nhentai.net/');
}, icon: const Icon(Icons.refresh),),
IconButton(onPressed: () async {
final cookies = await _webViewController.runJavascriptReturningResult(
'document.cookie',
);
await nHentai.setCookie(cookies);
await nHentai.setUserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36');
Navigator.of(context).pop();
}, icon: const Icon(Icons.check),),
IconButton(
onPressed: () {
_webViewController.loadUrl(
urlRequest:
URLRequest(url: Uri.parse('https://nhentai.net/')));
},
icon: const Icon(Icons.refresh),
),
IconButton(
onPressed: () async {
final body = await _webViewController.evaluateJavascript(
source: "navigator.userAgent");
await nHentai.setUserAgent(body);

// var cookies =
// await _webViewController.evaluateJavascript(source: "document.cookie");
//
// if (cookies.startsWith("\"")) {
// cookies = cookies.replaceAll("\"", "");
// }

final cookies = await _cookieManager.getCookies(
url: Uri.parse('https://nhentai.net/'));
print(cookies.map((e) => "${e.name}=${e.value}").join("; "));
await nHentai.setCookie(
cookies.map((e) => "${e.name}=${e.value}").join("; "));
Navigator.of(context).pop();
},
icon: const Icon(Icons.check),
),
],
),
body: WebView(
initialUrl: 'https://nhentai.net/',
onWebViewCreated: (WebViewController webViewController) {
_webViewController = webViewController;
body: InAppWebView(
initialUrlRequest: URLRequest(
url: Uri.parse('https://nhentai.net/'),
),
onLoadStart: (c, url) {
print("onLoadStart");
_webViewController = c;
},
javascriptMode: JavascriptMode.unrestricted,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36',
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: nhentai
description: nhentai client
publish_to: 'none'
version: 1.0.0+1
version: 0.0.9+2

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/bind-android-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.."

cd go/mobile

gomobile bind -target=android/arm,android/arm64,android/386,android/amd64 -o lib/Mobile.aar ./
gomobile bind -androidapi 19 -target=android/arm,android/arm64,android/386,android/amd64 -o lib/Mobile.aar ./
2 changes: 1 addition & 1 deletion scripts/bind-ios-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.."

cd go/mobile

gomobile bind -target=ios -o lib/Mobile.xcframework ./
gomobile bind -androidapi 19 -target=ios -o lib/Mobile.xcframework ./
2 changes: 1 addition & 1 deletion scripts/bind-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.."

cd go/mobile

gomobile bind -target=ios -o lib/Mobile.xcframework ./
gomobile bind -iosversion 11.0 -target=ios -o lib/Mobile.xcframework ./
2 changes: 1 addition & 1 deletion scripts/build-apk-arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.."

cd go/mobile
go get golang.org/x/mobile/cmd/gobind
gomobile bind -target=android/arm -o lib/Mobile.aar ./
gomobile bind -androidapi 19 -target=android/arm -o lib/Mobile.aar ./
cd ../..
flutter build apk --target-platform android-arm
2 changes: 1 addition & 1 deletion scripts/build-apk-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.."

cd go/mobile
go get golang.org/x/mobile/cmd/gobind
gomobile bind -target=android/arm64 -o lib/Mobile.aar ./
gomobile bind -androidapi 19 -target=android/arm64 -o lib/Mobile.aar ./
cd ../..
flutter build apk --target-platform android-arm64
2 changes: 1 addition & 1 deletion scripts/build-apk-x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.."

cd go/mobile
go get golang.org/x/mobile/cmd/gobind
gomobile bind -target=android/amd64 -o lib/Mobile.aar ./
gomobile bind -androidapi 19 -target=android/amd64 -o lib/Mobile.aar ./
cd ../..
flutter build apk --target-platform android-x64
Loading

0 comments on commit 9df40c4

Please sign in to comment.