Skip to content

kyuqw/flutter_vk_sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

571e517 · Apr 15, 2020

History

21 Commits
Apr 15, 2020
Jun 18, 2019
Jun 18, 2019
Jun 18, 2019
Jun 18, 2019
Jun 6, 2019
Jun 6, 2019
Apr 15, 2020
Jun 6, 2019
Oct 18, 2019
Jun 6, 2019
Jun 18, 2019
Apr 15, 2020

Repository files navigation

flutter_vk_sdk

pub package

Flutter vk sdk project.

This plugin is based on:

Installation

First, add flutter_vk_sdk as a dependency in your pubspec.yaml file.

flutter_vk_sdk: ^0.0.6+4

Android

In your android res/values create strings.xml and fill with this examples

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="com_vk_sdk_AppId">YOUR_VK_APP_ID</integer>
</resources>

iOS

  • AppDelegate
import UIKit
import Flutter
import VK_ios_sdk

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
    override func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
        ) -> Bool {
        GeneratedPluginRegistrant.register(with: self)
        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
    }
    
    override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        VKSdk.processOpen(url, fromApplication: "")
        return true
    }
}
  • info.plist
<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>vk{YOUR_APP_ID}</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>vk{YOUR_APP_ID}</string>
            </array>
        </dict>
    </array>


<key>LSApplicationQueriesSchemes</key>
<array>
    <string>vk</string>
    <string>vk-share</string>
    <string>vkauthorize</string>
</array>

Dart usage