{"id":376495,"date":"2024-05-21T06:52:32","date_gmt":"2024-05-21T06:52:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=376495"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=376495","title":{"rendered":"<span>Flutter \u0438 \u043d\u0430\u0442\u0438\u0432. \u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u042f\u043d\u0434\u0435\u043a\u0441 OAuth<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0447\u0443\u0434\u0430<\/h3>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043a\u0430\u043a Flutter \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0445\u043e\u0441\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u042f\u043d\u0434\u0435\u043a\u0441 OAuth. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0435? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0438 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0435 \u0441 \u0431\u043b\u044d\u043a-\u0434\u0436\u0435\u043a\u043e\u043c \u0438  MethodChannel. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/Kotelnikovekb\/oauthdemo\" rel=\"noopener noreferrer nofollow\">github<\/a><\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043c\u0435\u0440\u0442\u043d\u044b\u0445<\/h2>\n<p><a href=\"https:\/\/docs.flutter.dev\/platform-integration\/platform-channels?tab=type-mappings-c\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c<\/a><\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Flutter \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f (\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f) \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0445\u043e\u0441\u0442\u0443 \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 MethodChannel<\/p>\n<pre><code class=\"dart\">import 'package:flutter\/services.dart'; static const platform = MethodChannel('example.kotelnikoff.expert\/example');<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b: <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\"><strong>Dart<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>Java<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\"><strong>Kotlin<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Swift<\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">null<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">null  <\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">null<\/p>\n<\/td>\n<td>\n<p align=\"left\">nil<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">bool<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Boolean<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Boolean<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Bool)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">int<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Integer<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Int<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Int32)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">int, if 32 bits not enough<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Long<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Long<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Int)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">double<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Double<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Double<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Double)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">String<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.String<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">String<\/p>\n<\/td>\n<td>\n<p align=\"left\">String<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Uint8List <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">byte[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">ByteArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(bytes: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Int32List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">int[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">IntArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(int32: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Int64List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">long[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">LongArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(int64: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Float32List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">float[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">FloatArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(float32: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Float64List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">double[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">DoubleArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(float64: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.util.ArrayList<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">List<\/p>\n<\/td>\n<td>\n<p align=\"left\">Array  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Map  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.util.HashMap<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">HashMap<\/p>\n<\/td>\n<td>\n<p align=\"left\">Dictionary<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/h2>\n<h3>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Flutter<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c \u0432\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b <code>MethodChannel<\/code>. \u0418 \u0432\u0441\u0435! \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>invokeMethod<\/code><\/p>\n<pre><code class=\"dart\"> \/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u043b. 'kotelnikoff_dev' - \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.     \/\/ \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e      \/\/ (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \"samples.flutter.dev\/battery\"). \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.      \/\/ \u0412\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435     final _methodChannel = const MethodChannel('kotelnikoff_dev');     \/\/ \u0412\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u0435. \u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 String method,     \/\/ [dynamic arguments].     \/\/ method - \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c     \/\/ arguments - \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0442\u0438\u043f\u044b. (\u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0438\u0436\u0435)     final message=await _methodChannel.invokeMethod('ping',                                                     'Say hi to my little friends');<\/code><\/pre>\n<h3>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Android<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c \u044f \u0432\u044b\u0431\u0440\u0430\u043b <em>kotlin, <\/em>\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0432\u044b\u0431\u0440\u0430\u043d \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c<em> <\/em><code>MethodChannel.MethodCallHandler<\/code> \u0438 \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a \u0434\u0443\u0448\u0438\u0441\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 <code>app\/src\/main\/kotlin\/\u0438\u043c\u044f\/\u0432\u0430\u0448\u0435\u0433\u043e\/\u043f\u0430\u043a\u0435\u0442\u0430\/MainActivity.kt<\/code><\/p>\n<pre><code class=\"kotlin\">class MainActivity: FlutterActivity(), MethodChannel.MethodCallHandler {     \/\/ \u0418\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b     private final var CHANEL_NAME=\"kotelnikoff_dev\"       override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         \/\/ \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 Activity \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u043b          \/\/ \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438\u0437 Flutter         val channel = MethodChannel(           flutterEngine!!.dartExecutor.binaryMessenger, CHANEL_NAME)         channel.setMethodCallHandler(this)     }      override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {         \/\/ \u041d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435         if (call.method == \"ping\") {             \/\/\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 arguments \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435             \/\/\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430             if(call.arguments.toString() == \"Say hi to my little friends\"){                 result.success(\"Hello\")             }else{                 \/\/ \u0410 \u0442\u0443\u0442 \u0432\u0435\u0440\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443                 result.error(\"PingError\", \"What\", \"I don't know this phrase\")             }         } else {             \/\/ \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d             result.notImplemented()         }     } }<\/code><\/pre>\n<h3>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 IOS<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 IOS \u043d\u0430\u043c \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0438 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>ios\/Runner\/AppDelegate.swift<\/code><\/p>\n<pre><code class=\"swift\">override func application(         _ application: UIApplication,         didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?     ) -> Bool {         GeneratedPluginRegistrant.register(with: self)                  guard let controller = window?.rootViewController as? FlutterViewController else {             fatalError(\"Invalid root view controller\")         }         \/\/\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430\u043d\u0430\u043b         let channel = FlutterMethodChannel(name: \"kotelnikoff_dev\", binaryMessenger: controller.binaryMessenger)         \/\/ \u0421\u043b\u0443\u0448\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f         channel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) in                      if call.method == \"ping\" {                 \/\/\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 arguments \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430                 if call.arguments == \"Say hi to my little friends\" {                     result(\"Hello\")                 }else {                     \/\/ \u0410 \u0442\u0443\u0442 \u0432\u0435\u0440\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443                     result(FlutterError(code: \"PingError\",                                         message: \"What\",                                         details: \"I don't know this phrase\"))                  }             }             else {                 \/\/ \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d                 result(FlutterMethodNotImplemented)             }         }                  return super.application(application, didFinishLaunchingWithOptions: launchOptions)   }<\/code><\/pre>\n<p>\u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0445\u043e\u0441\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438. \u041f\u0440\u0430\u0432\u0434\u0430, \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u043a\u0430\u043a \u043e\u0442 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 \u0440\u0435\u0437\u044e\u043c\u0435 \u043e \u0437\u043d\u0430\u043d\u0438\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u041d\u043e \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c. <\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b Yandex ID<\/h2>\n<p> \u041a\u0430\u043a \u044f \u0440\u0430\u043d\u0435\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f Flutter \u0438 \u044f\u043d\u0434\u0435\u043a\u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043e\u043d \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f \u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 \u043c\u0435\u043d\u044f \u0443\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f, \u0433\u0434\u0435 \u0442\u0443\u0442 \u043b\u0438\u0431\u0430 \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c?<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u0412\u0441\u0435 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. <a href=\"https:\/\/%D0%BA%D0%BE%D0%BD%D1%81%D0%BE%D0%BB%D0%B8%20%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B0%20yandex%5D(https:\/\/oauth.yandex.ru\/%D0%BA%D0%BE%D0%BD%D1%81%D0%BE%D0%BB%D0%B8%20%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B0%20yandex%5D(https:\/\/oauth.yandex.ru\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0442\u0443\u0442.<\/a>  \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0443\u0442:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f android: \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 getCertificateFingerprint)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f IOS: \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 Team ID \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Android<\/h3>\n<p><a href=\"https:\/\/yandex.ru\/dev\/id\/doc\/ru\/mobileauthsdk\/android\/3.1.0\/sdk-android-install\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a><\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b <code>android\/app\/build.gradle<\/code> \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>com.yandex.android:authsdk<\/code><\/p>\n<\/li>\n<\/ol>\n<pre><code>android { ..... defaultConfig { .... \/\/\/\u041c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0432\u044b\u0448\u0435 minSdkVersion 23 \/\/\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u044e\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043b\u0438\u0431\u044b   manifestPlaceholders += [YANDEX_CLIENT_ID:\"\u041a\u043b\u044e\u0447 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\"] ... } } dependencies {       \/\/\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443       implementation \"com.yandex.android:authsdk:3.1.0\"   }<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b <code>com.yandex.android:authsdk<\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e kotlin \u0432 \u0444\u0430\u0439\u043b\u0435 <code>android\/settings.gradle<\/code>. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f authsdk. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<pre><code>plugins { \/\/\/ \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 1.8.0 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c     id \"org.jetbrains.kotlin.android\" version \"1.8.0\" apply false  }<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043d\u0430 IOS<\/h3>\n<p><a href=\"https:\/\/yandex.ru\/dev\/id\/doc\/ru\/mobileauthsdk\/ios\/3.0.0\/sdk-ios-install\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a><\/p>\n<ol>\n<li>\n<p>\u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>ios\/Podfile<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>YandexLoginSDK<\/code><\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"ruby\"># \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Podfile # Uncomment this line to define a global platform for your project   platform :ios, '14.0'   # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430   pod 'YandexLoginSDK'    # ....\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430...<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 <code>ios\/Runner\/Info.plist<\/code> \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"xml\">&lt;key>LSApplicationQueriesSchemes&lt;\/key>      &lt;array>         &lt;string>primaryyandexloginsdk&lt;\/string>         &lt;string>secondaryyandexloginsdk&lt;\/string>      &lt;\/array>      &lt;key>CFBundleURLTypes&lt;\/key>      &lt;array>         &lt;dict>            &lt;key>CFBundleURLName&lt;\/key>            &lt;string>YandexLoginSDK&lt;\/string>            &lt;key>CFBundleURLSchemes&lt;\/key>            &lt;array>               &lt;string>yx{\u0412\u0410\u0428_\u041a\u041b\u042e\u0427}&lt;\/string>            &lt;\/array>         &lt;\/dict>      &lt;\/array><\/code><\/pre>\n<blockquote>\n<p>\u0411\u043b\u043e\u043a <code>CFBundleURLTypes<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043d\u0430 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b. \u0414\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 <code>&lt;dict><\/code> \u0432\u043d\u0443\u0442\u0440\u0438 <code>&lt;array>&lt;\/array><\/code><\/p>\n<\/blockquote>\n<ol start=\"3\">\n<li>\n<p> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d <code>applinks:yx{Client_ID}.oauth.yandex.ru<\/code>  \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 <code>Capability: Associated Domains<\/code><\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/h3>\n<p>\u0412\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <a href=\"https:\/\/github.com\/Kotelnikovekb\/oauthdemo\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 github<\/a> \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. \u0418 \u0432 \u043d\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u0442\u043e\u0436\u0435. \u0422\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b (\u0432\u0441\u0435 3) \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 OAuthYandex. \u0414\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f bool \u0438 JSON string. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u0438\u043f Map , \u0435\u0441\u043b\u0438 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043e \u0432\u0441\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a \u0438 \u044f \u0442\u0430\u043a \u0432\u0438\u0436\u0443. <\/p>\n<blockquote>\n<p>\u041c\u0438\u043d\u0438 \u043b\u0430\u0439\u0444\u0445\u0430\u043a  . <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c JSON \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u0435 <a href=\"https:\/\/app.quicktype.io\/\" rel=\"noopener noreferrer nofollow\">quicktype.io<\/a> \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b\u0438\u043a. \u0411\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043c\u0441. <\/p>\n<\/blockquote>\n<h3>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0430 <\/h3>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f android. \u041d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f SHA \u0438\u043b\u0438 SHA256 Fingerprint. \u042d\u0442\u0438 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u044f\u043d\u0434\u0435\u043a\u0441\u0430. \u0414\u0430 \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u043e\u043d\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f (VK. google \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0448\u0442\u0443\u043a\u0438 \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0435 ). \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437 \u043c\u0430\u0440\u043a\u0435\u0442\u0430.<\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Flutter. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438,<\/p>\n<pre><code class=\"dart\">Future&lt;FingerprintModel> getCertificateFingerprint({FingerprintType type=FingerprintType.SHA1})async{     if(!Platform.isAndroid){       throw UnsupportedError('\u041c\u0435\u0442\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 android');     }     try{       final message=await _methodChannel.invokeMethod('getCertificateFingerprint',type.label);       \/\/\u043f\u0430\u0440\u0441\u0438\u043c \u043e\u0442\u0432\u0435\u0442       return fingerprintModelFromJson(message);     }catch(e,s){       rethrow;     }   }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043d\u0430 kotlin \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <code>onMethodCall<\/code><\/p>\n<pre><code class=\"kotlin\">\/\/ \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \/\/ \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.         else if(call.method==\"getCertificateFingerprint\"){             try {                 val info = context.packageManager.getPackageInfo(                     context.packageName,                     PackageManager.GET_SIGNATURES                 )                 for (signature in info.signatures) {                     val md: MessageDigest = MessageDigest.getInstance(call.arguments.toString())                     md.update(signature.toByteArray())                     val digest = md.digest()                     val hexString = digest.joinToString(\":\") { \"%02x\".format(it) }                     val res=mapOf(                         \"fingerprint\" to hexString,                         \"packageName\" to context.packageName                     )                     result.success(JSONObject(res.toMap()).toString())                 }             } catch (e: Exception) {                 result.error(\"Error cert\",\"${e.message}\",\"${e.stackTrace}\")             }         }<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <\/h3>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u042f\u043d\u0434\u0435\u043a\u0441 OAuth \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043c\u0435\u0442\u043e\u0434 <code>start<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0435\u0439 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u0448\u0435 \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 flutter \u0432\u044b\u0437\u043e\u0432 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f (\u043f\u043e\u043c\u0435\u043d\u044f\u0439 <code>getCertificateFingerprint<\/code> \u043d\u0430  <code>start<\/code>). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0434 \u043d\u0430 kotlin. \u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438. \u0421\u0430\u043c \u043a\u043e\u0434 \u0432\u0437\u044f\u0442 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"kotlin\">if(call.method==\"start\"){             try {                 yandexSdk = YandexAuthSdk.create(YandexAuthOptions(applicationContext))                 result.success(true)             }catch (e: Exception){                 result.error(\"InitError\",\"${e.message}\",\"${e.stackTrace}\")             }         }<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c Intent \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f\u043d\u0434\u0435\u043a\u0441\u0430 (\u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043a\u0440\u044b\u0442\u044c\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440). \u041e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>onActivityResult<\/code>. <\/p>\n<pre><code class=\"kotlin\">try{                 val loginOptions = YandexAuthLoginOptions()                 val intent: Intent = yandexSdk.contract.createIntent(                   applicationContext,loginOptions)                 \/\/ \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0436\u0434\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442                 startActivityForResult(intent, REQUEST_LOGIN_YANDEX);             }catch (e: Exception){                 result.error(\"InitError\",\"${e.message}\",\"${e.stackTrace}\")             }  \/\/\/ \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u043e\u043a \u0441\u043f\u0443\u0441\u0442\u044f       override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {         if (requestCode==REQUEST_LOGIN_YANDEX){             val sdk = YandexAuthSdk.create(YandexAuthOptions(applicationContext))             \/\/ \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438             handleResult(sdk.contract.parseResult(resultCode,data))         }         super.onActivityResult(requestCode, resultCode, data)     } <\/code><\/pre>\n<p>\u041d\u0430 android \u044d\u0442\u043e \u0432\u0441\u0435. \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0435 \u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f android<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"kotlin\">package expert.kotelnikoff.oauthdemo  import android.content.Context import android.content.Intent import android.content.pm.PackageManager import android.os.Bundle import android.util.Log import com.yandex.authsdk.YandexAuthException import com.yandex.authsdk.YandexAuthLoginOptions import com.yandex.authsdk.YandexAuthOptions import com.yandex.authsdk.YandexAuthResult import com.yandex.authsdk.YandexAuthSdk import com.yandex.authsdk.YandexAuthToken import io.flutter.embedding.android.FlutterActivity import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodChannel import org.json.JSONObject import java.security.MessageDigest  class MainActivity: FlutterActivity(), MethodChannel.MethodCallHandler {     \/\/\/ \u042d\u0442\u043e \u043d\u0430\u0448 \u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u043b\u0430\u0442\u0442\u0435\u0440\u043e\u043c. \u0412\u0430\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b     private final var CHANEL_NAME=\"kotelnikoff_dev\"     private lateinit var yandexSdk: YandexAuthSdk     private var result: MethodChannel.Result? = null     private val REQUEST_LOGIN_YANDEX = 100     private lateinit var channel : MethodChannel     private lateinit var context: Context;       override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {         if(call.method==\"start\"){             try {                 yandexSdk = YandexAuthSdk.create(YandexAuthOptions(applicationContext))                 result.success(true)             }catch (e: Exception){                 result.error(\"InitError\",\"${e.message}\",\"${e.stackTrace}\")             }         }else if(call.method==\"yandexAuth\"){             \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043d\u0435\u0439. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c result \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.             if(this.result!=null){                 result.error(\"InitError\",\"\u041f\u0440\u043e\u0448\u043b\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d, \u0436\u0434\u0438\u0442\u0435\",\"\u041f\u043e\u0434\u043e\u0436\u0434\u0438\")                 return;             }             this.result=result             \/\/ \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430             try{                 val loginOptions = YandexAuthLoginOptions()                 val intent: Intent = yandexSdk.contract.createIntent(applicationContext,loginOptions)                 startActivityForResult(intent, REQUEST_LOGIN_YANDEX);             }catch (e: Exception){                 result.error(\"InitError\",\"${e.message}\",\"${e.stackTrace}\")             }         }         \/\/ \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0443\u0436\u043d\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043e\u043d\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.         else if(call.method==\"getCertificateFingerprint\"){             try {                 val info = context.packageManager.getPackageInfo(                     context.packageName,                     PackageManager.GET_SIGNATURES                 )                 for (signature in info.signatures) {                     val md: MessageDigest = MessageDigest.getInstance(call.arguments.toString())                     md.update(signature.toByteArray())                     val digest = md.digest()                     val hexString = digest.joinToString(\":\") { \"%02x\".format(it) }                     val res=mapOf(                         \"fingerprint\" to hexString,                         \"packageName\" to context.packageName                     )                     result.success(JSONObject(res.toMap()).toString())                 }             } catch (e: Exception) {                 result.error(\"Error cert\",\"${e.message}\",\"${e.stackTrace}\")             }         }    else {             result.notImplemented()         }      }     \/\/ \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 Flutter     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         context = applicationContext         channel = MethodChannel(flutterEngine!!.dartExecutor.binaryMessenger, CHANEL_NAME)         channel.setMethodCallHandler(this)     }     \/\/ \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430. \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c \u0431\u044b\u043b \u0437\u0430\u043f\u0440\u043e\u0441     private fun handleResult(result: YandexAuthResult) {         when (result) {             is YandexAuthResult.Success -> onSuccessAuth(result.token)             is YandexAuthResult.Failure -> onProccessError(result.exception)             YandexAuthResult.Cancelled -> onCancelled()         }     }     private fun onSuccessAuth(token: YandexAuthToken){         val res=mapOf(             \"susses\" to true,             \"token\" to token.value,             \"expiresIn\" to token.expiresIn,         )          if(result!==null){             result!!.success(JSONObject(res.toMap()).toString())             result=null         }      }     \/\/\/ \u0441\u043b\u0443\u0448\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e     override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {         if (requestCode==REQUEST_LOGIN_YANDEX){             val sdk = YandexAuthSdk.create(YandexAuthOptions(applicationContext))             handleResult(sdk.contract.parseResult(resultCode,data))         }         super.onActivityResult(requestCode, resultCode, data)     }     private fun onProccessError(exception: YandexAuthException){         val arg = HashMap&lt;String, Any>()         arg.put(\"susses\",false)         arg.put(\"provider\",\"yandex\")         arg.put(\"error\",exception.toString())         if(result!==null){             result!!.success(JSONObject(arg.toMap()).toString())             result=null         }      }     private fun onCancelled(){         val arg = HashMap&lt;String, Any>()         arg.put(\"susses\",false)         arg.put(\"provider\",\"yandex\")         arg.put(\"cancelled\",true)         if(result!==null){             result!!.success(JSONObject(arg.toMap()).toString())             result=null         }     }   } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 IOS<\/h3>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b start \u0438 yandexAuth \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u0435 IOS. \u041b\u043e\u0433\u0438\u043a\u0430 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0439-\u0436\u0435 \u043a\u0430\u043a \u0438 \u043d\u0430 android. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043b\u0430\u0439\u0444\u0445\u0430\u043a  <\/p>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 import Flutter \u043d\u0430\u0434\u043f\u0438\u0441\u044c &#171;No such module &#8216;Flutter&#8217; &#187; , \u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 Runner \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 (\u0441\u043a\u0440\u0438\u043d\u044b \u043d\u0438\u0436\u0435)<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/92b\/73c\/3df\/92b73c3df3ec0f06999205b2fb6f80cd.jpg\" alt=\"\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430\" title=\"\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430\" width=\"1280\" height=\"506\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/92b\/73c\/3df\/92b73c3df3ec0f06999205b2fb6f80cd.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2ae\/061\/e1e\/2ae061e1e81e6112ac4bbc0dbc32d0ca.png\" alt=\"\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 xcode (\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0431\u0438\u043b\u0434 \u0438 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c)\" title=\"\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 xcode (\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0431\u0438\u043b\u0434 \u0438 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c)\" width=\"1280\" height=\"717\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ae\/061\/e1e\/2ae061e1e81e6112ac4bbc0dbc32d0ca.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 xcode (\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0431\u0438\u043b\u0434 \u0438 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c)<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 IOS \u044f\u043d\u0434\u0435\u043a\u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b <code>YandexLoginSDKObserver<\/code>. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0441 <code>NSObject<\/code> \u0438 <code>YandexLoginSDKObserver<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434 <code>didFinishLogin<\/code>  <\/p>\n<pre><code class=\"swift\">class MyYandexLoginSDKObserver: NSObject, YandexLoginSDKObserver {   \/\/ \u0442\u0443\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 func didFinishLogin(with result: Result&lt;LoginResult, any Error>) {         do {             let res = try result.get()             let response = SussesResponse(susses: true, token: res.token, expiresIn: -1)             let encoder = JSONEncoder()             let responseJson = try encoder.encode(response)             let responseJsonString = String(data: responseJson, encoding: .utf8)             \/\/ \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json \u0432\u043e flutter \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.             self.resultFlutter(responseJsonString)                      }catch{             let response = ErrorResponse(susses: false, errorMessage: \"\\(error)\")             let encoder = JSONEncoder()                          do {                 let responseJson = try encoder.encode(response)                 let responseJsonString = String(data: responseJson, encoding: .utf8)                 \/\/ \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043b\u043e\u0445\u043e, \u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435                  self.resultFlutter(FlutterError.init(code: \"errorSetDebug\",message: responseJsonString,details:nil))             }catch{                              }         }              } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c IOS. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u0430\u043d\u0430\u043b\u0443 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>start<\/code> \u0438 <code>yandexAuth<\/code><\/p>\n<pre><code class=\"swift\">override func application(     _ application: UIApplication,     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?   ) -> Bool {     GeneratedPluginRegistrant.register(with: self)       guard let controller = window?.rootViewController as? FlutterViewController else {                   fatalError(\"Invalid root view controller\")               }       \/\/\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u0430\u043d\u0430\u043b\u0443       let channel = FlutterMethodChannel(name: \"kotelnikoff_dev\", binaryMessenger: controller.binaryMessenger)       \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0435\u043c       channel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) in                   if call.method == \"start\" {                                            do {                           let clientID = \"{\u0412\u0410\u0428_\u041a\u041b\u042e\u0427}\" \/\/&lt;= \u0432\u0430\u0448 id \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 Info.plist                           try YandexLoginSDK.shared.activate(with: clientID)                           self.myYandex = MyYandexLoginSDKObserver()                           YandexLoginSDK.shared.add(observer: self.myYandex)                           result(true)                       } catch {                           result(FlutterError(code: \"InitError\",                                                                                 message: \"Error YandexLoginSDK \\(error)\",                                                                                 details: \"\\(error)\"))                                                   }                                          } else if call.method == \"yandexAuth\" {                       if let viewController = UIApplication.shared.keyWindow?.rootViewController {                           do{                               self.myYandex.setResult(result: result);                               try YandexLoginSDK.shared.authorize(with: viewController)                           }catch{                               result(FlutterError(code: \"ERROR YandexLoginSDK\",                                                       message: \"Error YandexLoginSDK \\(error)\",                                                       details: \"\\(error)\"))                           }                       }                                          }                   else {                       result(FlutterMethodNotImplemented)                   }               }     return super.application(application, didFinishLaunchingWithOptions: launchOptions)   }<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043d\u0430 IOS.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f IOS<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"swift\">import UIKit import Flutter import YandexLoginSDK   @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate {     var myYandex:MyYandexLoginSDKObserver=MyYandexLoginSDKObserver()    override func application(     _ application: UIApplication,     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?   ) -> Bool {     GeneratedPluginRegistrant.register(with: self)       guard let controller = window?.rootViewController as? FlutterViewController else {                   fatalError(\"Invalid root view controller\")               }       \/\/\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u0430\u043d\u0430\u043b\u0443       let channel = FlutterMethodChannel(name: \"kotelnikoff_dev\", binaryMessenger: controller.binaryMessenger)       \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0435\u043c       channel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) in                   if call.method == \"start\" {                                            do {                           let clientID = \"{\u0412\u0410\u0428_\u041a\u041b\u042e\u0427}\" \/\/&lt;= \u0432\u0430\u0448 id \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 Info.plist                           try YandexLoginSDK.shared.activate(with: clientID)                           self.myYandex = MyYandexLoginSDKObserver()                           YandexLoginSDK.shared.add(observer: self.myYandex)                           result(true)                       } catch {                           result(FlutterError(code: \"InitError\",                                                                                 message: \"Error YandexLoginSDK \\(error)\",                                                                                 details: \"\\(error)\"))                                                   }                                          } else if call.method == \"yandexAuth\" {                       if let viewController = UIApplication.shared.keyWindow?.rootViewController {                           do{                               self.myYandex.setResult(result: result);                               try YandexLoginSDK.shared.authorize(with: viewController)                           }catch{                               result(FlutterError(code: \"ERROR YandexLoginSDK\",                                                       message: \"Error YandexLoginSDK \\(error)\",                                                       details: \"\\(error)\"))                           }                       }                                          }                   else {                       result(FlutterMethodNotImplemented)                   }               }     return super.application(application, didFinishLaunchingWithOptions: launchOptions)   } }  class MyYandexLoginSDKObserver: NSObject, YandexLoginSDKObserver {     var resultFlutter: FlutterResult!               func setResult(result: @escaping FlutterResult){         self.resultFlutter = result     }          func didFinishLogin(with result: Result&lt;LoginResult, any Error>) {         do {             let res = try result.get()                                                                 let response = SussesResponse(susses: true, token: res.token, expiresIn: -1)                                       let encoder = JSONEncoder()                          let responseJson = try encoder.encode(response)             let responseJsonString = String(data: responseJson, encoding: .utf8)                          self.resultFlutter(responseJsonString)                      }catch{             let response = ErrorResponse(susses: false, errorMessage: \"\\(error)\")             let encoder = JSONEncoder()                          do {                 let responseJson = try encoder.encode(response)                 let responseJsonString = String(data: responseJson, encoding: .utf8)                                  self.resultFlutter(FlutterError.init(code: \"errorSetDebug\",message: responseJsonString,details:nil))             }catch{                              }         }              } }   \/\/\u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c. \u042f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0430\u0447\u0435. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438, \u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b struct SussesResponse: Encodable {     var susses: Bool     var token: String     var expiresIn: Int }  struct ErrorResponse: Encodable {     var susses: Bool     var errorMessage: String } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u0413\u043e\u0442\u043e\u0432\u043e<\/h2>\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e yandex \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0445\u043e\u0441\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 (\u043b\u0443\u0447\u0448\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435)<\/p>\n<pre><code>curl --location 'https:\/\/login.yandex.ru\/info' \\ --header 'Authorization: OAuth {\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439_\u0442\u043e\u043a\u0435\u043d_\u0432_\u043f\u0440\u0438\u043e\u0436\u0435\u043d\u0438\u0438}'<\/code><\/pre>\n<p>\u0418 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e.<\/p>\n<p>P.S. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445, \u0442\u043e \u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f ios. <\/p>\n<p>\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u043a\u0430\u043d\u0430\u043b \u0430\u0432\u0442\u043e\u0440\u0430 <a href=\"https:\/\/t.me\/kotelnikoff_dev\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0442\u0443\u0442<\/a><\/p>\n<p><a href=\"https:\/\/www.tinkoff.ru\/rm\/kotelnikov.yuriy2\/PzxiM41989\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u043a\u0438\u043d\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043d\u0430 \u043a\u043e\u0444\u0435<\/a>, \u0435\u043c\u0443 \u0435\u0449\u0435 \u043f\u0435\u0441\u0438\u043a\u0430 \u043a\u043e\u0440\u043c\u0438\u0442\u044c,<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/815313\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0410 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c \u0432\u043e Flutter?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">28.57% <\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span><span class=\"tm-article-poll__answer-votes\">2<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 28.57%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">71.43% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span><span class=\"tm-article-poll__answer-votes\">5<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 71.43%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 7 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/815313\/\"> https:\/\/habr.com\/ru\/articles\/815313\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0447\u0443\u0434\u0430<\/h3>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043a\u0430\u043a Flutter \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0445\u043e\u0441\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u042f\u043d\u0434\u0435\u043a\u0441 OAuth. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0435? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0438 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0435 \u0441 \u0431\u043b\u044d\u043a-\u0434\u0436\u0435\u043a\u043e\u043c \u0438  MethodChannel. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/Kotelnikovekb\/oauthdemo\" rel=\"noopener noreferrer nofollow\">github<\/a><\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043c\u0435\u0440\u0442\u043d\u044b\u0445<\/h2>\n<p><a href=\"https:\/\/docs.flutter.dev\/platform-integration\/platform-channels?tab=type-mappings-c\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c<\/a><\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Flutter \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f (\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f) \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0445\u043e\u0441\u0442\u0443 \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 MethodChannel<\/p>\n<pre><code class=\"dart\">import 'package:flutter\/services.dart'; static const platform = MethodChannel('example.kotelnikoff.expert\/example');<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b: <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\"><strong>Dart<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>Java<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\"><strong>Kotlin<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Swift<\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">null<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">null  <\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">null<\/p>\n<\/td>\n<td>\n<p align=\"left\">nil<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">bool<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Boolean<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Boolean<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Bool)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">int<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Integer<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Int<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Int32)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">int, if 32 bits not enough<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Long<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Long<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Int)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">double<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.Double<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">Double<\/p>\n<\/td>\n<td>\n<p align=\"left\">NSNumber(value: Double)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">String<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.lang.String<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">String<\/p>\n<\/td>\n<td>\n<p align=\"left\">String<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Uint8List <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">byte[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">ByteArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(bytes: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Int32List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">int[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">IntArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(int32: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Int64List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">long[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">LongArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(int64: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Float32List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">float[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">FloatArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(float32: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Float64List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">double[]<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">DoubleArray<\/p>\n<\/td>\n<td>\n<p align=\"left\">FlutterStandardTypedData(float64: Data)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">List  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.util.ArrayList<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">List<\/p>\n<\/td>\n<td>\n<p align=\"left\">Array  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"132\" width=\"132\">\n<p align=\"left\">Map  <\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">java.util.HashMap<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">HashMap<\/p>\n<\/td>\n<td>\n<p align=\"left\">Dictionary<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/h2>\n<h3>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Flutter<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c \u0432\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b <code>MethodChannel<\/code>. \u0418 \u0432\u0441\u0435! \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>invokeMethod<\/code><\/p>\n<pre><code class=\"dart\"> \/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u043b. 'kotelnikoff_dev' - \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.     \/\/ \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e      \/\/ (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \"samples.flutter.dev\/battery\"). \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.      \/\/ \u0412\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435     final _methodChannel = const MethodChannel('kotelnikoff_dev');     \/\/ \u0412\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u0435. \u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 String method,     \/\/ [dynamic arguments].     \/\/ method - \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c     \/\/ arguments - \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0442\u0438\u043f\u044b. (\u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0438\u0436\u0435)     final message=await _methodChannel.invokeMethod('ping',                                                     'Say hi to my little friends');<\/code><\/pre>\n<h3>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Android<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0430\u0442\u0438\u0432\u043e\u043c \u044f \u0432\u044b\u0431\u0440\u0430\u043b <em>kotlin, <\/em>\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0432\u044b\u0431\u0440\u0430\u043d \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c<em> <\/em><code>MethodChannel.MethodCallHandler<\/code> \u0438 \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a \u0434\u0443\u0448\u0438\u0441\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 <code>app\/src\/main\/kotlin\/\u0438\u043c\u044f\/\u0432\u0430\u0448\u0435\u0433\u043e\/\u043f\u0430\u043a\u0435\u0442\u0430\/MainActivity.kt<\/code><\/p>\n<pre><code class=\"kotlin\">class MainActivity: FlutterActivity(), MethodChannel.MethodCallHandler {     \/\/ \u0418\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0438\u043c\u0432\u043e\u043b     private final var CHANEL_NAME=\"kotelnikoff_dev\"       override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         \/\/ \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 Activity \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u043d\u0430\u043b          \/\/ \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438\u0437 Flutter         val channel = MethodChannel(           flutterEngine!!.dartExecutor.binaryMessenger, CHANEL_NAME)         channel.setMethodCallHandler(this)     }      override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {         \/\/ \u041d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435         if (call.method == \"ping\") {             \/\/\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 arguments \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435             \/\/\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430             if(call.arguments.toString() == \"Say hi to my little friends\"){                 result.success(\"Hello\")             }else{                 \/\/ \u0410 \u0442\u0443\u0442 \u0432\u0435\u0440\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443                 result.error(\"PingError\", \"What\", \"I don't know this phrase\")             }         } else {             \/\/ \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d             result.notImplemented()         }     } }<\/code><\/pre>\n<h3>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 IOS<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 IOS \u043d\u0430\u043c \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0438 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>ios\/Runner\/AppDelegate.swift<\/code><\/p>\n<pre><code class=\"swift\">override func application(         _ application: UIApplication,         didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?     ) -> Bool {         GeneratedPluginRegistrant.register(with: self)                  guard let controller = window?.rootViewController as? FlutterViewController else {             fatalError(\"Invalid root view controller\")         }         \/\/\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430\u043d\u0430\u043b         let channel = FlutterMethodChannel(name: \"kotelnikoff_dev\", binaryMessenger: controller.binaryMessenger)         \/\/ \u0421\u043b\u0443\u0448\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f         channel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) in                      if call.method == \"ping\" {                 \/\/\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 arguments \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u0432\u0435\u0440\u043d\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430                 if call.arguments == \"Say hi to my little friends\" {                     result(\"Hello\")                 }else {                     \/\/ \u0410 \u0442\u0443\u0442 \u0432\u0435\u0440\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443                     result(FlutterError(code: \"PingError\",                                         message: \"What\",                                         details: \"I don't know this phrase\"))                  }             }             else {                 \/\/ \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d                 result(FlutterMethodNotImplemented)             }         }                  return super.application(application, didFinishLaunchingWithOptions: launchOptions)   }<\/code><\/pre>\n<p>\u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0445\u043e\u0441\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438. \u041f\u0440\u0430\u0432\u0434\u0430, \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u043a\u0430\u043a \u043e\u0442 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 \u0440\u0435\u0437\u044e\u043c\u0435 \u043e \u0437\u043d\u0430\u043d\u0438\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u041d\u043e \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c. <\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b Yandex ID<\/h2>\n<p> \u041a\u0430\u043a \u044f \u0440\u0430\u043d\u0435\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f Flutter \u0438 \u044f\u043d\u0434\u0435\u043a\u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043e\u043d \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f \u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 \u043c\u0435\u043d\u044f \u0443\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f, \u0433\u0434\u0435 \u0442\u0443\u0442 \u043b\u0438\u0431\u0430 \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c?<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u0412\u0441\u0435 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. <a href=\"https:\/\/%D0%BA%D0%BE%D0%BD%D1%81%D0%BE%D0%BB%D0%B8%20%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B0%20yandex%5D(https:\/\/oauth.yandex.ru\/%D0%BA%D0%BE%D0%BD%D1%81%D0%BE%D0%BB%D0%B8%20%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B0%20yandex%5D(https:\/\/oauth.yandex.ru\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0442\u0443\u0442.<\/a>  \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0443\u0442:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f android: \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 getCertificateFingerprint)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f IOS: \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 Team ID \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Android<\/h3>\n<p><a href=\"https:\/\/yandex.ru\/dev\/id\/doc\/ru\/mobileauthsdk\/android\/3.1.0\/sdk-android-install\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a><\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b <code>android\/app\/build.gradle<\/code> \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>com.yandex.android:authsdk<\/code><\/p>\n<\/li>\n<\/ol>\n<pre><code>android { ..... defaultConfig { .... \/\/\/\u041c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0432\u044b\u0448\u0435 minSdkVersion 23 \/\/\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u044e\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043b\u0438\u0431\u044b   manifestPlaceholders += [YANDEX_CLIENT_ID:\"\u041a\u043b\u044e\u0447 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\"] ... } } dependencies {       \/\/\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443       implementation \"com.yandex.android:authsdk:3.1.0\"   }<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b <code>com.yandex.android:authsdk<\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e kotlin \u0432 \u0444\u0430\u0439\u043b\u0435 <code>android\/settings.gradle<\/code>. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f authsdk. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<pre><code>plugins { \/\/\/ \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 1.8.0 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c     id \"org.jetbrains.kotlin.android\" version \"1.8.0\" apply false  }<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043d\u0430 IOS<\/h3>\n<p><a href=\"https:\/\/yandex.ru\/dev\/id\/doc\/ru\/mobileauthsdk\/ios\/3.0.0\/sdk-ios-install\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a><\/p>\n<ol>\n<li>\n<p>\u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>ios\/Podfile<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>YandexLoginSDK<\/code><\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"ruby\"># \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Podfile # Uncomment this line to define a global platform for your project   platform :ios, '14.0'   # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u043d\u0434\u0435\u043a\u0441\u0430   pod 'YandexLoginSDK'    # ....\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430...<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 <code>ios\/Runner\/Info.plist<\/code> \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"xml\">&lt;key>LSApplicationQueriesSchemes&lt;\/key>      &lt;array>         &lt;string>primaryyandexloginsdk&lt;\/string>         &lt;string>secondaryyandexloginsdk&lt;\/string>      &lt;\/array>      &lt;key>CFBundleURLTypes&lt;\/key>      &lt;array>         &lt;dict>            &lt;key>CFBundleURLName&lt;\/key>            &lt;string>YandexLoginSDK&lt;\/string>            &lt;key>CFBundleURLSchemes&lt;\/key>            &lt;array>               &lt;string>yx{\u0412\u0410\u0428_\u041a\u041b\u042e\u0427}&lt;\/string>            &lt;\/array>         &lt;\/dict>      &lt;\/array><\/code><\/pre>\n<blockquote>\n<p>\u0411\u043b\u043e\u043a <code>CFBundleURLTypes<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043d\u0430 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b. \u0414\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 <code>&lt;dict><\/code> \u0432\u043d\u0443\u0442\u0440\u0438 <code>&lt;array>&lt;\/array><\/code><\/p>\n<\/blockquote>\n<ol start=\"3\">\n<li>\n<p> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d <code>applinks:yx{Client_ID}.oauth.yandex.ru<\/code>  \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 <code>Capability: Associated Domains<\/code><\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/h3>\n<p>\u0412\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <a href=\"https:\/\/github.com\/Kotelnikovekb\/oauthdemo\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 github<\/a> \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. \u0418 \u0432 \u043d\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u0442\u043e\u0436\u0435. \u0422\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b (\u0432\u0441\u0435 3) \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 OAuthYandex. \u0414\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f bool \u0438 JSON string. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u0438\u043f Map , \u0435\u0441\u043b\u0438 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043e \u0432\u0441\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a \u0438 \u044f \u0442\u0430\u043a \u0432\u0438\u0436\u0443. <\/p>\n<blockquote>\n<p>\u041c\u0438\u043d\u0438 \u043b\u0430\u0439\u0444\u0445\u0430\u043a  . <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c JSON \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u0435 <a href=\"https:\/\/app.quicktype.io\/\" rel=\"noopener noreferrer nofollow\">quicktype.io<\/a> \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b\u0438\u043a. \u0411\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043c\u0441. <\/p>\n<\/blockquote>\n<h3>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0430 <\/h3>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f android. \u041d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f SHA \u0438\u043b\u0438 SHA256 Fingerprint. \u042d\u0442\u0438 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u044f\u043d\u0434\u0435\u043a\u0441\u0430. \u0414\u0430 \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u043e\u043d\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f (VK. google \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0448\u0442\u0443\u043a\u0438 \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0435 ). \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043e\u043a \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437 \u043c\u0430\u0440\u043a\u0435\u0442\u0430.<\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Flutter. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438,<\/p>\n<pre><code class=\"dart\">Future&lt;FingerprintModel> getCertificateFingerprint({FingerprintType type=FingerprintType.SHA1})async{     if(!Platform.isAndroid){       throw UnsupportedError('\u041c\u0435\u0442\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 android');     }     try{       final message=await _methodChannel.invokeMethod('getCertificateFingerprint',type.label);       \/\/\u043f\u0430\u0440\u0441\u0438\u043c \u043e\u0442\u0432\u0435\u0442       return fingerprintModelFromJson(message);     }catch(e,s){       rethrow;     }   }<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043d\u0430 kotlin \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <code>onMethodCall<\/code><\/p>\n<pre><code class=\"kotlin\">\/\/ \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \/\/ \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.         else if(call.method==\"getCertificateFingerprint\"){             try {                 val info = context.packageManager.getPackageInfo(                     context.packageName,       <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-376495","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=376495"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376495\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=376495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=376495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=376495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}