From 8cc2523f69986263f59e3b88b812f8bdbc2e1bb3 Mon Sep 17 00:00:00 2001 From: Frank Gregor Date: Thu, 28 May 2020 11:37:12 +0200 Subject: [PATCH] wip --- delta_chat_core | 2 +- ios/Classes/Helper/MethodChannel.swift | 53 ++++++++++++++++++++++ ios/Classes/SwiftDeltaChatCorePlugin.swift | 2 +- 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 ios/Classes/Helper/MethodChannel.swift diff --git a/delta_chat_core b/delta_chat_core index 6c40d37..da8e44c 160000 --- a/delta_chat_core +++ b/delta_chat_core @@ -1 +1 @@ -Subproject commit 6c40d37753fb03621d0e4c27bea86de9edd08497 +Subproject commit da8e44c56d0314fde1bf2c980fc2e4dfac7f8275 diff --git a/ios/Classes/Helper/MethodChannel.swift b/ios/Classes/Helper/MethodChannel.swift new file mode 100644 index 0000000..0168c10 --- /dev/null +++ b/ios/Classes/Helper/MethodChannel.swift @@ -0,0 +1,53 @@ +/* + * OPEN-XCHANGE legal information + * + * All intellectual property rights in the Software are protected by + * international copyright laws. + * + * + * In some countries OX, OX Open-Xchange and open xchange + * as well as the corresponding Logos OX Open-Xchange and OX are registered + * trademarks of the OX Software GmbH group of companies. + * The use of the Logos is not covered by the Mozilla Public License 2.0 (MPL 2.0). + * Instead, you are allowed to use these Logos according to the terms and + * conditions of the Creative Commons License, Version 2.5, Attribution, + * Non-commercial, ShareAlike, and the interpretation of the term + * Non-commercial applicable to the aforementioned license is published + * on the web site https://www.open-xchange.com/terms-and-conditions/. + * + * Please make sure that third-party modules and libraries are used + * according to their respective licenses. + * + * Any modifications to this package must retain all copyright notices + * of the original copyright holder(s) for the original code used. + * + * After any such modifications, the original and derivative code shall remain + * under the copyright of the copyright holder(s) and/or original author(s) as stated here: + * https://www.open-xchange.com/legal/. The contributing author shall be + * given Attribution for the derivative code and a license granting use. + * + * Copyright (C) 2016-2020 OX Software GmbH + * Mail: info@open-xchange.com + * + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public License 2.0 + * for more details. + */ + +import Foundation + +struct MethodChannel {} + +extension MethodChannel { + + struct DeltaChat { + static let Core = "deltaChatCore" + } + +} diff --git a/ios/Classes/SwiftDeltaChatCorePlugin.swift b/ios/Classes/SwiftDeltaChatCorePlugin.swift index bf3a0b4..698cd97 100644 --- a/ios/Classes/SwiftDeltaChatCorePlugin.swift +++ b/ios/Classes/SwiftDeltaChatCorePlugin.swift @@ -85,7 +85,7 @@ public class SwiftDeltaChatCorePlugin: NSObject, FlutterPlugin { // This is our entry point public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "deltaChatCore", binaryMessenger: registrar.messenger()) + let channel = FlutterMethodChannel(name: MethodChannel.DeltaChat.Core, binaryMessenger: registrar.messenger()) let delegate = SwiftDeltaChatCorePlugin(registrar: registrar) registrar.addMethodCallDelegate(delegate, channel: channel) }