├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── crazecoder
│ └── flutter
│ └── pgyer
│ ├── FlutterPgyerPlugin.java
│ ├── bean
│ ├── CheckEnum.java
│ └── InitResultInfo.java
│ └── utils
│ ├── JsonUtil.java
│ ├── LogUtil.java
│ └── MapUtil.java
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── crazecoder
│ │ │ │ │ └── flutter_pgyer_example
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── flutter_pgyer.iml
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── FlutterPgyerPlugin.h
│ └── FlutterPgyerPlugin.m
└── flutter_pgyer.podspec
├── lib
├── flutter_pgyer.dart
└── src
│ ├── bean
│ ├── check_model_base.dart
│ ├── check_result.dart
│ ├── check_soft_model.dart
│ ├── ios_check_model.dart
│ └── result.dart
│ └── flutter_pgyer.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── flutter_pgyer_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 2.1.2
2 | * 升级android sdk 4.2.2
3 | * 修复布局越界报错问题
4 | * 修复android检测更新逻辑
5 | ## 2.1.1
6 | * 修复ios初始化返回结果错误的问题
7 | ## 2.1.0+1
8 | * 修复检测更新不走回调的问题
9 | ## 2.1.0
10 | * 新增检测更新回调FlutterPgyer.onCheckUpgrade
11 | * 新增检测更新参数justNotify
12 | ## 2.0.1
13 | * 异常上报方法更新
14 | ## 2.0.0
15 | * 很久没更了,升到最新版,没测试
16 | ## 1.0.1
17 | * Android SDK升级到最新版本V3.0.10
18 | ## 1.0.0
19 | * 实现异常上报(iOS/Android)
20 | * 实现内测分发应用更新(iOS/Android)
21 | * 支持自定义分发应用更新(Android)
22 | * 实现摇一摇反馈,并附带反馈自定义信息(iOS/Android)
23 | * 支持摇一摇反馈界面颜色主题定义(iOS/Android)
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2018 crazecoder. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 考虑到蒲公英异常上报及统计需要付费,白嫖党可以使用[pgyer_updater](https://github.com/crazecoder/pgyer_updater)实现应用更新和[flutter_bugly](https://github.com/crazecoder/flutter_bugly)实现异常上报及统计来配合使用
2 |
3 |
4 | # flutter_pgyer
5 | [](https://pub.dartlang.org/packages/flutter_pgyer)
6 |
7 | ## 蒲公英内测分发:数据统计、原生异常上报、flutter异常上报、应用更新、用户反馈
8 |
9 | ---
10 |
11 | 1、引入
12 | --
13 | ```yaml
14 | dependencies:
15 | flutter_pgyer: lastVersion
16 | ```
17 |
18 | 2、使用
19 | ----
20 | ```dart
21 | import 'package:flutter_pgyer/flutter_pgyer.dart';
22 |
23 | //使用flutter异常上报
24 | void main() => FlutterPgyer.reportException(()=>runApp(MyApp()));
25 |
26 | //初始化
27 | FlutterPgyer.init(
28 | iOSAppKey: "your ios appkey",
29 | androidApiKey: "your android apikey",
30 | frontJSToken: "your frontjs token",
31 | );
32 |
33 | //用户反馈附带参数,iOS专用
34 | FlutterPgyer.setEnableFeedback(param: map);
35 |
36 | //检查更新,justNotify默认true
37 | FlutterPgyer.checkSoftwareUpdate(justNotify: false);
38 | //检查更新回调,justNotify为false时回调
39 | FlutterPgyer.onCheckUpgrade.listen((result){});
40 | //手动上报异常
41 | FlutterPgyer.uploadException({String message, String detail});
42 | ```
43 |
44 | ### Android
45 | 在项目manifest里添加(如果对统计没有要求,可不配置,区别在于上传apk到蒲公英时,能不能检测到集成,无法检测到就不会有统计)
46 | ```
47 |
50 |
53 | ```
54 | 3、已知问题
55 | ----
56 | 1)iOS异常上报debug不可用,打包ipa没有测试,如有问题请issue
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.crazecoder.flutter_pgyer'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | maven { url "https://raw.githubusercontent.com/Pgyer/analytics/master" }
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:4.0.2'
13 | }
14 | }
15 |
16 | rootProject.allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | maven { url 'https://jitpack.io' }
21 | maven { url "https://raw.githubusercontent.com/Pgyer/analytics/master" }
22 | }
23 | }
24 |
25 | apply plugin: 'com.android.library'
26 |
27 | android {
28 | compileSdkVersion 29
29 |
30 | defaultConfig {
31 | minSdkVersion 19
32 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
33 | }
34 | lintOptions {
35 | disable 'InvalidPackage'
36 | }
37 | }
38 | dependencies {
39 | implementation 'com.pgyer:analytics:4.1.16'
40 | implementation 'androidx.appcompat:appcompat:1.1.0'
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'flutter_pgyer'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android/src/main/java/com/crazecoder/flutter/pgyer/FlutterPgyerPlugin.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter.pgyer;
2 |
3 | import android.Manifest;
4 | import android.app.Activity;
5 | import android.text.TextUtils;
6 |
7 | import androidx.annotation.NonNull;
8 | import androidx.core.content.ContextCompat;
9 | import androidx.core.content.PermissionChecker;
10 |
11 | import com.crazecoder.flutter.pgyer.bean.CheckEnum;
12 | import com.crazecoder.flutter.pgyer.bean.InitResultInfo;
13 | import com.crazecoder.flutter.pgyer.utils.JsonUtil;
14 | import com.crazecoder.flutter.pgyer.utils.MapUtil;
15 | import com.pgyer.pgyersdk.PgyerSDKManager;
16 | import com.pgyer.pgyersdk.callback.CheckoutCallBack;
17 | import com.pgyer.pgyersdk.callback.CheckoutVersionCallBack;
18 | import com.pgyer.pgyersdk.model.CheckSoftModel;
19 |
20 | import java.util.ArrayList;
21 | import java.util.HashMap;
22 | import java.util.List;
23 | import java.util.Map;
24 | import java.util.regex.Matcher;
25 | import java.util.regex.Pattern;
26 |
27 | import io.flutter.embedding.engine.plugins.FlutterPlugin;
28 | import io.flutter.embedding.engine.plugins.activity.ActivityAware;
29 | import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
30 | import io.flutter.plugin.common.MethodCall;
31 | import io.flutter.plugin.common.MethodChannel;
32 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
33 | import io.flutter.plugin.common.MethodChannel.Result;
34 | import io.flutter.plugin.common.PluginRegistry.Registrar;
35 |
36 | /**
37 | * FlutterPgyerPlugin
38 | */
39 | public class FlutterPgyerPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware {
40 |
41 | private Activity activity;
42 | private FlutterPluginBinding flutterPluginBinding;
43 | private MethodChannel channel;
44 |
45 | private final PgyerSDKManager.InitSdk sdkManager = new PgyerSDKManager.InitSdk();
46 |
47 | // public FlutterPgyerPlugin(Activity activity,MethodChannel channel){
48 | // this.activity = activity;
49 | // this.channel = channel;
50 | // }
51 | // /**
52 | // * Plugin registration.
53 | // */
54 | // @Deprecated
55 | // public static void registerWith(Registrar registrar) {
56 | // final MethodChannel channel = new MethodChannel(registrar.messenger(), "crazecoder/flutter_pgyer");
57 | // FlutterPgyerPlugin plugin = new FlutterPgyerPlugin(registrar.activity(),channel);
58 | // channel.setMethodCallHandler(plugin);
59 | // }
60 |
61 | @Override
62 | public void onMethodCall(final MethodCall call, @NonNull Result result) {
63 | if (call.method.equals("initSdk")) {
64 | String json;
65 | try {
66 | if (!hasPermission(Manifest.permission.READ_PHONE_STATE)) {
67 | json = JsonUtil.toJson(MapUtil.deepToMap(getResultBean(false, "Permission denied: " + Manifest.permission.READ_PHONE_STATE)));
68 | result.success(json);
69 | return;
70 | }
71 | String apiKey = call.argument("apiKey");
72 | String frontJSToken = call.argument("frontJSToken");
73 | sdkManager.setContext(activity.getApplication())
74 | .setApiKey(apiKey) //添加apikey
75 | .setFrontJSToken(frontJSToken) //添加 token
76 | .build();
77 | // PgyCrashManager.setIsIgnoreDefaultHander(false);
78 | json = JsonUtil.toJson(MapUtil.deepToMap(getResultBean(true, "初始化成功")));
79 | } catch (Exception e) {
80 | json = JsonUtil.toJson(MapUtil.deepToMap(getResultBean(false, "初始化失败:" + e.getMessage())));
81 | }
82 | result.success(json);
83 | } else if (call.method.equals("reportException")) {
84 | String message = "";
85 | String detail = null;
86 | if (call.hasArgument("crash_message")) {
87 | message = call.argument("crash_message");
88 | }
89 | if (call.hasArgument("crash_detail")) {
90 | detail = call.argument("crash_detail");
91 | }
92 | if (TextUtils.isEmpty(detail)) return;
93 | String[] details = detail.split("#");
94 | List elements = new ArrayList<>();
95 | for (String s : details) {
96 | if (!TextUtils.isEmpty(s)) {
97 | String methodName = null;
98 | String fileName = null;
99 | int lineNum = -1;
100 | String[] contents = s.split(" \\(");
101 | if (contents.length > 0) {
102 | methodName = contents[0];
103 | if (contents.length < 2) {
104 | break;
105 | }
106 | String packageContent = contents[1].replace(")", "");
107 | String[] packageContentArray = packageContent.split("\\.dart:");
108 | if (packageContentArray.length > 0) {
109 | if (packageContentArray.length == 1) {
110 | fileName = packageContentArray[0];
111 | } else {
112 | fileName = packageContentArray[0] + ".dart";
113 | Pattern patternTrace = Pattern.compile("[1-9]\\d*");
114 | Matcher m = patternTrace.matcher(packageContentArray[1]);
115 | if (m.find()) {
116 | String lineNumStr = m.group();
117 | lineNum = Integer.parseInt(lineNumStr);
118 | }
119 | }
120 | }
121 | }
122 | StackTraceElement element = new StackTraceElement("Dart", methodName, fileName, lineNum);
123 | elements.add(element);
124 | }
125 | }
126 | Throwable throwable = new Throwable(message);
127 | if (elements.size() > 0) {
128 | StackTraceElement[] elementsArray = new StackTraceElement[elements.size()];
129 | throwable.setStackTrace(elements.toArray(elementsArray));
130 | }
131 | PgyerSDKManager.reportException(new Exception(throwable));
132 | result.success(null);
133 | } else if (call.method.equals("checkSoftwareUpdate")) {
134 | boolean justNotify = true;
135 | if (call.hasArgument("justNotify")) {
136 | justNotify = call.argument("justNotify");
137 | }
138 | if (justNotify) {
139 | PgyerSDKManager.checkSoftwareUpdate(activity);
140 | }else{
141 | PgyerSDKManager.checkSoftwareUpdate(activity, new CheckoutVersionCallBack() {
142 | @Override
143 | public void onSuccess(CheckSoftModel checkSoftModel) {
144 | Map data = new HashMap<>();
145 | data.put("model", JsonUtil.toJson(MapUtil.deepToMap(checkSoftModel)));
146 | data.put("enum", CheckEnum.SUCCESS.ordinal());
147 | channel.invokeMethod("onCheckUpgrade", data);
148 | }
149 |
150 | @Override
151 | public void onFail(String s) {
152 | Map data = new HashMap<>();
153 | data.put("enum", CheckEnum.FAIL.ordinal());
154 | channel.invokeMethod("onCheckUpgrade", data);
155 | }
156 | });
157 | }
158 |
159 | result.success(null);
160 | } else if (call.method.equals("checkVersionUpdate")) {
161 | PgyerSDKManager.checkVersionUpdate(activity, new CheckoutCallBack() {
162 | @Override
163 | public void onNewVersionExist(CheckSoftModel checkSoftModel) {
164 | Map data = new HashMap<>();
165 | data.put("model", JsonUtil.toJson(MapUtil.deepToMap(checkSoftModel)));
166 | data.put("enum", CheckEnum.SUCCESS.ordinal());
167 | channel.invokeMethod("onCheckUpgrade", data);
168 | }
169 |
170 | @Override
171 | public void onNonentityVersionExist(String s) {
172 | Map data = new HashMap<>();
173 | data.put("enum", CheckEnum.NO_VERSION.ordinal());
174 | channel.invokeMethod("onCheckUpgrade", data);
175 | }
176 |
177 | @Override
178 | public void onFail(String s) {
179 | Map data = new HashMap<>();
180 | data.put("enum", CheckEnum.FAIL.ordinal());
181 | channel.invokeMethod("onCheckUpgrade", data);
182 | }
183 | });
184 | result.success(null);
185 | } else {
186 | result.notImplemented();
187 | }
188 | }
189 |
190 | private InitResultInfo getResultBean(boolean isSuccess, String msg) {
191 | InitResultInfo bean = new InitResultInfo();
192 | bean.setSuccess(isSuccess);
193 | bean.setMessage(msg);
194 | return bean;
195 | }
196 |
197 | private boolean hasPermission(String permission) {
198 | return ContextCompat.checkSelfPermission(activity, permission) == PermissionChecker.PERMISSION_GRANTED;
199 | }
200 |
201 | @Override
202 | public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
203 | this.flutterPluginBinding = binding;
204 |
205 | }
206 |
207 | @Override
208 | public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
209 |
210 | }
211 |
212 | @Override
213 | public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
214 | activity = binding.getActivity();
215 | channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "crazecoder/flutter_pgyer");
216 | channel.setMethodCallHandler(this);
217 | }
218 |
219 | @Override
220 | public void onDetachedFromActivityForConfigChanges() {
221 |
222 | }
223 |
224 | @Override
225 | public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) {
226 |
227 | }
228 |
229 | @Override
230 | public void onDetachedFromActivity() {
231 | channel.setMethodCallHandler(null);
232 | flutterPluginBinding = null;
233 | }
234 | }
235 |
--------------------------------------------------------------------------------
/android/src/main/java/com/crazecoder/flutter/pgyer/bean/CheckEnum.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter.pgyer.bean;
2 |
3 | public enum CheckEnum {
4 | SUCCESS,
5 | FAIL,
6 | NO_VERSION
7 | }
8 |
--------------------------------------------------------------------------------
/android/src/main/java/com/crazecoder/flutter/pgyer/bean/InitResultInfo.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter.pgyer.bean;
2 |
3 | /**
4 | * Note of this class.
5 | *
6 | * @author crazecoder
7 | * @since 2019/3/4
8 | */
9 | public class InitResultInfo {
10 | private String message;
11 | private boolean isSuccess;
12 |
13 | public String getMessage() {
14 | return message;
15 | }
16 |
17 | public void setMessage(String message) {
18 | this.message = message;
19 | }
20 |
21 | public boolean isSuccess() {
22 | return isSuccess;
23 | }
24 |
25 | public void setSuccess(boolean success) {
26 | isSuccess = success;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/android/src/main/java/com/crazecoder/flutter/pgyer/utils/JsonUtil.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter.pgyer.utils;
2 |
3 | import com.crazecoder.flutter.pgyer.BuildConfig;
4 |
5 | import org.json.JSONException;
6 | import org.json.JSONObject;
7 |
8 | import java.util.Map;
9 |
10 | /**
11 | * Note of this class.
12 | *
13 | * @author crazecoder
14 | * @since 2018/12/28
15 | */
16 | public class JsonUtil {
17 | public static String toJson(Map map) {
18 | JSONObject jsonObject = new JSONObject();
19 | try {
20 | for (Map.Entry entry : map.entrySet()) {
21 | jsonObject.put(entry.getKey(), entry.getValue());
22 | }
23 | } catch (JSONException e) {
24 | if (BuildConfig.DEBUG)
25 | e.printStackTrace();
26 | }
27 | return jsonObject.toString();
28 | }
29 |
30 | // public static String toJson(AppBean appBean) {
31 | // JSONObject jsonObject = new JSONObject();
32 | // try {
33 | // jsonObject.put("versionName", appBean.getVersionName());
34 | // jsonObject.put("downloadURL", appBean.getDownloadURL());
35 | // jsonObject.put("versionCode", appBean.getVersionCode());
36 | // jsonObject.put("releaseNote", appBean.getReleaseNote());
37 | // jsonObject.put("shouldForceToUpdate", appBean.isShouldForceToUpdate());
38 | // } catch (JSONException e) {
39 | // if (BuildConfig.DEBUG)
40 | // e.printStackTrace();
41 | // }
42 | // return jsonObject.toString();
43 | // }
44 | }
45 |
--------------------------------------------------------------------------------
/android/src/main/java/com/crazecoder/flutter/pgyer/utils/LogUtil.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter.pgyer.utils;
2 |
3 | import android.util.Log;
4 |
5 | import com.crazecoder.flutter.pgyer.BuildConfig;
6 |
7 |
8 | /**
9 | * Note of this class.
10 | *
11 | * @author chendong
12 | * @since 2018/3/20
13 | */
14 | public class LogUtil {
15 | public static void v(String tag, String msg) {
16 | if (BuildConfig.DEBUG)
17 | Log.v(tag, msg);
18 | }
19 |
20 | public static void v(String tag, String msg, Throwable t) {
21 | if (BuildConfig.DEBUG)
22 | Log.v(tag, msg, t);
23 | }
24 |
25 | public static void d(String tag, String msg) {
26 | if (BuildConfig.DEBUG)
27 | Log.d(tag, msg);
28 | }
29 |
30 | public static void d(String tag, String msg, Throwable t) {
31 | if (BuildConfig.DEBUG)
32 | Log.d(tag, msg, t);
33 | }
34 |
35 | public static void i(String tag, String msg) {
36 | if (BuildConfig.DEBUG)
37 | Log.i(tag, msg);
38 | }
39 |
40 | public static void i(String tag, String msg, Throwable t) {
41 | if (BuildConfig.DEBUG)
42 | Log.i(tag, msg, t);
43 | }
44 |
45 | public static void w(String tag, String msg) {
46 | if (BuildConfig.DEBUG)
47 | Log.w(tag, msg);
48 | }
49 |
50 | public static void w(String tag, String msg, Throwable t) {
51 | if (BuildConfig.DEBUG)
52 | Log.w(tag, msg, t);
53 | }
54 |
55 | public static void e(String tag, String msg) {
56 | if (BuildConfig.DEBUG)
57 | Log.e(tag, msg);
58 | }
59 |
60 | public static void e(String tag, String msg, Throwable t) {
61 | if (BuildConfig.DEBUG)
62 | Log.e(tag, msg, t);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/android/src/main/java/com/crazecoder/flutter/pgyer/utils/MapUtil.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter.pgyer.utils;
2 |
3 |
4 | import java.lang.reflect.Field;
5 | import java.lang.reflect.Modifier;
6 | import java.util.Arrays;
7 | import java.util.Collections;
8 | import java.util.HashSet;
9 | import java.util.LinkedHashMap;
10 | import java.util.Map;
11 | import java.util.Set;
12 |
13 | public class MapUtil {
14 |
15 | public static Map deepToMap(Object bean) {
16 | Map map = new LinkedHashMap<>();
17 | try {
18 | putValues(bean, map, null);
19 | } catch (IllegalAccessException x) {
20 | throw new IllegalArgumentException(x);
21 | }
22 | return map;
23 | }
24 |
25 | private static void putValues(Object bean,
26 | Map map,
27 | String prefix)
28 | throws IllegalAccessException {
29 | if (bean == null) return;
30 | Class> cls = bean.getClass();
31 |
32 | for (Field field : cls.getDeclaredFields()) {
33 | if (field.isSynthetic() || Modifier.isStatic(field.getModifiers()))
34 | continue;
35 | field.setAccessible(true);
36 |
37 | Object value = field.get(bean);
38 | String key;
39 | if (prefix == null) {
40 | key = field.getName();
41 | } else {
42 | key = prefix + "." + field.getName();
43 | }
44 |
45 | if (isValue(value)) {
46 | map.put(key, value);
47 | } else {
48 | putValues(value, map, key);
49 | }
50 | }
51 | }
52 |
53 | private static final Set> VALUE_CLASSES =
54 | Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
55 | Object.class, String.class, Boolean.class,
56 | Character.class, Byte.class, Short.class,
57 | Integer.class, Long.class, Float.class,
58 | Double.class
59 | // etc.
60 | )));
61 |
62 | private static boolean isValue(Object value) {
63 | return value == null
64 | || value instanceof Enum>
65 | || VALUE_CLASSES.contains(value.getClass());
66 | }
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # Visual Studio Code related
19 | .vscode/
20 |
21 | # Flutter/Dart/Pub related
22 | **/doc/api/
23 | .dart_tool/
24 | .flutter-plugins
25 | .packages
26 | .pub-cache/
27 | .pub/
28 | /build/
29 |
30 | # Android related
31 | **/android/**/gradle-wrapper.jar
32 | **/android/.gradle
33 | **/android/captures/
34 | **/android/gradlew
35 | **/android/gradlew.bat
36 | **/android/local.properties
37 | **/android/**/GeneratedPluginRegistrant.java
38 |
39 | # iOS/XCode related
40 | **/ios/**/*.mode1v3
41 | **/ios/**/*.mode2v3
42 | **/ios/**/*.moved-aside
43 | **/ios/**/*.pbxuser
44 | **/ios/**/*.perspectivev3
45 | **/ios/**/*sync/
46 | **/ios/**/.sconsign.dblite
47 | **/ios/**/.tags*
48 | **/ios/**/.vagrant/
49 | **/ios/**/DerivedData/
50 | **/ios/**/Icon?
51 | **/ios/**/Pods/
52 | **/ios/**/.symlinks/
53 | **/ios/**/profile
54 | **/ios/**/xcuserdata
55 | **/ios/.generated/
56 | **/ios/Flutter/App.framework
57 | **/ios/Flutter/Flutter.framework
58 | **/ios/Flutter/Generated.xcconfig
59 | **/ios/Flutter/app.flx
60 | **/ios/Flutter/app.zip
61 | **/ios/Flutter/flutter_assets/
62 | **/ios/ServiceDefinitions.json
63 | **/ios/Runner/GeneratedPluginRegistrant.*
64 |
65 | # Exceptions to above rules.
66 | !**/ios/**/default.mode1v3
67 | !**/ios/**/default.mode2v3
68 | !**/ios/**/default.pbxuser
69 | !**/ios/**/default.perspectivev3
70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
71 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_pgyer_example
2 |
3 | Demonstrates how to use the flutter_pgyer plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 29
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.crazecoder.flutter_pgyer_example"
37 | minSdkVersion 19
38 | targetSdkVersion 29
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'androidx.test.ext:junit:1.1.2'
60 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
61 | }
62 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
12 |
19 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/crazecoder/flutter_pgyer_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.crazecoder.flutter_pgyer_example;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:4.0.2'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Nov 19 20:49:14 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37 | # referring to absolute paths on developers' machines.
38 | system('rm -rf .symlinks')
39 | system('mkdir -p .symlinks/plugins')
40 |
41 | # Flutter Pods
42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43 | if generated_xcode_build_settings.empty?
44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45 | end
46 | generated_xcode_build_settings.map { |p|
47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48 | symlink = File.join('.symlinks', 'flutter')
49 | File.symlink(File.dirname(p[:path]), symlink)
50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
51 | end
52 | }
53 |
54 | # Plugin Pods
55 | plugin_pods = parse_KV_file('../.flutter-plugins')
56 | plugin_pods.map { |p|
57 | symlink = File.join('.symlinks', 'plugins', p[:name])
58 | File.symlink(p[:path], symlink)
59 | pod p[:name], :path => File.join(symlink, 'ios')
60 | }
61 | pod 'Pgyer'
62 | pod 'PgyUpdate'
63 | end
64 |
65 | post_install do |installer|
66 | installer.pods_project.targets.each do |target|
67 | target.build_configurations.each do |config|
68 | config.build_settings['ENABLE_BITCODE'] = 'NO'
69 | end
70 | end
71 | end
72 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - flutter_pgyer (0.0.1):
4 | - Flutter
5 | - Pgyer
6 | - PgyUpdate
7 | - Pgyer (2.8.9)
8 | - PgyUpdate (1.6)
9 |
10 | DEPENDENCIES:
11 | - Flutter (from `.symlinks/flutter/ios`)
12 | - flutter_pgyer (from `.symlinks/plugins/flutter_pgyer/ios`)
13 | - Pgyer
14 | - PgyUpdate
15 |
16 | SPEC REPOS:
17 | https://github.com/cocoapods/specs.git:
18 | - Pgyer
19 | - PgyUpdate
20 |
21 | EXTERNAL SOURCES:
22 | Flutter:
23 | :path: ".symlinks/flutter/ios"
24 | flutter_pgyer:
25 | :path: ".symlinks/plugins/flutter_pgyer/ios"
26 |
27 | SPEC CHECKSUMS:
28 | Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
29 | flutter_pgyer: 10c26830f98199f279b8778bef93be238d874dee
30 | Pgyer: 830654e51e23f754cce5d8b3ea9ba72be68452eb
31 | PgyUpdate: cd6c2ada5928f36a9f904d8f96a9b3b53e190755
32 |
33 | PODFILE CHECKSUM: 1d0c20f64561434de91481646d52dbff3e79dc21
34 |
35 | COCOAPODS: 1.7.1
36 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
22 | BBA634FE7C707389F3E30C23 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EF2A64F5A4E673FFED4F625 /* libPods-Runner.a */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXCopyFilesBuildPhase section */
26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
27 | isa = PBXCopyFilesBuildPhase;
28 | buildActionMask = 2147483647;
29 | dstPath = "";
30 | dstSubfolderSpec = 10;
31 | files = (
32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
34 | );
35 | name = "Embed Frameworks";
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXCopyFilesBuildPhase section */
39 |
40 | /* Begin PBXFileReference section */
41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
43 | 2EF2A64F5A4E673FFED4F625 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
46 | 536D2093D58C111E09879462 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
59 | CB4D6DC30F1ED23D78046B82 /* 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 = ""; };
60 | E5F8DD25A462EB41AE8E5082 /* 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 = ""; };
61 | /* End PBXFileReference section */
62 |
63 | /* Begin PBXFrameworksBuildPhase section */
64 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
65 | isa = PBXFrameworksBuildPhase;
66 | buildActionMask = 2147483647;
67 | files = (
68 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
69 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
70 | BBA634FE7C707389F3E30C23 /* libPods-Runner.a in Frameworks */,
71 | );
72 | runOnlyForDeploymentPostprocessing = 0;
73 | };
74 | /* End PBXFrameworksBuildPhase section */
75 |
76 | /* Begin PBXGroup section */
77 | 55CAD9AF5D28F5DAD49145E0 /* Pods */ = {
78 | isa = PBXGroup;
79 | children = (
80 | E5F8DD25A462EB41AE8E5082 /* Pods-Runner.debug.xcconfig */,
81 | CB4D6DC30F1ED23D78046B82 /* Pods-Runner.release.xcconfig */,
82 | 536D2093D58C111E09879462 /* Pods-Runner.profile.xcconfig */,
83 | );
84 | name = Pods;
85 | path = Pods;
86 | sourceTree = "";
87 | };
88 | 9740EEB11CF90186004384FC /* Flutter */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 3B80C3931E831B6300D905FE /* App.framework */,
92 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
93 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
94 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
95 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
96 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
97 | );
98 | name = Flutter;
99 | sourceTree = "";
100 | };
101 | 97C146E51CF9000F007C117D = {
102 | isa = PBXGroup;
103 | children = (
104 | 9740EEB11CF90186004384FC /* Flutter */,
105 | 97C146F01CF9000F007C117D /* Runner */,
106 | 97C146EF1CF9000F007C117D /* Products */,
107 | 55CAD9AF5D28F5DAD49145E0 /* Pods */,
108 | B47EE3B2AC3CCF5293193C41 /* Frameworks */,
109 | );
110 | sourceTree = "";
111 | };
112 | 97C146EF1CF9000F007C117D /* Products */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 97C146EE1CF9000F007C117D /* Runner.app */,
116 | );
117 | name = Products;
118 | sourceTree = "";
119 | };
120 | 97C146F01CF9000F007C117D /* Runner */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
124 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
125 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
126 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
127 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
128 | 97C147021CF9000F007C117D /* Info.plist */,
129 | 97C146F11CF9000F007C117D /* Supporting Files */,
130 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
131 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
132 | );
133 | path = Runner;
134 | sourceTree = "";
135 | };
136 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 97C146F21CF9000F007C117D /* main.m */,
140 | );
141 | name = "Supporting Files";
142 | sourceTree = "";
143 | };
144 | B47EE3B2AC3CCF5293193C41 /* Frameworks */ = {
145 | isa = PBXGroup;
146 | children = (
147 | 2EF2A64F5A4E673FFED4F625 /* libPods-Runner.a */,
148 | );
149 | name = Frameworks;
150 | sourceTree = "";
151 | };
152 | /* End PBXGroup section */
153 |
154 | /* Begin PBXNativeTarget section */
155 | 97C146ED1CF9000F007C117D /* Runner */ = {
156 | isa = PBXNativeTarget;
157 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
158 | buildPhases = (
159 | 7AA2DD5936F56FF7D817169D /* [CP] Check Pods Manifest.lock */,
160 | 9740EEB61CF901F6004384FC /* Run Script */,
161 | 97C146EA1CF9000F007C117D /* Sources */,
162 | 97C146EB1CF9000F007C117D /* Frameworks */,
163 | 97C146EC1CF9000F007C117D /* Resources */,
164 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
165 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
166 | F42830356BF389596687DB31 /* [CP] Embed Pods Frameworks */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | );
172 | name = Runner;
173 | productName = Runner;
174 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
175 | productType = "com.apple.product-type.application";
176 | };
177 | /* End PBXNativeTarget section */
178 |
179 | /* Begin PBXProject section */
180 | 97C146E61CF9000F007C117D /* Project object */ = {
181 | isa = PBXProject;
182 | attributes = {
183 | LastUpgradeCheck = 0910;
184 | ORGANIZATIONNAME = "The Chromium Authors";
185 | TargetAttributes = {
186 | 97C146ED1CF9000F007C117D = {
187 | CreatedOnToolsVersion = 7.3.1;
188 | };
189 | };
190 | };
191 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
192 | compatibilityVersion = "Xcode 3.2";
193 | developmentRegion = English;
194 | hasScannedForEncodings = 0;
195 | knownRegions = (
196 | en,
197 | Base,
198 | );
199 | mainGroup = 97C146E51CF9000F007C117D;
200 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
201 | projectDirPath = "";
202 | projectRoot = "";
203 | targets = (
204 | 97C146ED1CF9000F007C117D /* Runner */,
205 | );
206 | };
207 | /* End PBXProject section */
208 |
209 | /* Begin PBXResourcesBuildPhase section */
210 | 97C146EC1CF9000F007C117D /* Resources */ = {
211 | isa = PBXResourcesBuildPhase;
212 | buildActionMask = 2147483647;
213 | files = (
214 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
215 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
216 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
217 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXResourcesBuildPhase section */
223 |
224 | /* Begin PBXShellScriptBuildPhase section */
225 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
226 | isa = PBXShellScriptBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | );
230 | inputPaths = (
231 | );
232 | name = "Thin Binary";
233 | outputPaths = (
234 | );
235 | runOnlyForDeploymentPostprocessing = 0;
236 | shellPath = /bin/sh;
237 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
238 | };
239 | 7AA2DD5936F56FF7D817169D /* [CP] Check Pods Manifest.lock */ = {
240 | isa = PBXShellScriptBuildPhase;
241 | buildActionMask = 2147483647;
242 | files = (
243 | );
244 | inputFileListPaths = (
245 | );
246 | inputPaths = (
247 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
248 | "${PODS_ROOT}/Manifest.lock",
249 | );
250 | name = "[CP] Check Pods Manifest.lock";
251 | outputFileListPaths = (
252 | );
253 | outputPaths = (
254 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
255 | );
256 | runOnlyForDeploymentPostprocessing = 0;
257 | shellPath = /bin/sh;
258 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
259 | showEnvVarsInLog = 0;
260 | };
261 | 9740EEB61CF901F6004384FC /* Run Script */ = {
262 | isa = PBXShellScriptBuildPhase;
263 | buildActionMask = 2147483647;
264 | files = (
265 | );
266 | inputPaths = (
267 | );
268 | name = "Run Script";
269 | outputPaths = (
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | shellPath = /bin/sh;
273 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
274 | };
275 | F42830356BF389596687DB31 /* [CP] Embed Pods Frameworks */ = {
276 | isa = PBXShellScriptBuildPhase;
277 | buildActionMask = 2147483647;
278 | files = (
279 | );
280 | inputPaths = (
281 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
282 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
283 | );
284 | name = "[CP] Embed Pods Frameworks";
285 | outputPaths = (
286 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
287 | );
288 | runOnlyForDeploymentPostprocessing = 0;
289 | shellPath = /bin/sh;
290 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
291 | showEnvVarsInLog = 0;
292 | };
293 | /* End PBXShellScriptBuildPhase section */
294 |
295 | /* Begin PBXSourcesBuildPhase section */
296 | 97C146EA1CF9000F007C117D /* Sources */ = {
297 | isa = PBXSourcesBuildPhase;
298 | buildActionMask = 2147483647;
299 | files = (
300 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
301 | 97C146F31CF9000F007C117D /* main.m in Sources */,
302 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | };
306 | /* End PBXSourcesBuildPhase section */
307 |
308 | /* Begin PBXVariantGroup section */
309 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
310 | isa = PBXVariantGroup;
311 | children = (
312 | 97C146FB1CF9000F007C117D /* Base */,
313 | );
314 | name = Main.storyboard;
315 | sourceTree = "";
316 | };
317 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
318 | isa = PBXVariantGroup;
319 | children = (
320 | 97C147001CF9000F007C117D /* Base */,
321 | );
322 | name = LaunchScreen.storyboard;
323 | sourceTree = "";
324 | };
325 | /* End PBXVariantGroup section */
326 |
327 | /* Begin XCBuildConfiguration section */
328 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
329 | isa = XCBuildConfiguration;
330 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
331 | buildSettings = {
332 | ALWAYS_SEARCH_USER_PATHS = NO;
333 | CLANG_ANALYZER_NONNULL = YES;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
339 | CLANG_WARN_BOOL_CONVERSION = YES;
340 | CLANG_WARN_COMMA = YES;
341 | CLANG_WARN_CONSTANT_CONVERSION = YES;
342 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
343 | CLANG_WARN_EMPTY_BODY = YES;
344 | CLANG_WARN_ENUM_CONVERSION = YES;
345 | CLANG_WARN_INFINITE_RECURSION = YES;
346 | CLANG_WARN_INT_CONVERSION = YES;
347 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
351 | CLANG_WARN_STRICT_PROTOTYPES = YES;
352 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
353 | CLANG_WARN_UNREACHABLE_CODE = YES;
354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
355 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
356 | COPY_PHASE_STRIP = NO;
357 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
358 | ENABLE_NS_ASSERTIONS = NO;
359 | ENABLE_STRICT_OBJC_MSGSEND = YES;
360 | GCC_C_LANGUAGE_STANDARD = gnu99;
361 | GCC_NO_COMMON_BLOCKS = YES;
362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
364 | GCC_WARN_UNDECLARED_SELECTOR = YES;
365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
366 | GCC_WARN_UNUSED_FUNCTION = YES;
367 | GCC_WARN_UNUSED_VARIABLE = YES;
368 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
369 | MTL_ENABLE_DEBUG_INFO = NO;
370 | SDKROOT = iphoneos;
371 | TARGETED_DEVICE_FAMILY = "1,2";
372 | VALIDATE_PRODUCT = YES;
373 | };
374 | name = Profile;
375 | };
376 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
377 | isa = XCBuildConfiguration;
378 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
379 | buildSettings = {
380 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
381 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
382 | DEVELOPMENT_TEAM = S8QB4VV633;
383 | ENABLE_BITCODE = NO;
384 | FRAMEWORK_SEARCH_PATHS = (
385 | "$(inherited)",
386 | "$(PROJECT_DIR)/Flutter",
387 | );
388 | INFOPLIST_FILE = Runner/Info.plist;
389 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
390 | LIBRARY_SEARCH_PATHS = (
391 | "$(inherited)",
392 | "$(PROJECT_DIR)/Flutter",
393 | );
394 | PRODUCT_BUNDLE_IDENTIFIER = com.crazecoder.flutterPgyerExample;
395 | PRODUCT_NAME = "$(TARGET_NAME)";
396 | VERSIONING_SYSTEM = "apple-generic";
397 | };
398 | name = Profile;
399 | };
400 | 97C147031CF9000F007C117D /* Debug */ = {
401 | isa = XCBuildConfiguration;
402 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
403 | buildSettings = {
404 | ALWAYS_SEARCH_USER_PATHS = NO;
405 | CLANG_ANALYZER_NONNULL = YES;
406 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
407 | CLANG_CXX_LIBRARY = "libc++";
408 | CLANG_ENABLE_MODULES = YES;
409 | CLANG_ENABLE_OBJC_ARC = YES;
410 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
411 | CLANG_WARN_BOOL_CONVERSION = YES;
412 | CLANG_WARN_COMMA = YES;
413 | CLANG_WARN_CONSTANT_CONVERSION = YES;
414 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
415 | CLANG_WARN_EMPTY_BODY = YES;
416 | CLANG_WARN_ENUM_CONVERSION = YES;
417 | CLANG_WARN_INFINITE_RECURSION = YES;
418 | CLANG_WARN_INT_CONVERSION = YES;
419 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
420 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
422 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
423 | CLANG_WARN_STRICT_PROTOTYPES = YES;
424 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
425 | CLANG_WARN_UNREACHABLE_CODE = YES;
426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
427 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
428 | COPY_PHASE_STRIP = NO;
429 | DEBUG_INFORMATION_FORMAT = dwarf;
430 | ENABLE_STRICT_OBJC_MSGSEND = YES;
431 | ENABLE_TESTABILITY = YES;
432 | GCC_C_LANGUAGE_STANDARD = gnu99;
433 | GCC_DYNAMIC_NO_PIC = NO;
434 | GCC_NO_COMMON_BLOCKS = YES;
435 | GCC_OPTIMIZATION_LEVEL = 0;
436 | GCC_PREPROCESSOR_DEFINITIONS = (
437 | "DEBUG=1",
438 | "$(inherited)",
439 | );
440 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
441 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
442 | GCC_WARN_UNDECLARED_SELECTOR = YES;
443 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
444 | GCC_WARN_UNUSED_FUNCTION = YES;
445 | GCC_WARN_UNUSED_VARIABLE = YES;
446 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
447 | MTL_ENABLE_DEBUG_INFO = YES;
448 | ONLY_ACTIVE_ARCH = YES;
449 | SDKROOT = iphoneos;
450 | TARGETED_DEVICE_FAMILY = "1,2";
451 | };
452 | name = Debug;
453 | };
454 | 97C147041CF9000F007C117D /* Release */ = {
455 | isa = XCBuildConfiguration;
456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
457 | buildSettings = {
458 | ALWAYS_SEARCH_USER_PATHS = NO;
459 | CLANG_ANALYZER_NONNULL = YES;
460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
461 | CLANG_CXX_LIBRARY = "libc++";
462 | CLANG_ENABLE_MODULES = YES;
463 | CLANG_ENABLE_OBJC_ARC = YES;
464 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
465 | CLANG_WARN_BOOL_CONVERSION = YES;
466 | CLANG_WARN_COMMA = YES;
467 | CLANG_WARN_CONSTANT_CONVERSION = YES;
468 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
469 | CLANG_WARN_EMPTY_BODY = YES;
470 | CLANG_WARN_ENUM_CONVERSION = YES;
471 | CLANG_WARN_INFINITE_RECURSION = YES;
472 | CLANG_WARN_INT_CONVERSION = YES;
473 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
474 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
475 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
476 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
477 | CLANG_WARN_STRICT_PROTOTYPES = YES;
478 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
479 | CLANG_WARN_UNREACHABLE_CODE = YES;
480 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
481 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
482 | COPY_PHASE_STRIP = NO;
483 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
484 | ENABLE_NS_ASSERTIONS = NO;
485 | ENABLE_STRICT_OBJC_MSGSEND = YES;
486 | GCC_C_LANGUAGE_STANDARD = gnu99;
487 | GCC_NO_COMMON_BLOCKS = YES;
488 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
489 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
490 | GCC_WARN_UNDECLARED_SELECTOR = YES;
491 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
492 | GCC_WARN_UNUSED_FUNCTION = YES;
493 | GCC_WARN_UNUSED_VARIABLE = YES;
494 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
495 | MTL_ENABLE_DEBUG_INFO = NO;
496 | SDKROOT = iphoneos;
497 | TARGETED_DEVICE_FAMILY = "1,2";
498 | VALIDATE_PRODUCT = YES;
499 | };
500 | name = Release;
501 | };
502 | 97C147061CF9000F007C117D /* Debug */ = {
503 | isa = XCBuildConfiguration;
504 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
505 | buildSettings = {
506 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
507 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
508 | ENABLE_BITCODE = NO;
509 | FRAMEWORK_SEARCH_PATHS = (
510 | "$(inherited)",
511 | "$(PROJECT_DIR)/Flutter",
512 | );
513 | INFOPLIST_FILE = Runner/Info.plist;
514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
515 | LIBRARY_SEARCH_PATHS = (
516 | "$(inherited)",
517 | "$(PROJECT_DIR)/Flutter",
518 | );
519 | PRODUCT_BUNDLE_IDENTIFIER = com.crazecoder.flutterPgyerExample;
520 | PRODUCT_NAME = "$(TARGET_NAME)";
521 | VERSIONING_SYSTEM = "apple-generic";
522 | };
523 | name = Debug;
524 | };
525 | 97C147071CF9000F007C117D /* Release */ = {
526 | isa = XCBuildConfiguration;
527 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
528 | buildSettings = {
529 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
530 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
531 | ENABLE_BITCODE = NO;
532 | FRAMEWORK_SEARCH_PATHS = (
533 | "$(inherited)",
534 | "$(PROJECT_DIR)/Flutter",
535 | );
536 | INFOPLIST_FILE = Runner/Info.plist;
537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
538 | LIBRARY_SEARCH_PATHS = (
539 | "$(inherited)",
540 | "$(PROJECT_DIR)/Flutter",
541 | );
542 | PRODUCT_BUNDLE_IDENTIFIER = com.crazecoder.flutterPgyerExample;
543 | PRODUCT_NAME = "$(TARGET_NAME)";
544 | VERSIONING_SYSTEM = "apple-generic";
545 | };
546 | name = Release;
547 | };
548 | /* End XCBuildConfiguration section */
549 |
550 | /* Begin XCConfigurationList section */
551 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
552 | isa = XCConfigurationList;
553 | buildConfigurations = (
554 | 97C147031CF9000F007C117D /* Debug */,
555 | 97C147041CF9000F007C117D /* Release */,
556 | 249021D3217E4FDB00AE95B9 /* Profile */,
557 | );
558 | defaultConfigurationIsVisible = 0;
559 | defaultConfigurationName = Release;
560 | };
561 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
562 | isa = XCConfigurationList;
563 | buildConfigurations = (
564 | 97C147061CF9000F007C117D /* Debug */,
565 | 97C147071CF9000F007C117D /* Release */,
566 | 249021D4217E4FDB00AE95B9 /* Profile */,
567 | );
568 | defaultConfigurationIsVisible = 0;
569 | defaultConfigurationName = Release;
570 | };
571 | /* End XCConfigurationList section */
572 | };
573 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
574 | }
575 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_pgyer_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:async';
3 |
4 | import 'package:flutter_pgyer/flutter_pgyer.dart';
5 | import 'package:permission_handler/permission_handler.dart';
6 |
7 | void main() => FlutterPgyer.reportException(() => runApp(MyApp()));
8 |
9 | class MyApp extends StatefulWidget {
10 | @override
11 | _MyAppState createState() => _MyAppState();
12 | }
13 |
14 | class _MyAppState extends State {
15 | String _platformVersion = 'Unknown';
16 |
17 | @override
18 | void initState() {
19 | super.initState();
20 | Permission.phone.request().then((value) => initPlatformState());
21 | }
22 |
23 | // Platform messages are asynchronous, so we initialize in an async method.
24 | Future initPlatformState() async {
25 | if (!mounted) return;
26 | // Platform messages may fail, so we use a try/catch PlatformException.
27 | FlutterPgyer.init(
28 | iOSAppId: "09134f7da29170173fb0e842a4a17f7d",
29 | androidApiKey: "0a7a3c64217418800cf254ebd1839187",
30 | frontJSToken: "44f5a0de2ec979b186c13723e1c3eb6d",
31 | callBack: (result) {
32 | setState(() {
33 | _platformVersion = result.message;
34 | });
35 | });
36 | FlutterPgyer.setEnableFeedback(
37 | param: {"test": "dddddd", "test1": "dddddd1"});
38 | FlutterPgyer.checkUpdate();
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return MaterialApp(
44 | home: Scaffold(
45 | appBar: AppBar(
46 | title: const Text('Plugin example app'),
47 | ),
48 | body: Center(
49 | child: GestureDetector(
50 | child: Text('初始化: $_platformVersion\n'),
51 | onTap: () {
52 | throw FlutterError("message");
53 | },
54 | ),
55 | ),
56 | ),
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.flutter-io.cn"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.flutter-io.cn"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.flutter-io.cn"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.flutter-io.cn"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.flutter-io.cn"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.flutter-io.cn"
44 | source: hosted
45 | version: "1.15.0"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.flutter-io.cn"
51 | source: hosted
52 | version: "0.1.3"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.flutter-io.cn"
58 | source: hosted
59 | version: "1.2.0"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_pgyer:
66 | dependency: "direct dev"
67 | description:
68 | path: ".."
69 | relative: true
70 | source: path
71 | version: "2.0.2"
72 | flutter_test:
73 | dependency: "direct dev"
74 | description: flutter
75 | source: sdk
76 | version: "0.0.0"
77 | matcher:
78 | dependency: transitive
79 | description:
80 | name: matcher
81 | url: "https://pub.flutter-io.cn"
82 | source: hosted
83 | version: "0.12.10"
84 | meta:
85 | dependency: transitive
86 | description:
87 | name: meta
88 | url: "https://pub.flutter-io.cn"
89 | source: hosted
90 | version: "1.3.0"
91 | path:
92 | dependency: transitive
93 | description:
94 | name: path
95 | url: "https://pub.flutter-io.cn"
96 | source: hosted
97 | version: "1.8.0"
98 | permission_handler:
99 | dependency: "direct main"
100 | description:
101 | name: permission_handler
102 | url: "https://pub.flutter-io.cn"
103 | source: hosted
104 | version: "5.0.1+1"
105 | permission_handler_platform_interface:
106 | dependency: transitive
107 | description:
108 | name: permission_handler_platform_interface
109 | url: "https://pub.flutter-io.cn"
110 | source: hosted
111 | version: "2.0.1"
112 | plugin_platform_interface:
113 | dependency: transitive
114 | description:
115 | name: plugin_platform_interface
116 | url: "https://pub.flutter-io.cn"
117 | source: hosted
118 | version: "1.0.3"
119 | sky_engine:
120 | dependency: transitive
121 | description: flutter
122 | source: sdk
123 | version: "0.0.99"
124 | source_span:
125 | dependency: transitive
126 | description:
127 | name: source_span
128 | url: "https://pub.flutter-io.cn"
129 | source: hosted
130 | version: "1.8.0"
131 | stack_trace:
132 | dependency: transitive
133 | description:
134 | name: stack_trace
135 | url: "https://pub.flutter-io.cn"
136 | source: hosted
137 | version: "1.10.0"
138 | stream_channel:
139 | dependency: transitive
140 | description:
141 | name: stream_channel
142 | url: "https://pub.flutter-io.cn"
143 | source: hosted
144 | version: "2.1.0"
145 | string_scanner:
146 | dependency: transitive
147 | description:
148 | name: string_scanner
149 | url: "https://pub.flutter-io.cn"
150 | source: hosted
151 | version: "1.1.0"
152 | term_glyph:
153 | dependency: transitive
154 | description:
155 | name: term_glyph
156 | url: "https://pub.flutter-io.cn"
157 | source: hosted
158 | version: "1.2.0"
159 | test_api:
160 | dependency: transitive
161 | description:
162 | name: test_api
163 | url: "https://pub.flutter-io.cn"
164 | source: hosted
165 | version: "0.2.19"
166 | typed_data:
167 | dependency: transitive
168 | description:
169 | name: typed_data
170 | url: "https://pub.flutter-io.cn"
171 | source: hosted
172 | version: "1.3.0"
173 | vector_math:
174 | dependency: transitive
175 | description:
176 | name: vector_math
177 | url: "https://pub.flutter-io.cn"
178 | source: hosted
179 | version: "2.1.0"
180 | sdks:
181 | dart: ">=2.12.0-0.0 <3.0.0"
182 | flutter: ">=1.12.8"
183 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_pgyer_example
2 | description: Demonstrates how to use the flutter_pgyer plugin.
3 | publish_to: 'none'
4 |
5 | version: 1.0.0+1
6 |
7 | environment:
8 | sdk: ">=2.0.0-dev.68.0 <3.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | # The following adds the Cupertino Icons font to your application.
15 | # Use with the CupertinoIcons class for iOS style icons.
16 | cupertino_icons: ^0.1.3
17 | permission_handler: ^5.0.1+1
18 |
19 |
20 | dev_dependencies:
21 | flutter_test:
22 | sdk: flutter
23 |
24 | flutter_pgyer:
25 | path: ../
26 |
27 | # For information on the generic Dart part of this file, see the
28 | # following page: https://www.dartlang.org/tools/pub/pubspec
29 |
30 | # The following section is specific to Flutter.
31 | flutter:
32 |
33 | # The following line ensures that the Material Icons font is
34 | # included with your application, so that you can use the icons in
35 | # the material Icons class.
36 | uses-material-design: true
37 |
38 | # To add assets to your application, add an assets section, like this:
39 | # assets:
40 | # - images/a_dot_burr.jpeg
41 | # - images/a_dot_ham.jpeg
42 |
43 | # An image asset can refer to one or more resolution-specific "variants", see
44 | # https://flutter.dev/assets-and-images/#resolution-aware.
45 |
46 | # For details regarding adding assets from package dependencies, see
47 | # https://flutter.dev/assets-and-images/#from-packages
48 |
49 | # To add custom fonts to your application, add a fonts section here,
50 | # in this "flutter" section. Each entry in this list should have a
51 | # "family" key with the font family name, and a "fonts" key with a
52 | # list giving the asset and other descriptors for the font. For
53 | # example:
54 | # fonts:
55 | # - family: Schyler
56 | # fonts:
57 | # - asset: fonts/Schyler-Regular.ttf
58 | # - asset: fonts/Schyler-Italic.ttf
59 | # style: italic
60 | # - family: Trajan Pro
61 | # fonts:
62 | # - asset: fonts/TrajanPro.ttf
63 | # - asset: fonts/TrajanPro_Bold.ttf
64 | # weight: 700
65 | #
66 | # For details regarding fonts from package dependencies,
67 | # see https://flutter.dev/custom-fonts/#from-packages
68 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | //// This is a basic Flutter widget test.
2 | ////
3 | //// To perform an interaction with a widget in your test, use the WidgetTester
4 | //// utility that Flutter provides. For example, you can send tap and scroll
5 | //// gestures. You can also use WidgetTester to find child widgets in the widget
6 | //// tree, read text, and verify that the values of widget properties are correct.
7 | //
8 | //import 'package:flutter/material.dart';
9 | //import 'package:flutter_test/flutter_test.dart';
10 | //
11 | ////import 'package:flutter_pgyer_example/main.dart';
12 | //
13 | //void main() {
14 | // testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // // Build our app and trigger a frame.
16 | // await tester.pumpWidget(MyApp());
17 | //
18 | // // Verify that platform version is retrieved.
19 | // expect(
20 | // find.byWidgetPredicate(
21 | // (Widget widget) => widget is Text &&
22 | // widget.data.startsWith('Running on:'),
23 | // ),
24 | // findsOneWidget,
25 | // );
26 | // });
27 | //}
28 |
--------------------------------------------------------------------------------
/flutter_pgyer.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crazecoder/flutter_pgyer/cf6aa6c6fcb326aff6252fff657732058be22c4a/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/FlutterPgyerPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface FlutterPgyerPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/FlutterPgyerPlugin.m:
--------------------------------------------------------------------------------
1 | #import "FlutterPgyerPlugin.h"
2 | #import
3 | #import
4 |
5 | FlutterMethodChannel* channel;
6 | @implementation FlutterPgyerPlugin
7 | + (void)registerWithRegistrar:(NSObject*)registrar {
8 | channel = [FlutterMethodChannel
9 | methodChannelWithName:@"crazecoder/flutter_pgyer"
10 | binaryMessenger:[registrar messenger]];
11 | FlutterPgyerPlugin* instance = [[FlutterPgyerPlugin alloc] init];
12 | [registrar addMethodCallDelegate:instance channel:channel];
13 | }
14 |
15 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
16 | if ([@"initSdk" isEqualToString:call.method]) {
17 | NSString *appId = call.arguments[@"appId"];
18 | BOOL b = [self isBlankString:appId];
19 | if(!b){
20 | //启动基本SDK
21 | [[PgyManager sharedPgyManager] startManagerWithAppId:appId];
22 | //启动更新检查SDK
23 | [[PgyUpdateManager sharedPgyManager] startManagerWithAppId:appId];
24 | NSDictionary * dict = @{@"message":@"初始化成功", @"isSuccess":@YES};
25 | NSData * jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:nil];
26 | NSString * json = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
27 | result(json);
28 | }else{
29 | NSDictionary * dict = @{@"message":@"初始化失败", @"isSuccess":@NO};
30 | NSData * jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:nil];
31 | NSString * json = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
32 | result(json);
33 | }
34 | } else if ([@"reportException" isEqualToString:call.method]) {
35 | NSString *crash_detail = call.arguments[@"crash_detail"];
36 | NSString *crash_message = call.arguments[@"crash_message"];
37 | if ([self isBlankString:crash_detail]) {
38 | crash_message = @"";
39 | }
40 | NSException* ex = [[NSException alloc]initWithName:crash_message
41 | reason:crash_detail
42 | userInfo:nil];
43 | [[PgyManager sharedPgyManager] reportException:ex];
44 | result(nil);
45 | } else if ([@"setEnableFeedback" isEqualToString:call.method]) {
46 | BOOL enable = [call.arguments[@"enable"] boolValue];
47 | BOOL isThreeFingersPan = call.arguments[@"isThreeFingersPan"];
48 | double shakingThreshold = [call.arguments[@"shakingThreshold"] doubleValue];
49 | [[PgyManager sharedPgyManager] setEnableFeedback:enable];
50 | if(enable){
51 | NSString *colorHex = call.arguments[@"colorHex"];
52 | BOOL b = [self isBlankString:colorHex];
53 | if(!b){
54 | UIColor *color = [self hexStringToColor:colorHex];
55 | [[PgyManager sharedPgyManager] setThemeColor:color];
56 | }
57 |
58 | if(isThreeFingersPan){
59 | // 设置用户反馈界面激活方式为三指拖动
60 | [[PgyManager sharedPgyManager] setFeedbackActiveType:kPGYFeedbackActiveTypeThreeFingersPan];
61 | }else{
62 | // 设置用户反馈界面激活方式为摇一摇
63 | [[PgyManager sharedPgyManager] setFeedbackActiveType:kPGYFeedbackActiveTypeShake];
64 | [[PgyManager sharedPgyManager] setShakingThreshold:shakingThreshold];
65 | }
66 | }
67 | result(nil);
68 | } else if ([@"showFeedbackView" isEqualToString:call.method]) {
69 | [[PgyManager sharedPgyManager] showFeedbackView];
70 | result(nil);
71 | } else if ([@"checkSoftwareUpdate" isEqualToString:call.method]) {
72 | BOOL justNotify = [call.arguments[@"justNotify"] boolValue];
73 | if(justNotify){
74 | [[PgyUpdateManager sharedPgyManager] checkUpdate];
75 | }else{
76 | [[PgyUpdateManager sharedPgyManager] checkUpdateWithDelegete:self selector:@selector(checkFinish:)];
77 | }
78 |
79 | result(nil);
80 | } else {
81 | result(FlutterMethodNotImplemented);
82 | }
83 | }
84 |
85 | -(void)checkFinish:(NSNotification *)note{
86 | [channel invokeMethod:@"onCheckUpgrade" arguments:note];
87 | }
88 |
89 | - (BOOL) isBlankString:(NSString *)string {
90 | if (string == nil || string == NULL) {
91 | return YES;
92 | }
93 |
94 | if ([string isKindOfClass:[NSNull class]]) {
95 | return YES;
96 | }
97 | if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
98 | return YES;
99 | }
100 | return NO;
101 |
102 | }
103 | - (UIColor *) hexStringToColor: (NSString *) stringToConvert
104 | {
105 | NSString *cString = [[stringToConvert stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString];
106 | // String should be 6 or 8 characters
107 |
108 | if ([cString length] < 6) return [UIColor blackColor];
109 | // strip 0X if it appears
110 | if ([cString hasPrefix:@"0X"]) cString = [cString substringFromIndex:2];
111 | if ([cString hasPrefix:@"#"]) cString = [cString substringFromIndex:1];
112 | if ([cString length] != 6) return [UIColor blackColor];
113 |
114 | // Separate into r, g, b substrings
115 |
116 | NSRange range;
117 | range.location = 0;
118 | range.length = 2;
119 | NSString *rString = [cString substringWithRange:range];
120 | range.location = 2;
121 | NSString *gString = [cString substringWithRange:range];
122 | range.location = 4;
123 | NSString *bString = [cString substringWithRange:range];
124 | // Scan values
125 | unsigned int r, g, b;
126 |
127 | [[NSScanner scannerWithString:rString] scanHexInt:&r];
128 | [[NSScanner scannerWithString:gString] scanHexInt:&g];
129 | [[NSScanner scannerWithString:bString] scanHexInt:&b];
130 |
131 | return [UIColor colorWithRed:((float) r / 255.0f)
132 | green:((float) g / 255.0f)
133 | blue:((float) b / 255.0f)
134 | alpha:1.0f];
135 | }
136 | @end
137 |
--------------------------------------------------------------------------------
/ios/flutter_pgyer.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'flutter_pgyer'
6 | s.version = '0.0.1'
7 | s.summary = 'A new Flutter project.'
8 | s.description = <<-DESC
9 | A new Flutter project.
10 | DESC
11 | s.homepage = 'http://example.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Your Company' => 'email@example.com' }
14 | s.source = { :path => '.' }
15 | s.static_framework = true
16 | s.source_files = 'Classes/**/*'
17 | s.public_header_files = 'Classes/**/*.h'
18 | s.dependency 'Flutter'
19 | s.dependency 'Pgyer'
20 | s.dependency 'PgyUpdate'
21 |
22 | s.ios.deployment_target = '8.0'
23 | end
24 |
25 |
--------------------------------------------------------------------------------
/lib/flutter_pgyer.dart:
--------------------------------------------------------------------------------
1 | library flutter_pgyer;
2 |
3 | export 'src/flutter_pgyer.dart';
4 | export 'src/bean/result.dart';
5 | export 'src/bean/check_model_base.dart';
6 | export 'src/bean/check_result.dart';
7 | export 'src/bean/ios_check_model.dart';
8 | export 'src/bean/check_soft_model.dart';
9 |
--------------------------------------------------------------------------------
/lib/src/bean/check_model_base.dart:
--------------------------------------------------------------------------------
1 | class CheckModelBase {}
2 |
--------------------------------------------------------------------------------
/lib/src/bean/check_result.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_pgyer/src/bean/check_model_base.dart';
2 |
3 | class CheckResult {
4 | final CheckModelBase? model;
5 | final CheckEnum? checkEnum;
6 |
7 | CheckResult({this.model, this.checkEnum});
8 | // CheckResult.fromJson(Map json) {
9 | // model = CheckSoftModel.fromJson(json["model"]);
10 | // checkEnum = CheckEnum.values[json["enum"]];
11 | // }
12 | }
13 |
14 | enum CheckEnum { SUCCESS, FAIL, NO_VERSION }
15 |
--------------------------------------------------------------------------------
/lib/src/bean/check_soft_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter_pgyer/src/bean/check_model_base.dart';
4 |
5 | class CheckSoftModel extends CheckModelBase {
6 | int? buildBuildVersion;
7 | String? forceUpdateVersion;
8 | String? forceUpdateVersionNo;
9 | bool? needForceUpdate;
10 | bool? buildHaveNewVersion;
11 | String? downloadURL;
12 | String? buildVersionNo;
13 | String? buildVersion;
14 | String? buildShortcutUrl;
15 | String? buildUpdateDescription;
16 |
17 | CheckSoftModel.fromJson(String jsonStr) {
18 | Map resultMap = json.decode(jsonStr);
19 | buildBuildVersion = resultMap['buildBuildVersion'];
20 | forceUpdateVersion = resultMap['forceUpdateVersion'];
21 | forceUpdateVersionNo = resultMap['forceUpdateVersionNo'];
22 | needForceUpdate = resultMap['needForceUpdate'];
23 | buildHaveNewVersion = resultMap['buildHaveNewVersion'];
24 | downloadURL = resultMap['downloadURL'];
25 | buildVersionNo = resultMap['buildVersionNo'];
26 | buildShortcutUrl = resultMap['buildShortcutUrl'];
27 | buildUpdateDescription = resultMap['buildUpdateDescription'];
28 | buildVersion = resultMap['buildVersion'];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/bean/ios_check_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_pgyer/src/bean/check_model_base.dart';
2 |
3 | class IOSCheckModel extends CheckModelBase {
4 | String? build;
5 | String? appUrl;
6 | String? lastBuild;
7 | String? forceUpdateVersion;
8 | bool? needForceUpdate;
9 | bool? haveNewVersion;
10 | bool? updateDeny;
11 | String? version;
12 | String? forceUpdateVersionNo;
13 | String? releaseNote;
14 | String? downloadURL;
15 |
16 | IOSCheckModel.fromJson(json) {
17 | build = json['build'];
18 | forceUpdateVersion = json['forceUpdateVersion'];
19 | forceUpdateVersionNo = json['forceUpdateVersionNo'];
20 | needForceUpdate = json['needForceUpdate'];
21 | appUrl = json['appUrl'];
22 | downloadURL = json['downloadURL'];
23 | lastBuild = json['lastBuild'];
24 | releaseNote = json['releaseNote'];
25 | haveNewVersion = json['haveNewVersion'];
26 | version = json['version'];
27 | updateDeny = json['updateDeny'];
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/bean/result.dart:
--------------------------------------------------------------------------------
1 | class InitResultInfo {
2 | String? message = "";
3 | bool? isSuccess = false;
4 |
5 | InitResultInfo();
6 |
7 | InitResultInfo.fromJson(Map json)
8 | : message = json['message'],
9 | isSuccess = json['isSuccess'];
10 | }
11 |
--------------------------------------------------------------------------------
/lib/src/flutter_pgyer.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:convert';
3 | import 'dart:io';
4 | import 'dart:isolate';
5 |
6 | import 'package:flutter/foundation.dart';
7 | import 'package:flutter/services.dart';
8 | import 'package:flutter/widgets.dart';
9 | import 'package:flutter_pgyer/src/bean/check_result.dart';
10 | import 'package:flutter_pgyer/src/bean/check_soft_model.dart';
11 | import 'package:flutter_pgyer/src/bean/ios_check_model.dart';
12 | import 'package:flutter_pgyer/src/bean/result.dart';
13 |
14 | typedef FlutterPgyerInitCallBack = Function(InitResultInfo);
15 |
16 | class FlutterPgyer {
17 | static const MethodChannel _channel =
18 | const MethodChannel('crazecoder/flutter_pgyer');
19 | static final _onCheckUpgrade = StreamController.broadcast();
20 |
21 | FlutterPgyer._();
22 |
23 | static Future _handleMessages(MethodCall call) async {
24 | switch (call.method) {
25 | case 'onCheckUpgrade':
26 | CheckResult _result = CheckResult(
27 | model: call.arguments == null ||
28 | (Platform.isAndroid && call.arguments["model"] == null)
29 | ? null
30 | : Platform.isIOS
31 | ? IOSCheckModel.fromJson(call.arguments)
32 | : CheckSoftModel.fromJson(call.arguments["model"]),
33 | checkEnum: Platform.isIOS
34 | ? call.arguments == null
35 | ? CheckEnum.NO_VERSION
36 | : CheckEnum.SUCCESS
37 | : CheckEnum.values[call.arguments["enum"]],
38 | );
39 | _onCheckUpgrade.add(_result);
40 | break;
41 | }
42 | }
43 |
44 | static Stream get onCheckUpgrade => _onCheckUpgrade.stream;
45 |
46 | static void init({
47 | FlutterPgyerInitCallBack? callBack,
48 | String? androidApiKey,
49 | String? frontJSToken,
50 | String? iOSAppKey,
51 | }) {
52 | assert(
53 | (Platform.isAndroid && androidApiKey != null && frontJSToken != null) ||
54 | (Platform.isIOS && iOSAppKey != null));
55 | _channel.setMethodCallHandler(_handleMessages);
56 | Map map = {
57 | "apiKey": androidApiKey,
58 | "frontJSToken": frontJSToken,
59 | "appId": iOSAppKey,
60 | };
61 | var resultBean;
62 | Isolate.current.addErrorListener(new RawReceivePort((dynamic pair) {
63 | var isolateError = pair as List;
64 | var _error = isolateError.first;
65 | var _stackTrace = isolateError.last;
66 | Zone.current.handleUncaughtError(_error, _stackTrace);
67 | }).sendPort);
68 | runZonedGuarded(
69 | () async {
70 | final String result =
71 | await (_channel.invokeMethod('initSdk', map) as FutureOr);
72 | Map resultMap = json.decode(result);
73 | resultBean = InitResultInfo.fromJson(resultMap as Map);
74 | callBack!(resultBean);
75 | },
76 | (error, stackTrace) {
77 | resultBean = InitResultInfo();
78 | callBack!(resultBean);
79 | },
80 | );
81 | FlutterError.onError = (details) {
82 | if (details.stack == null) {
83 | FlutterError.presentError(details);
84 | return;
85 | }
86 | Zone.current.handleUncaughtError(details.exception, details.stack!);
87 | };
88 | }
89 |
90 | ///用户反馈 iOS专用
91 | static Future setEnableFeedback({
92 | bool enable = true,
93 | String? colorHex, //反馈界面主题颜色,16进制颜色字符串,如#FFFFFF
94 | bool isDialog = true, // android专用,设置用户反馈为弹窗,false 为activity
95 | Map? param, // android专用,自定义的反馈数据
96 | bool isThreeFingersPan =
97 | false, // ios,设置用户反馈界面激活方式为三指拖动 android,设置true时,不开启摇一摇,需要手动show
98 | double shakingThreshold = 2.3, //ios专用,自定义摇一摇灵敏度,默认为2.3,数值越小灵敏度越高
99 | }) async {
100 | if (Platform.isAndroid) {
101 | return;
102 | }
103 | Map map = {
104 | "enable": enable,
105 | "colorHex": colorHex,
106 | "isDialog": isDialog,
107 | "param": param,
108 | "shakingThreshold": shakingThreshold,
109 | "isThreeFingersPan": isThreeFingersPan,
110 | };
111 | await _channel.invokeMethod('setEnableFeedback', map);
112 | }
113 |
114 | ///手动显示用户反馈界面,需在setEnableFeedback后调用 iOS专用
115 | static Future showFeedbackView() async {
116 | await _channel.invokeMethod('showFeedbackView');
117 | }
118 |
119 | ///检查更新
120 | static Future checkSoftwareUpdate({bool justNotify = true}) async {
121 | Map map = {
122 | "justNotify": justNotify,
123 | };
124 | await _channel.invokeMethod('checkSoftwareUpdate', map);
125 | }
126 |
127 | ///检查更新
128 | static Future checkVersionUpdate() async {
129 | await _channel.invokeMethod('checkVersionUpdate');
130 | }
131 |
132 | ///异常上报,官方设置
133 | ///调试模式下iOS会因为当前为调试模式,所以异常信息将不会被上报至蒲公英。
134 | static void reportException(
135 | T callback(), {
136 | FlutterExceptionHandler? handler, //异常捕捉,用于自定义打印异常
137 | String? filterRegExp, //异常上报过滤正则,针对message
138 | }) {
139 | bool useLog = false;
140 | assert(useLog = true);
141 |
142 | Isolate.current.addErrorListener(RawReceivePort((dynamic pair) async {
143 | var isolateError = pair as List;
144 | var _error = isolateError.first;
145 | var _stackTrace = isolateError.last;
146 | Zone.current.handleUncaughtError(_error, _stackTrace);
147 | }).sendPort);
148 | runZonedGuarded>(() async {
149 | callback();
150 | }, (error, stackTrace) async {
151 | if (useLog || handler != null) {
152 | FlutterErrorDetails details =
153 | FlutterErrorDetails(exception: error, stack: stackTrace);
154 | // In development mode simply print to console.
155 | handler == null
156 | ? FlutterError.dumpErrorToConsole(details)
157 | : handler(details);
158 | }
159 | var errorStr = error.toString();
160 | //异常过滤
161 | if (filterRegExp != null) {
162 | RegExp reg = new RegExp(filterRegExp);
163 | Iterable matches = reg.allMatches(errorStr);
164 | if (matches.length > 0) {
165 | return;
166 | }
167 | }
168 | uploadException(message: errorStr, detail: stackTrace.toString());
169 | });
170 | FlutterError.onError = (FlutterErrorDetails details) async {
171 | Zone.current.handleUncaughtError(details.exception, details.stack!);
172 | };
173 | }
174 |
175 | static Future uploadException({String? message, String? detail}) async {
176 | assert(message != null && detail != null);
177 | var map = {};
178 | map.putIfAbsent("crash_message", () => message);
179 | map.putIfAbsent("crash_detail", () => detail);
180 | await _channel.invokeMethod('reportException', map);
181 | }
182 |
183 | static void dispose() {
184 | _onCheckUpgrade.close();
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.flutter-io.cn"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.flutter-io.cn"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.flutter-io.cn"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.flutter-io.cn"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.flutter-io.cn"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.flutter-io.cn"
44 | source: hosted
45 | version: "1.15.0"
46 | fake_async:
47 | dependency: transitive
48 | description:
49 | name: fake_async
50 | url: "https://pub.flutter-io.cn"
51 | source: hosted
52 | version: "1.2.0"
53 | flutter:
54 | dependency: "direct main"
55 | description: flutter
56 | source: sdk
57 | version: "0.0.0"
58 | flutter_test:
59 | dependency: "direct dev"
60 | description: flutter
61 | source: sdk
62 | version: "0.0.0"
63 | matcher:
64 | dependency: transitive
65 | description:
66 | name: matcher
67 | url: "https://pub.flutter-io.cn"
68 | source: hosted
69 | version: "0.12.10"
70 | meta:
71 | dependency: transitive
72 | description:
73 | name: meta
74 | url: "https://pub.flutter-io.cn"
75 | source: hosted
76 | version: "1.3.0"
77 | path:
78 | dependency: transitive
79 | description:
80 | name: path
81 | url: "https://pub.flutter-io.cn"
82 | source: hosted
83 | version: "1.8.0"
84 | sky_engine:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.99"
89 | source_span:
90 | dependency: transitive
91 | description:
92 | name: source_span
93 | url: "https://pub.flutter-io.cn"
94 | source: hosted
95 | version: "1.8.0"
96 | stack_trace:
97 | dependency: transitive
98 | description:
99 | name: stack_trace
100 | url: "https://pub.flutter-io.cn"
101 | source: hosted
102 | version: "1.10.0"
103 | stream_channel:
104 | dependency: transitive
105 | description:
106 | name: stream_channel
107 | url: "https://pub.flutter-io.cn"
108 | source: hosted
109 | version: "2.1.0"
110 | string_scanner:
111 | dependency: transitive
112 | description:
113 | name: string_scanner
114 | url: "https://pub.flutter-io.cn"
115 | source: hosted
116 | version: "1.1.0"
117 | term_glyph:
118 | dependency: transitive
119 | description:
120 | name: term_glyph
121 | url: "https://pub.flutter-io.cn"
122 | source: hosted
123 | version: "1.2.0"
124 | test_api:
125 | dependency: transitive
126 | description:
127 | name: test_api
128 | url: "https://pub.flutter-io.cn"
129 | source: hosted
130 | version: "0.2.19"
131 | typed_data:
132 | dependency: transitive
133 | description:
134 | name: typed_data
135 | url: "https://pub.flutter-io.cn"
136 | source: hosted
137 | version: "1.3.0"
138 | vector_math:
139 | dependency: transitive
140 | description:
141 | name: vector_math
142 | url: "https://pub.flutter-io.cn"
143 | source: hosted
144 | version: "2.1.0"
145 | sdks:
146 | dart: ">=2.12.0-0.0 <3.0.0"
147 | flutter: ">=1.12.0"
148 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_pgyer
2 | description: pgyer.com for flutter
3 | version: 2.1.2
4 | author: crazecoder <21527312@qq.com>
5 | homepage: https://github.com/crazecoder/flutter_pgyer
6 |
7 | environment:
8 | sdk: '>=2.12.0 <3.0.0'
9 | flutter: ">=1.12.0"
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 |
19 | # For information on the generic Dart part of this file, see the
20 | # following page: https://www.dartlang.org/tools/pub/pubspec
21 |
22 | # The following section is specific to Flutter.
23 | flutter:
24 | # This section identifies this Flutter project as a plugin project.
25 | # The androidPackage and pluginClass identifiers should not ordinarily
26 | # be modified. They are used by the tooling to maintain consistency when
27 | # adding or updating assets for this project.
28 | plugin:
29 | platforms:
30 | android:
31 | package: com.crazecoder.flutter.pgyer
32 | pluginClass: FlutterPgyerPlugin
33 | ios:
34 | pluginClass: FlutterPgyerPlugin
35 |
36 | # To add assets to your plugin package, add an assets section, like this:
37 | # assets:
38 | # - images/a_dot_burr.jpeg
39 | # - images/a_dot_ham.jpeg
40 | #
41 | # For details regarding assets in packages, see
42 | # https://flutter.dev/assets-and-images/#from-packages
43 | #
44 | # An image asset can refer to one or more resolution-specific "variants", see
45 | # https://flutter.dev/assets-and-images/#resolution-aware.
46 |
47 | # To add custom fonts to your plugin package, add a fonts section here,
48 | # in this "flutter" section. Each entry in this list should have a
49 | # "family" key with the font family name, and a "fonts" key with a
50 | # list giving the asset and other descriptors for the font. For
51 | # example:
52 | # fonts:
53 | # - family: Schyler
54 | # fonts:
55 | # - asset: fonts/Schyler-Regular.ttf
56 | # - asset: fonts/Schyler-Italic.ttf
57 | # style: italic
58 | # - family: Trajan Pro
59 | # fonts:
60 | # - asset: fonts/TrajanPro.ttf
61 | # - asset: fonts/TrajanPro_Bold.ttf
62 | # weight: 700
63 | #
64 | # For details regarding fonts in packages, see
65 | # https://flutter.dev/custom-fonts/#from-packages
66 |
--------------------------------------------------------------------------------
/test/flutter_pgyer_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:flutter_pgyer/flutter_pgyer.dart';
4 |
5 | void main() {
6 | const MethodChannel channel = MethodChannel('crazecoder/flutter_pgyer');
7 |
8 | setUp(() {
9 | channel.setMockMethodCallHandler((MethodCall methodCall) async {
10 | return '42';
11 | });
12 | });
13 |
14 | tearDown(() {
15 | channel.setMockMethodCallHandler(null);
16 | });
17 |
18 | // test('initSdk', () async {
19 | // expect(await FlutterPgyer.init(), '42');
20 | // });
21 | }
22 |
--------------------------------------------------------------------------------