Skip to content

Commit f303852

Browse files
committed
修改IOS启动页,判断设备的类型
1 parent 39a0569 commit f303852

File tree

9 files changed

+101
-39
lines changed

9 files changed

+101
-39
lines changed

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1 align="center">Flutter book App</h1>
2-
<h2 align="center">使用Flutter 1.7.8+hotfix.3,如果不能运行请检查你的Flutter版本</h2>
2+
<h2 align="center">使用Flutter 1.9.1+hotfix.2,如果不能运行请检查你的Flutter版本</h2>
33

44
## 安卓APK下载
55
<p align="center">
@@ -80,10 +80,11 @@ Tools • Dart 2.3.0 (build 2.3.0-dev.0.1 cf4444b803)
8080
## `MacOS`
8181

8282
```bash
83-
Flutter 1.7.8+hotfix.4 • channel stable • https://github.com/flutter/flutter.git
84-
Framework • revision 2e540931f7 (3 days ago) • 2019-07-09 13:14:38 -0700
85-
Engine • revision 54ad777fd2
86-
Tools • Dart 2.4.0
83+
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G87, locale zh-Hans-CN)
84+
• Flutter version 1.9.1+hotfix.2 at /Users/aming/Applications/flutter
85+
• Framework revision 2d2a1ffec9 (2 weeks ago), 2019-09-06 18:39:49 -0700
86+
• Engine revision b863200c37
87+
• Dart version 2.5.0
8788
```
8889

8990
## `Mobx``JSON`序列化构建
@@ -170,3 +171,24 @@ storeFile .jks文件路径
170171
<uses-permission android:name="android.permission.INTERNET"/>
171172
```
172173

174+
### 微信SDK配置
175+
176+
#### android/build.gradle
177+
178+
```bash
179+
buildscript {
180+
ext.kotlin_version = '1.3.31'
181+
repositories {
182+
google()
183+
jcenter()
184+
}
185+
186+
dependencies {
187+
classpath 'com.android.tools.build:gradle:3.5.0'
188+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
189+
}
190+
}
191+
```
192+
```
193+
android/gradle/wrapper/gradle-wrapper.properties
194+
```

ios/Flutter/flutter_export_environment.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# This is a generated file; do not edit or check into version control.
33
export "FLUTTER_ROOT=/Users/aming/Applications/flutter"
44
export "FLUTTER_APPLICATION_PATH=/Users/aming/testFile/flutter_book"
5-
export "FLUTTER_TARGET=lib/main.dart"
5+
export "FLUTTER_TARGET=/Users/aming/testFile/flutter_book/lib/main.dart"
66
export "FLUTTER_BUILD_DIR=build"
77
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
88
export "FLUTTER_FRAMEWORK_DIR=/Users/aming/Applications/flutter/bin/cache/artifacts/engine/ios"
9-
export "FLUTTER_BUILD_NAME=1.0.0"
10-
export "FLUTTER_BUILD_NUMBER=1"
9+
export "FLUTTER_BUILD_NAME=1.0.2"
10+
export "FLUTTER_BUILD_NUMBER=1.0.2"

ios/Podfile.lock

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
PODS:
22
- Flutter (1.0.0)
3+
- fluwx (0.0.1):
4+
- Flutter
5+
- image_cropper (0.0.1):
6+
- Flutter
7+
- TOCropViewController (~> 2.5.0)
8+
- image_picker (0.0.1):
9+
- Flutter
310
- shared_preferences (0.0.1):
411
- Flutter
12+
- TOCropViewController (2.5.1)
513
- url_launcher (0.0.1):
614
- Flutter
715
- webview_flutter (0.0.1):
816
- Flutter
917

1018
DEPENDENCIES:
1119
- Flutter (from `.symlinks/flutter/ios`)
20+
- fluwx (from `.symlinks/plugins/fluwx/ios`)
21+
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
22+
- image_picker (from `.symlinks/plugins/image_picker/ios`)
1223
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
1324
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
1425
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
1526

27+
SPEC REPOS:
28+
https://github.com/cocoapods/specs.git:
29+
- TOCropViewController
30+
1631
EXTERNAL SOURCES:
1732
Flutter:
1833
:path: ".symlinks/flutter/ios"
34+
fluwx:
35+
:path: ".symlinks/plugins/fluwx/ios"
36+
image_cropper:
37+
:path: ".symlinks/plugins/image_cropper/ios"
38+
image_picker:
39+
:path: ".symlinks/plugins/image_picker/ios"
1940
shared_preferences:
2041
:path: ".symlinks/plugins/shared_preferences/ios"
2142
url_launcher:
@@ -24,8 +45,12 @@ EXTERNAL SOURCES:
2445
:path: ".symlinks/plugins/webview_flutter/ios"
2546

2647
SPEC CHECKSUMS:
27-
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
48+
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
49+
fluwx: 765c6052398eaf6fe13c73409488b0d0b9d00fd6
50+
image_cropper: f25bdfbf1ef970c9a0a0f78306fb6a0aaac7229e
51+
image_picker: 16e5fec1fbc87fd3b297c53e4048521eaf17cd06
2852
shared_preferences: 1feebfa37bb57264736e16865e7ffae7fc99b523
53+
TOCropViewController: 00dc36c4e4a0f4a45efa91adbf22df8a4fae01d3
2954
url_launcher: 0067ddb8f10d36786672aa0722a21717dba3a298
3055
webview_flutter: 1aa7604e6cdb451a9b7ed2c37d5454c0b440246b
3156

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11-
3AB0305D229ECC76005A7514 /* launch_image.png in Resources */ = {isa = PBXBuildFile; fileRef = 3AB0305C229ECC76005A7514 /* launch_image.png */; };
1211
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1312
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
1413
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14+
47BBA0A42338C69A0030BC3F /* launch_image.png in Resources */ = {isa = PBXBuildFile; fileRef = 47BBA0A32338C69A0030BC3F /* launch_image.png */; };
1515
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
1616
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1717
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
@@ -43,9 +43,9 @@
4343
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4444
18BD1C47F8C63FE41CF3B061 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
4545
1929B8D7C589A6D4FE720ABB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
46-
3AB0305C229ECC76005A7514 /* launch_image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = launch_image.png; sourceTree = "<group>"; };
4746
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4847
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
48+
47BBA0A32338C69A0030BC3F /* launch_image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = launch_image.png; path = ../../../../Desktop/launch_image.png; sourceTree = "<group>"; };
4949
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
5050
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
5151
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -91,7 +91,6 @@
9191
1929B8D7C589A6D4FE720ABB /* Pods-Runner.release.xcconfig */,
9292
F236D8A42C1EB8DDE0160D94 /* Pods-Runner.profile.xcconfig */,
9393
);
94-
name = Pods;
9594
path = Pods;
9695
sourceTree = "<group>";
9796
};
@@ -130,7 +129,7 @@
130129
97C146F01CF9000F007C117D /* Runner */ = {
131130
isa = PBXGroup;
132131
children = (
133-
3AB0305C229ECC76005A7514 /* launch_image.png */,
132+
47BBA0A32338C69A0030BC3F /* launch_image.png */,
134133
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
135134
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
136135
97C146FA1CF9000F007C117D /* Main.storyboard */,
@@ -167,6 +166,7 @@
167166
9705A1C41CF9048500538489 /* Embed Frameworks */,
168167
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
169168
0B72257DF83B26AAE1993CBD /* [CP] Embed Pods Frameworks */,
169+
3A1F78FC52BE521207681446 /* [CP] Copy Pods Resources */,
170170
);
171171
buildRules = (
172172
);
@@ -196,6 +196,7 @@
196196
developmentRegion = English;
197197
hasScannedForEncodings = 0;
198198
knownRegions = (
199+
English,
199200
en,
200201
Base,
201202
);
@@ -214,10 +215,10 @@
214215
isa = PBXResourcesBuildPhase;
215216
buildActionMask = 2147483647;
216217
files = (
217-
3AB0305D229ECC76005A7514 /* launch_image.png in Resources */,
218218
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
219219
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
220220
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
221+
47BBA0A42338C69A0030BC3F /* launch_image.png in Resources */,
221222
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
222223
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
223224
);
@@ -241,6 +242,21 @@
241242
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
242243
showEnvVarsInLog = 0;
243244
};
245+
3A1F78FC52BE521207681446 /* [CP] Copy Pods Resources */ = {
246+
isa = PBXShellScriptBuildPhase;
247+
buildActionMask = 2147483647;
248+
files = (
249+
);
250+
inputPaths = (
251+
);
252+
name = "[CP] Copy Pods Resources";
253+
outputPaths = (
254+
);
255+
runOnlyForDeploymentPostprocessing = 0;
256+
shellPath = /bin/sh;
257+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
258+
showEnvVarsInLog = 0;
259+
};
244260
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
245261
isa = PBXShellScriptBuildPhase;
246262
buildActionMask = 2147483647;

ios/Runner/Base.lproj/LaunchScreen.storyboard

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3-
<device id="retina4_7" orientation="portrait">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina4_0" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1010
</dependencies>
1111
<scenes>
@@ -18,11 +18,12 @@
1818
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
1919
</layoutGuides>
2020
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
21-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
21+
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
2222
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2323
<subviews>
24-
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFill" image="launch_image.png" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
25-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
24+
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="launch_image.png" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
25+
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
26+
<color key="backgroundColor" red="0.042784027755260468" green="0.060056924819946289" blue="0.14665070176124573" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2627
</imageView>
2728
</subviews>
2829
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -42,6 +43,6 @@
4243
</scene>
4344
</scenes>
4445
<resources>
45-
<image name="launch_image.png" width="750" height="1624"/>
46+
<image name="launch_image.png" width="750" height="1626"/>
4647
</resources>
4748
</document>

ios/Runner/Info.plist

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@
2727
<key>UIMainStoryboardFile</key>
2828
<string>Main</string>
2929
<key>UISupportedInterfaceOrientations</key>
30-
<!-- 拍照选择相册 -->
31-
<key>NSCameraUsageDescription</key>
32-
<string>Used to demonstrate image picker plugin</string>
33-
<key>NSMicrophoneUsageDescription</key>
34-
<string>Used to capture audio for image picker plugin</string>
35-
<key>NSPhotoLibraryUsageDescription</key>
36-
<string>Used to demonstrate image picker plugin</string>
37-
<key>UIBackgroundModes</key>
38-
<!-- 拍照选择相册 -->
3930
<array>
4031
<string>UIInterfaceOrientationPortrait</string>
4132
<string>UIInterfaceOrientationLandscapeLeft</string>
@@ -52,5 +43,11 @@
5243
<false/>
5344
<key>io.flutter.embedded_views_preview</key>
5445
<true/>
46+
<!-- 拍照选择相册 -->
47+
<key>NSCameraUsageDescription</key>
48+
<string>I need to access your Camera</string>
49+
<key>NSPhotoLibraryUsageDescription</key>
50+
<string>I need to access your Photo Library</string>
51+
<!-- 拍照选择相册 -->
5552
</dict>
5653
</plist>

lib/containers/FirstScreen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class _FirstScreenState extends State<FirstScreen>
2323
// 下拉刷新
2424
_controller = EasyRefreshController();
2525
// 发送请求
26-
Future.delayed(Duration.zero, () {
26+
Future(() {
2727
homeStore = Provider.of<HomeStore>(this.context);
2828
homeStore.getData();
2929
});
@@ -34,6 +34,7 @@ class _FirstScreenState extends State<FirstScreen>
3434
super.build(context);
3535
return EasyRefresh(
3636
enableControlFinishRefresh: false,
37+
bottomBouncing: Theme.of(context).platform == TargetPlatform.iOS,
3738
header: MyHeader(
3839
refreshedText: "更新成功",
3940
refreshFailedText: "刷新失败,请稍后重试",

pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ packages:
2828
name: async
2929
url: "https://pub.flutter-io.cn"
3030
source: hosted
31-
version: "2.2.0"
31+
version: "2.3.0"
3232
boolean_selector:
3333
dependency: transitive
3434
description:
3535
name: boolean_selector
3636
url: "https://pub.flutter-io.cn"
3737
source: hosted
38-
version: "1.0.4"
38+
version: "1.0.5"
3939
build:
4040
dependency: transitive
4141
description:
@@ -346,7 +346,7 @@ packages:
346346
name: meta
347347
url: "https://pub.flutter-io.cn"
348348
source: hosted
349-
version: "1.1.6"
349+
version: "1.1.7"
350350
mime:
351351
dependency: transitive
352352
description:
@@ -388,7 +388,7 @@ packages:
388388
name: path
389389
url: "https://pub.flutter-io.cn"
390390
source: hosted
391-
version: "1.6.2"
391+
version: "1.6.4"
392392
path_drawing:
393393
dependency: transitive
394394
description:
@@ -409,7 +409,7 @@ packages:
409409
name: pedantic
410410
url: "https://pub.flutter-io.cn"
411411
source: hosted
412-
version: "1.7.0"
412+
version: "1.8.0+1"
413413
petitparser:
414414
dependency: transitive
415415
description:
@@ -458,7 +458,7 @@ packages:
458458
name: quiver
459459
url: "https://pub.flutter-io.cn"
460460
source: hosted
461-
version: "2.0.3"
461+
version: "2.0.5"
462462
shared_preferences:
463463
dependency: "direct main"
464464
description:
@@ -526,7 +526,7 @@ packages:
526526
name: string_scanner
527527
url: "https://pub.flutter-io.cn"
528528
source: hosted
529-
version: "1.0.4"
529+
version: "1.0.5"
530530
term_glyph:
531531
dependency: transitive
532532
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dev_dependencies:
4646
build_runner: ^1.6.1
4747
mobx_codegen: ^0.3.3+1
4848
json_serializable: ^3.0.0
49-
flutter_easyrefresh: ^2.0.3
49+
flutter_easyrefresh: ^2.0.4
5050

5151

5252
# For information on the generic Dart part of this file, see the

0 commit comments

Comments
 (0)