@ -0,0 +1,3 @@ |
|||||||
|
## 0.0.1 |
||||||
|
|
||||||
|
* TODO: Describe initial release. |
@ -1,201 +1 @@ |
|||||||
Apache License |
TODO: Add your license here. |
||||||
Version 2.0, January 2004 |
|
||||||
http://www.apache.org/licenses/ |
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
|
||||||
|
|
||||||
1. Definitions. |
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction, |
|
||||||
and distribution as defined by Sections 1 through 9 of this document. |
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by |
|
||||||
the copyright owner that is granting the License. |
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all |
|
||||||
other entities that control, are controlled by, or are under common |
|
||||||
control with that entity. For the purposes of this definition, |
|
||||||
"control" means (i) the power, direct or indirect, to cause the |
|
||||||
direction or management of such entity, whether by contract or |
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity. |
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity |
|
||||||
exercising permissions granted by this License. |
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications, |
|
||||||
including but not limited to software source code, documentation |
|
||||||
source, and configuration files. |
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical |
|
||||||
transformation or translation of a Source form, including but |
|
||||||
not limited to compiled object code, generated documentation, |
|
||||||
and conversions to other media types. |
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or |
|
||||||
Object form, made available under the License, as indicated by a |
|
||||||
copyright notice that is included in or attached to the work |
|
||||||
(an example is provided in the Appendix below). |
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object |
|
||||||
form, that is based on (or derived from) the Work and for which the |
|
||||||
editorial revisions, annotations, elaborations, or other modifications |
|
||||||
represent, as a whole, an original work of authorship. For the purposes |
|
||||||
of this License, Derivative Works shall not include works that remain |
|
||||||
separable from, or merely link (or bind by name) to the interfaces of, |
|
||||||
the Work and Derivative Works thereof. |
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including |
|
||||||
the original version of the Work and any modifications or additions |
|
||||||
to that Work or Derivative Works thereof, that is intentionally |
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner |
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of |
|
||||||
the copyright owner. For the purposes of this definition, "submitted" |
|
||||||
means any form of electronic, verbal, or written communication sent |
|
||||||
to the Licensor or its representatives, including but not limited to |
|
||||||
communication on electronic mailing lists, source code control systems, |
|
||||||
and issue tracking systems that are managed by, or on behalf of, the |
|
||||||
Licensor for the purpose of discussing and improving the Work, but |
|
||||||
excluding communication that is conspicuously marked or otherwise |
|
||||||
designated in writing by the copyright owner as "Not a Contribution." |
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity |
|
||||||
on behalf of whom a Contribution has been received by Licensor and |
|
||||||
subsequently incorporated within the Work. |
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of |
|
||||||
this License, each Contributor hereby grants to You a perpetual, |
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|
||||||
copyright license to reproduce, prepare Derivative Works of, |
|
||||||
publicly display, publicly perform, sublicense, and distribute the |
|
||||||
Work and such Derivative Works in Source or Object form. |
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of |
|
||||||
this License, each Contributor hereby grants to You a perpetual, |
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|
||||||
(except as stated in this section) patent license to make, have made, |
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work, |
|
||||||
where such license applies only to those patent claims licensable |
|
||||||
by such Contributor that are necessarily infringed by their |
|
||||||
Contribution(s) alone or by combination of their Contribution(s) |
|
||||||
with the Work to which such Contribution(s) was submitted. If You |
|
||||||
institute patent litigation against any entity (including a |
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
|
||||||
or a Contribution incorporated within the Work constitutes direct |
|
||||||
or contributory patent infringement, then any patent licenses |
|
||||||
granted to You under this License for that Work shall terminate |
|
||||||
as of the date such litigation is filed. |
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the |
|
||||||
Work or Derivative Works thereof in any medium, with or without |
|
||||||
modifications, and in Source or Object form, provided that You |
|
||||||
meet the following conditions: |
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or |
|
||||||
Derivative Works a copy of this License; and |
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices |
|
||||||
stating that You changed the files; and |
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works |
|
||||||
that You distribute, all copyright, patent, trademark, and |
|
||||||
attribution notices from the Source form of the Work, |
|
||||||
excluding those notices that do not pertain to any part of |
|
||||||
the Derivative Works; and |
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its |
|
||||||
distribution, then any Derivative Works that You distribute must |
|
||||||
include a readable copy of the attribution notices contained |
|
||||||
within such NOTICE file, excluding those notices that do not |
|
||||||
pertain to any part of the Derivative Works, in at least one |
|
||||||
of the following places: within a NOTICE text file distributed |
|
||||||
as part of the Derivative Works; within the Source form or |
|
||||||
documentation, if provided along with the Derivative Works; or, |
|
||||||
within a display generated by the Derivative Works, if and |
|
||||||
wherever such third-party notices normally appear. The contents |
|
||||||
of the NOTICE file are for informational purposes only and |
|
||||||
do not modify the License. You may add Your own attribution |
|
||||||
notices within Derivative Works that You distribute, alongside |
|
||||||
or as an addendum to the NOTICE text from the Work, provided |
|
||||||
that such additional attribution notices cannot be construed |
|
||||||
as modifying the License. |
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and |
|
||||||
may provide additional or different license terms and conditions |
|
||||||
for use, reproduction, or distribution of Your modifications, or |
|
||||||
for any such Derivative Works as a whole, provided Your use, |
|
||||||
reproduction, and distribution of the Work otherwise complies with |
|
||||||
the conditions stated in this License. |
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise, |
|
||||||
any Contribution intentionally submitted for inclusion in the Work |
|
||||||
by You to the Licensor shall be under the terms and conditions of |
|
||||||
this License, without any additional terms or conditions. |
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify |
|
||||||
the terms of any separate license agreement you may have executed |
|
||||||
with Licensor regarding such Contributions. |
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade |
|
||||||
names, trademarks, service marks, or product names of the Licensor, |
|
||||||
except as required for reasonable and customary use in describing the |
|
||||||
origin of the Work and reproducing the content of the NOTICE file. |
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or |
|
||||||
agreed to in writing, Licensor provides the Work (and each |
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS, |
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|
||||||
implied, including, without limitation, any warranties or conditions |
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the |
|
||||||
appropriateness of using or redistributing the Work and assume any |
|
||||||
risks associated with Your exercise of permissions under this License. |
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory, |
|
||||||
whether in tort (including negligence), contract, or otherwise, |
|
||||||
unless required by applicable law (such as deliberate and grossly |
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be |
|
||||||
liable to You for damages, including any direct, indirect, special, |
|
||||||
incidental, or consequential damages of any character arising as a |
|
||||||
result of this License or out of the use or inability to use the |
|
||||||
Work (including but not limited to damages for loss of goodwill, |
|
||||||
work stoppage, computer failure or malfunction, or any and all |
|
||||||
other commercial damages or losses), even if such Contributor |
|
||||||
has been advised of the possibility of such damages. |
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing |
|
||||||
the Work or Derivative Works thereof, You may choose to offer, |
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity, |
|
||||||
or other liability obligations and/or rights consistent with this |
|
||||||
License. However, in accepting such obligations, You may act only |
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf |
|
||||||
of any other Contributor, and only if You agree to indemnify, |
|
||||||
defend, and hold each Contributor harmless for any liability |
|
||||||
incurred by, or claims asserted against, such Contributor by reason |
|
||||||
of your accepting any such warranty or additional liability. |
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS |
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work. |
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following |
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]" |
|
||||||
replaced with your own identifying information. (Don't include |
|
||||||
the brackets!) The text should be enclosed in the appropriate |
|
||||||
comment syntax for the file format. We also recommend that a |
|
||||||
file or class name and description of purpose be included on the |
|
||||||
same "printed page" as the copyright notice for easier |
|
||||||
identification within third-party archives. |
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner] |
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); |
|
||||||
you may not use this file except in compliance with the License. |
|
||||||
You may obtain a copy of the License at |
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0 |
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software |
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, |
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
||||||
See the License for the specific language governing permissions and |
|
||||||
limitations under the License. |
|
||||||
|
@ -0,0 +1,15 @@ |
|||||||
|
# flutter_openim_sdk |
||||||
|
|
||||||
|
A new Flutter project. |
||||||
|
|
||||||
|
## Getting Started |
||||||
|
|
||||||
|
This project is a starting point for a Flutter |
||||||
|
[plug-in package](https://flutter.dev/developing-packages/), |
||||||
|
a specialized package that includes platform-specific implementation code for |
||||||
|
Android and/or iOS. |
||||||
|
|
||||||
|
For help getting started with Flutter, view our |
||||||
|
[online documentation](https://flutter.dev/docs), which offers tutorials, |
||||||
|
samples, guidance on mobile development, and a full API reference. |
||||||
|
|
@ -0,0 +1,8 @@ |
|||||||
|
*.iml |
||||||
|
.gradle |
||||||
|
/local.properties |
||||||
|
/.idea/workspace.xml |
||||||
|
/.idea/libraries |
||||||
|
.DS_Store |
||||||
|
/build |
||||||
|
/captures |
@ -0,0 +1,52 @@ |
|||||||
|
group 'io.openim.flutter_openim_sdk' |
||||||
|
version '1.0' |
||||||
|
|
||||||
|
buildscript { |
||||||
|
repositories { |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } |
||||||
|
google() |
||||||
|
maven { |
||||||
|
url 'http://127.0.0.1:8081/repository/maven-releases/' //这个路径就是Browse下maven-release右边有一个copy按钮,复制出来的。 |
||||||
|
} |
||||||
|
mavenCentral() |
||||||
|
} |
||||||
|
|
||||||
|
dependencies { |
||||||
|
classpath 'com.android.tools.build:gradle:3.5.1' |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
rootProject.allprojects { |
||||||
|
repositories { |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } |
||||||
|
google() |
||||||
|
maven { |
||||||
|
url 'http://127.0.0.1:8081/repository/maven-releases' //这个路径就是Browse下maven-release右边有一个copy按钮,复制出来的。 |
||||||
|
} |
||||||
|
mavenCentral() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
apply plugin: 'com.android.library' |
||||||
|
|
||||||
|
android { |
||||||
|
compileSdkVersion 30 |
||||||
|
|
||||||
|
defaultConfig { |
||||||
|
minSdkVersion 21 |
||||||
|
} |
||||||
|
compileOptions { |
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8 |
||||||
|
targetCompatibility JavaVersion.VERSION_1_8 |
||||||
|
} |
||||||
|
} |
||||||
|
dependencies { |
||||||
|
implementation 'com.alibaba:fastjson:1.1.72.android' |
||||||
|
implementation 'io.openim:localsdk:1.1.4@aar'//graoupId:artifactId:version@aar |
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
org.gradle.jvmargs=-Xmx1536M |
||||||
|
android.useAndroidX=true |
||||||
|
android.enableJetifier=true |
||||||
|
android.enableDexingArtifactTransform=false |
@ -0,0 +1,5 @@ |
|||||||
|
distributionBase=GRADLE_USER_HOME |
||||||
|
distributionPath=wrapper/dists |
||||||
|
zipStoreBase=GRADLE_USER_HOME |
||||||
|
zipStorePath=wrapper/dists |
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip |
@ -0,0 +1 @@ |
|||||||
|
rootProject.name = 'flutter_openim_sdk' |
@ -0,0 +1,3 @@ |
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
package="io.openim.flutter_openim_sdk"> |
||||||
|
</manifest> |
@ -0,0 +1,82 @@ |
|||||||
|
package io.openim.flutter_openim_sdk; |
||||||
|
|
||||||
|
import android.content.Context; |
||||||
|
|
||||||
|
import androidx.annotation.NonNull; |
||||||
|
|
||||||
|
import java.lang.reflect.Field; |
||||||
|
import java.lang.reflect.InvocationTargetException; |
||||||
|
import java.lang.reflect.Method; |
||||||
|
|
||||||
|
import io.flutter.embedding.engine.plugins.FlutterPlugin; |
||||||
|
import io.flutter.plugin.common.EventChannel; |
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.flutter.plugin.common.MethodChannel.MethodCallHandler; |
||||||
|
import io.flutter.plugin.common.MethodChannel.Result; |
||||||
|
import io.openim.flutter_openim_sdk.manager.ConversationManager; |
||||||
|
import io.openim.flutter_openim_sdk.manager.FriendshipManager; |
||||||
|
import io.openim.flutter_openim_sdk.manager.IMManager; |
||||||
|
import io.openim.flutter_openim_sdk.manager.MessageManager; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* FlutterOpenimSdkPlugin |
||||||
|
*/ |
||||||
|
public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler { |
||||||
|
/// The MethodChannel that will the communication between Flutter and native Android
|
||||||
|
///
|
||||||
|
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
||||||
|
/// when the Flutter Engine is detached from the Activity
|
||||||
|
public static MethodChannel channel; |
||||||
|
private static IMManager imManager; |
||||||
|
private static FriendshipManager friendshipManager; |
||||||
|
private static MessageManager messageManager; |
||||||
|
private static ConversationManager conversationManager; |
||||||
|
|
||||||
|
public FlutterOpenimSdkPlugin() { |
||||||
|
} |
||||||
|
|
||||||
|
private FlutterOpenimSdkPlugin(Context context, MethodChannel channel) { |
||||||
|
FlutterOpenimSdkPlugin.imManager = new IMManager(channel); |
||||||
|
FlutterOpenimSdkPlugin.friendshipManager = new FriendshipManager(channel); |
||||||
|
FlutterOpenimSdkPlugin.messageManager = new MessageManager(channel); |
||||||
|
FlutterOpenimSdkPlugin.conversationManager = new ConversationManager(channel); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) { |
||||||
|
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_openim_sdk"); |
||||||
|
channel.setMethodCallHandler(new FlutterOpenimSdkPlugin(flutterPluginBinding.getApplicationContext(), channel)); |
||||||
|
// channel.setMethodCallHandler(this);
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { |
||||||
|
parse(call, result); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { |
||||||
|
channel.setMethodCallHandler(null); |
||||||
|
} |
||||||
|
|
||||||
|
void parse(@NonNull MethodCall call, @NonNull Result result) { |
||||||
|
try { |
||||||
|
String managerName = CommonUtil.getParamValue(call, "ManagerName"); |
||||||
|
Field field = FlutterOpenimSdkPlugin.class.getDeclaredField(managerName); |
||||||
|
Method method = field.get(new Object()).getClass().getDeclaredMethod(call.method, MethodCall.class, Result.class); |
||||||
|
System.out.println("flutter call native { class:" + managerName + ", method:" + method.getName() + " }"); |
||||||
|
method.invoke(field.get(new Object()), call, result); |
||||||
|
} catch (NoSuchFieldException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} catch (NoSuchMethodException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} catch (IllegalAccessException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} catch (InvocationTargetException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.listener; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.OnAdvancedMsgListener; |
||||||
|
|
||||||
|
public class AdvancedMsgListenerImpl implements OnAdvancedMsgListener { |
||||||
|
final MethodChannel channel; |
||||||
|
final Map<String, String> values = new HashMap<>(); |
||||||
|
|
||||||
|
public AdvancedMsgListenerImpl(MethodChannel channel, String id) { |
||||||
|
this.channel = channel; |
||||||
|
this.values.put("id", id); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onRecvC2CReadReceipt(String s) { |
||||||
|
values.put("message", s); |
||||||
|
CommonUtil.emitEvent(channel, "advancedMsgListener", "onRecvC2CReadReceipt", values); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onRecvMessageRevoked(String s) { |
||||||
|
values.put("message", s); |
||||||
|
CommonUtil.emitEvent(channel, "advancedMsgListener", "onRecvMessageRevoked", values); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onRecvNewMessage(String s) { |
||||||
|
values.put("message", s); |
||||||
|
CommonUtil.emitEvent(channel, "advancedMsgListener", "onRecvNewMessage", values); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.listener; |
||||||
|
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.Base; |
||||||
|
|
||||||
|
public class BaseImpl implements Base { |
||||||
|
|
||||||
|
MethodChannel.Result result; |
||||||
|
|
||||||
|
public BaseImpl(MethodChannel.Result result) { |
||||||
|
this.result = result; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onError(long l, String s) { |
||||||
|
System.out.println("BaseImpl:" + s); |
||||||
|
CommonUtil.runMainThreadReturnError(result, l, s, null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onSuccess(String s) { |
||||||
|
System.out.println("BaseImpl:" + s); |
||||||
|
CommonUtil.runMainThreadReturn(result, s); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,43 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.listener; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.OnConversationListener; |
||||||
|
|
||||||
|
public class ConversationListenerImpl implements OnConversationListener { |
||||||
|
private final MethodChannel channel; |
||||||
|
|
||||||
|
public ConversationListenerImpl(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onConversationChanged(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "conversationListener", "onConversationChanged", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onNewConversation(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "conversationListener", "onNewConversation", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onSyncServerFailed() { |
||||||
|
CommonUtil.emitEvent(channel, "conversationListener", "onSyncServerFailed", null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onSyncServerFinish() { |
||||||
|
CommonUtil.emitEvent(channel, "conversationListener", "onSyncServerFinish", null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onSyncServerStart() { |
||||||
|
CommonUtil.emitEvent(channel, "conversationListener", "onSyncServerStart", null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onTotalUnreadMessageCountChanged(int i) { |
||||||
|
CommonUtil.emitEvent(channel, "conversationListener", "onTotalUnreadMessageCountChanged", i); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,58 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.listener; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.OnFriendshipListener; |
||||||
|
|
||||||
|
public class FriendshipListenerImpl implements OnFriendshipListener { |
||||||
|
private final MethodChannel channel; |
||||||
|
|
||||||
|
public FriendshipListenerImpl(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onBlackListAdd(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onBlackListAdd", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onBlackListDeleted(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onBlackListDeleted", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendApplicationListAccept(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListAccept", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendApplicationListAdded(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListAdded", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendApplicationListDeleted(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListDeleted", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendApplicationListReject(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendApplicationListReject", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendInfoChanged(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendInfoChanged", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendListAdded(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendListAdded", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onFriendListDeleted(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "friendListener", "onFriendListDeleted", s); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,44 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.listener; |
||||||
|
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.IMSDKListener; |
||||||
|
|
||||||
|
public class SDKListenerImpl implements IMSDKListener { |
||||||
|
final private MethodChannel channel; |
||||||
|
|
||||||
|
public SDKListenerImpl(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onConnectFailed(long l, String s) { |
||||||
|
CommonUtil.emitEvent(channel, "initSDKListener", "onConnectFailed", l, s, null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onConnectSuccess() { |
||||||
|
CommonUtil.emitEvent(channel, "initSDKListener", "onConnectSuccess", null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onConnecting() { |
||||||
|
CommonUtil.emitEvent(channel, "initSDKListener", "onConnecting", null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onKickedOffline() { |
||||||
|
CommonUtil.emitEvent(channel, "initSDKListener", "onKickedOffline", null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onSelfInfoUpdated(String s) { |
||||||
|
CommonUtil.emitEvent(channel, "initSDKListener", "onSelfInfoUpdated", s); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onUserTokenExpired() { |
||||||
|
CommonUtil.emitEvent(channel, "initSDKListener", "onUserTokenExpired", null); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,45 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.listener; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.SendMsgCallBack; |
||||||
|
|
||||||
|
public class SendMsgProgressListener implements SendMsgCallBack { |
||||||
|
|
||||||
|
|
||||||
|
public SendMsgProgressListener(MethodChannel.Result result, MethodChannel channel, MethodCall call) { |
||||||
|
this.result = result; |
||||||
|
this.channel = channel; |
||||||
|
this.call = call; |
||||||
|
} |
||||||
|
|
||||||
|
final private MethodChannel.Result result; |
||||||
|
final private MethodChannel channel; |
||||||
|
final private MethodCall call; |
||||||
|
final Map<String, Object> values = new HashMap<>(); |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public void onError(long l, String s) { |
||||||
|
System.out.println("=================onError============" + s); |
||||||
|
CommonUtil.runMainThreadReturnError(result, l, s, null); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onProgress(long l) { |
||||||
|
System.out.println("================onProgress============" + l); |
||||||
|
values.put("clientMsgID", CommonUtil.getSendMessageClientMsgID(call)); |
||||||
|
values.put("progress", l); |
||||||
|
CommonUtil.emitEvent(channel, "messageProgressListener", "onProgress", values); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onSuccess(String s) { |
||||||
|
System.out.println("=================onSuccess============" + s); |
||||||
|
CommonUtil.runMainThreadReturn(result, s); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,48 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.manager; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.listener.BaseImpl; |
||||||
|
import io.openim.flutter_openim_sdk.listener.ConversationListenerImpl; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.Open_im_sdk; |
||||||
|
|
||||||
|
public class ConversationManager { |
||||||
|
final private MethodChannel channel; |
||||||
|
|
||||||
|
public ConversationManager(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
public void setConversationListener(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.setConversationListener(new ConversationListenerImpl(channel)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getAllConversationList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getAllConversationList(new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getOneConversation(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getOneConversation(CommonUtil.getConversationId(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getMultipleConversation(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getMultipleConversation(CommonUtil.getConversationIds(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void deleteConversation(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.deleteConversation(CommonUtil.getConversationId(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void setConversationDraft(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.setConversationDraft(CommonUtil.getConversationId(methodCall), CommonUtil.getConversationDraft(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void pinConversation(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.pinConversation(CommonUtil.getConversationId(methodCall), CommonUtil.isPinnedConversation(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getTotalUnreadMsgCount(new BaseImpl(result)); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,81 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.manager; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.listener.BaseImpl; |
||||||
|
import io.openim.flutter_openim_sdk.listener.FriendshipListenerImpl; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.Open_im_sdk; |
||||||
|
|
||||||
|
public class FriendshipManager { |
||||||
|
|
||||||
|
final private MethodChannel channel; |
||||||
|
|
||||||
|
public FriendshipManager(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
public void setFriendListener(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.setFriendListener(new FriendshipListenerImpl(channel)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getFriendsInfo(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getFriendsInfo(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void addFriend(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.addFriend(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getFriendApplicationList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getFriendApplicationList(new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getFriendList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getFriendList(new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void setFriendInfo(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.setFriendInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void addToBlackList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.addToBlackList(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getBlackList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getBlackList(new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void deleteFromBlackList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.deleteFromBlackList(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void checkFriend(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.checkFriend(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void deleteFromFriendList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.deleteFromFriendList(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void acceptFriendApplication(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.acceptFriendApplication(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void refuseFriendApplication(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.refuseFriendApplication(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void forceSyncFriendApplication(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.forceSyncFriendApplication(); |
||||||
|
} |
||||||
|
|
||||||
|
public void forceSyncFriend(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.forceSyncFriend(); |
||||||
|
} |
||||||
|
|
||||||
|
public void forceSyncBlackList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.forceSyncBlackList(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,50 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.manager; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.listener.BaseImpl; |
||||||
|
import io.openim.flutter_openim_sdk.listener.SDKListenerImpl; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.Open_im_sdk; |
||||||
|
|
||||||
|
public class IMManager { |
||||||
|
|
||||||
|
final private MethodChannel channel; |
||||||
|
|
||||||
|
public IMManager(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
public void initSDK(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.initSDK(CommonUtil.getSDKJsonParam(methodCall), new SDKListenerImpl(channel)); |
||||||
|
CommonUtil.runMainThreadReturn(result, null); |
||||||
|
} |
||||||
|
|
||||||
|
public void login(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.login(CommonUtil.getUid(methodCall), CommonUtil.getToken(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void logout(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.logout(new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getLoginStatus(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus()); |
||||||
|
} |
||||||
|
|
||||||
|
public void getLoginUid(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginUid()); |
||||||
|
} |
||||||
|
|
||||||
|
public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getUsersInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.setSelfInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result)); |
||||||
|
} |
||||||
|
|
||||||
|
public void forceSyncLoginUerInfo(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.forceSyncLoginUerInfo(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,108 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.manager; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.listener.AdvancedMsgListenerImpl; |
||||||
|
import io.openim.flutter_openim_sdk.listener.BaseImpl; |
||||||
|
import io.openim.flutter_openim_sdk.listener.SendMsgProgressListener; |
||||||
|
import io.openim.flutter_openim_sdk.util.CommonUtil; |
||||||
|
import open_im_sdk.OnAdvancedMsgListener; |
||||||
|
import open_im_sdk.Open_im_sdk; |
||||||
|
|
||||||
|
|
||||||
|
public class MessageManager { |
||||||
|
private final static String KEY_ID = "id"; |
||||||
|
private final MethodChannel channel; |
||||||
|
private final static Map<String, OnAdvancedMsgListener> listeners = new HashMap<>(); |
||||||
|
|
||||||
|
|
||||||
|
public MessageManager(MethodChannel channel) { |
||||||
|
this.channel = channel; |
||||||
|
} |
||||||
|
|
||||||
|
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
String key = methodCall.argument(KEY_ID); |
||||||
|
if (!listeners.containsKey(key)) { |
||||||
|
AdvancedMsgListenerImpl listener = new AdvancedMsgListenerImpl(channel, key); |
||||||
|
listeners.put(methodCall.argument(KEY_ID), listener); |
||||||
|
Open_im_sdk.addAdvancedMsgListener(listener); |
||||||
|
System.out.println("=================add msg listener======" + listener); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public void removeAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
String key = methodCall.argument(KEY_ID); |
||||||
|
OnAdvancedMsgListener listener = listeners.remove(key); |
||||||
|
Open_im_sdk.removeAdvancedMsgListener(listener); |
||||||
|
System.out.println("=================remove msg listener======" + listener); |
||||||
|
} |
||||||
|
|
||||||
|
public void sendMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
SendMsgProgressListener listener = new SendMsgProgressListener(result, channel, methodCall); |
||||||
|
System.out.println("===============sendMessage==============="); |
||||||
|
Open_im_sdk.sendMessage(listener, CommonUtil.getSendMessageContent(methodCall), CommonUtil.getSendMessageReceiver(methodCall), CommonUtil.geSendMessageGroupId(methodCall), CommonUtil.getSendMessageOnlineOnly(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void getHistoryMessageList(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.getHistoryMessageList(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void revokeMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.revokeMessage(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void deleteMessageFromLocalStorage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.deleteMessageFromLocalStorage(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void deleteMessages(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
// Open_im_sdk.deleteMessages(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||||
|
} |
||||||
|
|
||||||
|
public void insertSingleMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.insertSingleMessageToLocalStorage(new BaseImpl(result), CommonUtil.getSingleMessageContent(methodCall), CommonUtil.getSingleMessageUserid(methodCall), CommonUtil.getSingleMessageSender(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void findMessages(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.findMessages(new BaseImpl(result), CommonUtil.getFindMessageIds(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void markSingleMessageHasRead(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
Open_im_sdk.markSingleMessageHasRead(new BaseImpl(result), CommonUtil.getSingleMessageUserid(methodCall)); |
||||||
|
} |
||||||
|
|
||||||
|
public void createTextMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createTextMessage(CommonUtil.getMessageText(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createTextAtMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createTextAtMessage(CommonUtil.getMessageText(methodCall), CommonUtil.getAtUserList(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createImageMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createImageMessage(CommonUtil.getImagePath(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createSoundMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createSoundMessage(CommonUtil.getSoundPath(methodCall), CommonUtil.getSoundDuration(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createVideoMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createVideoMessage(CommonUtil.getVideoPath(methodCall), CommonUtil.getVideoType(methodCall), CommonUtil.getVideoDuration(methodCall), CommonUtil.getVideoSnapshotPath(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createFileMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createFileMessage(CommonUtil.getFilePath(methodCall), CommonUtil.getFileName(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createMergerMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createMergerMessage(CommonUtil.getMergerMessageList(methodCall), CommonUtil.getMergerMessageTitle(methodCall), CommonUtil.getSummaryList(methodCall))); |
||||||
|
} |
||||||
|
|
||||||
|
public void createForwardMessage(MethodCall methodCall, MethodChannel.Result result) { |
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createForwardMessage(CommonUtil.getForwardMessage(methodCall))); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,286 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.util; |
||||||
|
|
||||||
|
import android.os.Handler; |
||||||
|
import android.os.Looper; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodCall; |
||||||
|
import io.flutter.plugin.common.MethodChannel; |
||||||
|
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin; |
||||||
|
|
||||||
|
|
||||||
|
public class CommonUtil { |
||||||
|
/** |
||||||
|
* 主线程处理器 |
||||||
|
*/ |
||||||
|
private final static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper()); |
||||||
|
|
||||||
|
public static <T> T getParamValue(MethodCall methodCall, String param) { |
||||||
|
return methodCall.argument(param); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSDKJsonParam(MethodCall methodCall, String key) { |
||||||
|
return JsonUtil.toString(methodCall.argument(key)); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSDKJsonParam(MethodCall methodCall) { |
||||||
|
return JsonUtil.toString(methodCall.arguments); |
||||||
|
} |
||||||
|
|
||||||
|
public static void runMainThreadReturn(final MethodChannel.Result result, final Object param) { |
||||||
|
MAIN_HANDLER.post(new Runnable() { |
||||||
|
@Override |
||||||
|
public void run() { |
||||||
|
result.success(param); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
public static void runMainThread(Runnable runnable) { |
||||||
|
MAIN_HANDLER.post(runnable); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 运行主线程返回错误结果执行 |
||||||
|
* |
||||||
|
* @param result 返回结果对象 |
||||||
|
* @param errorCode 错误码 |
||||||
|
* @param errorMessage 错误信息 |
||||||
|
* @param errorDetails 错误内容 |
||||||
|
*/ |
||||||
|
public static void runMainThreadReturnError(final MethodChannel.Result result, final String errorCode, final String errorMessage, final Object errorDetails) { |
||||||
|
MAIN_HANDLER.post(new Runnable() { |
||||||
|
@Override |
||||||
|
public void run() { |
||||||
|
result.error(errorCode, errorMessage, errorDetails); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
public static void runMainThreadReturnError(final MethodChannel.Result result, final long errorCode, final String errorMessage, final Object errorDetails) { |
||||||
|
runMainThreadReturnError(result, String.valueOf(errorCode), errorMessage, errorDetails); |
||||||
|
} |
||||||
|
|
||||||
|
/* |
||||||
|
|
||||||
|
public static void returnError(final MethodChannel.Result result, int i, String s) { |
||||||
|
HashMap<String, Object> err = new HashMap<String, Object>(); |
||||||
|
err.put("code", i); |
||||||
|
err.put("desc", s); |
||||||
|
result.success(err); |
||||||
|
} |
||||||
|
|
||||||
|
public static void returnError(final MethodChannel.Result result, int i, String s, HashMap<String, Object> data) { |
||||||
|
HashMap<String, Object> err = new HashMap<String, Object>(); |
||||||
|
err.put("code", i); |
||||||
|
err.put("desc", s); |
||||||
|
err.put("data", data); |
||||||
|
result.success(err); |
||||||
|
} |
||||||
|
|
||||||
|
public static <T> void returnSuccess(final MethodChannel.Result result, T data) { |
||||||
|
HashMap<String, Object> succ = new HashMap<String, Object>(); |
||||||
|
succ.put("code", 0); |
||||||
|
succ.put("desc", "ok"); |
||||||
|
succ.put("data", data); |
||||||
|
result.success(succ); |
||||||
|
} |
||||||
|
*/ |
||||||
|
|
||||||
|
|
||||||
|
public static <T> void emitEvent(MethodChannel channel, String method, String type, Long errCode, String errMsg, T data) { |
||||||
|
runMainThread(new Runnable() { |
||||||
|
@Override |
||||||
|
public void run() { |
||||||
|
HashMap<String, Object> res = new HashMap<String, Object>(); |
||||||
|
// if (null != type) {
|
||||||
|
res.put("type", type); |
||||||
|
// }
|
||||||
|
if (null != data) { |
||||||
|
res.put("data", data); |
||||||
|
} |
||||||
|
if (null != errCode) { |
||||||
|
res.put("errCode", errCode); |
||||||
|
} |
||||||
|
if (null != errMsg) { |
||||||
|
res.put("errMsg", errMsg); |
||||||
|
} |
||||||
|
System.out.println("native call flutter { method:" + method + ", type:" + type + " }"); |
||||||
|
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
public static <T> void emitEvent(MethodChannel channel, String method, String type, T data) { |
||||||
|
emitEvent(channel, method, type, null, null, data); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////
|
||||||
|
//////////////////////////////////////
|
||||||
|
public static String getUid(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_LOGIN_UID); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getToken(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_LOGIN_TOKEN); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getMessageText(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_TEXT); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getAtUserList(MethodCall methodCall) { |
||||||
|
// return methodCall.argument(KEY_AT_USER_LIST);
|
||||||
|
return getSDKJsonParam(methodCall, KEY_AT_USER_LIST); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getImagePath(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_IMAGE_PATH); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSoundPath(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SOUND_PATH); |
||||||
|
} |
||||||
|
|
||||||
|
public static long getSoundDuration(MethodCall methodCall) { |
||||||
|
Integer i = getParamValue(methodCall, KEY_SOUND_DURATION); |
||||||
|
return Long.valueOf(i); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getVideoPath(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_VIDEO_PATH); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getVideoType(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_VIDEO_TYPE); |
||||||
|
} |
||||||
|
|
||||||
|
public static long getVideoDuration(MethodCall methodCall) { |
||||||
|
Integer i = getParamValue(methodCall, KEY_VIDEO_DURATION); |
||||||
|
return Long.valueOf(i); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getVideoSnapshotPath(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_VIDEO_SNAPSHOT_PATH); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getFilePath(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_FILE_PATH); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getFileName(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_FILE_NAME); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getMergerMessageList(MethodCall methodCall) { |
||||||
|
// return methodCall.argument(KEY_MERGER_MESSAGE_LIST);
|
||||||
|
return getSDKJsonParam(methodCall, KEY_MERGER_MESSAGE_LIST); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getMergerMessageTitle(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_MERGER_MESSAGE_TITLE); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSummaryList(MethodCall methodCall) { |
||||||
|
// return methodCall.argument(KEY_SUMMARY_LIST);
|
||||||
|
return getSDKJsonParam(methodCall, KEY_SUMMARY_LIST); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getForwardMessage(MethodCall methodCall) { |
||||||
|
// return methodCall.argument(KEY_FORWARD_MESSAGE);
|
||||||
|
return getSDKJsonParam(methodCall, KEY_FORWARD_MESSAGE); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSendMessageContent(MethodCall methodCall) { |
||||||
|
return getSDKJsonParam(methodCall, KEY_SEND_MESSAGE_CONTENT); |
||||||
|
} |
||||||
|
|
||||||
|
public static Object getSendMessageClientMsgID(MethodCall methodCall) { |
||||||
|
Map<String, Object> map = getParamValue(methodCall, KEY_SEND_MESSAGE_CONTENT); |
||||||
|
return map.get(KEY_SEND_MESSAGE_CONTENT_CLIENT_ID); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSendMessageReceiver(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SEND_MESSAGE_RECEIVER); |
||||||
|
} |
||||||
|
|
||||||
|
public static String geSendMessageGroupId(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SEND_MESSAGE_GROUP_ID); |
||||||
|
} |
||||||
|
|
||||||
|
public static boolean getSendMessageOnlineOnly(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SEND_MESSAGE_ONLINE_ONLY); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSingleMessageContent(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_CONTENT); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSingleMessageUserid(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_USERID); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getSingleMessageSender(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_SINGLE_MESSAGE_SENDER); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getFindMessageIds(MethodCall methodCall) { |
||||||
|
return getSDKJsonParam(methodCall, KEY_FIND_MESSAGE_IDS); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getConversationId(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_CONVERSATION_ID); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getConversationIds(MethodCall methodCall) { |
||||||
|
return getSDKJsonParam(methodCall, KEY_CONVERSATION_IDS); |
||||||
|
} |
||||||
|
|
||||||
|
public static String getConversationDraft(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_CONVERSATION_DRAFT); |
||||||
|
} |
||||||
|
|
||||||
|
public static boolean isPinnedConversation(MethodCall methodCall) { |
||||||
|
return getParamValue(methodCall, KEY_CONVERSATION_PINNED); |
||||||
|
} |
||||||
|
|
||||||
|
//login
|
||||||
|
final static String KEY_LOGIN_UID = "uid"; |
||||||
|
final static String KEY_LOGIN_TOKEN = "token"; |
||||||
|
//create message body
|
||||||
|
final static String KEY_TEXT = "text"; |
||||||
|
final static String KEY_AT_USER_LIST = "atUserList"; |
||||||
|
final static String KEY_IMAGE_PATH = "imagePath"; |
||||||
|
final static String KEY_SOUND_PATH = "soundPath"; |
||||||
|
final static String KEY_SOUND_DURATION = "duration"; |
||||||
|
final static String KEY_VIDEO_PATH = "videoPath"; |
||||||
|
final static String KEY_VIDEO_TYPE = "videoType"; |
||||||
|
final static String KEY_VIDEO_DURATION = "duration"; |
||||||
|
final static String KEY_VIDEO_SNAPSHOT_PATH = "snapshotPath"; |
||||||
|
final static String KEY_FILE_PATH = "filePath"; |
||||||
|
final static String KEY_FILE_NAME = "fileName"; |
||||||
|
final static String KEY_MERGER_MESSAGE_LIST = "messageList"; |
||||||
|
final static String KEY_MERGER_MESSAGE_TITLE = "title"; |
||||||
|
final static String KEY_SUMMARY_LIST = "summaryList"; |
||||||
|
final static String KEY_FORWARD_MESSAGE = "message"; |
||||||
|
//send message
|
||||||
|
final static String KEY_SEND_MESSAGE_CONTENT = "message"; |
||||||
|
final static String KEY_SEND_MESSAGE_CONTENT_CLIENT_ID = "clientMsgID"; |
||||||
|
final static String KEY_SEND_MESSAGE_RECEIVER = "receiver"; |
||||||
|
final static String KEY_SEND_MESSAGE_GROUP_ID = "groupID"; |
||||||
|
final static String KEY_SEND_MESSAGE_ONLINE_ONLY = "onlineUserOnly"; |
||||||
|
//single chat
|
||||||
|
final static String KEY_SINGLE_MESSAGE_CONTENT = "message"; |
||||||
|
final static String KEY_SINGLE_MESSAGE_USERID = "userID"; |
||||||
|
final static String KEY_SINGLE_MESSAGE_SENDER = "sender"; |
||||||
|
// find message
|
||||||
|
final static String KEY_FIND_MESSAGE_IDS = "messageIDList"; |
||||||
|
// conversation
|
||||||
|
final static String KEY_CONVERSATION_ID = "conversationID"; |
||||||
|
final static String KEY_CONVERSATION_IDS = "conversationIDList"; |
||||||
|
final static String KEY_CONVERSATION_DRAFT = "draftText"; |
||||||
|
final static String KEY_CONVERSATION_PINNED = "isPinned"; |
||||||
|
} |
@ -0,0 +1,70 @@ |
|||||||
|
package io.openim.flutter_openim_sdk.util; |
||||||
|
|
||||||
|
|
||||||
|
import android.text.TextUtils; |
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON; |
||||||
|
import com.alibaba.fastjson.TypeReference; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import static com.alibaba.fastjson.JSON.parseObject; |
||||||
|
|
||||||
|
public class JsonUtil { |
||||||
|
|
||||||
|
public static String toString(Object object) { |
||||||
|
if (object == null) { |
||||||
|
return ""; |
||||||
|
} |
||||||
|
try { |
||||||
|
return JSON.toJSONString(object); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return ""; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public static <T> T toObj(String jsonData, Class<T> clazz) { |
||||||
|
T t = null; |
||||||
|
if (TextUtils.isEmpty(jsonData)) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
try { |
||||||
|
t = parseObject(jsonData, clazz); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return t; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public static <T> List<T> toList(String jsonData, Class<T> clazz) { |
||||||
|
List<T> list = null; |
||||||
|
try { |
||||||
|
list = JSON.parseArray(jsonData, clazz); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return list; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* json转化为Map fastjson 使用方式 |
||||||
|
*/ |
||||||
|
public static Map toMap(String jsonData) { |
||||||
|
if (TextUtils.isEmpty(jsonData)) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
Map map = null; |
||||||
|
try { |
||||||
|
map = parseObject(jsonData, new TypeReference<Map>() { |
||||||
|
}); |
||||||
|
} catch (Exception e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return map; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,46 @@ |
|||||||
|
# Miscellaneous |
||||||
|
*.class |
||||||
|
*.log |
||||||
|
*.pyc |
||||||
|
*.swp |
||||||
|
.DS_Store |
||||||
|
.atom/ |
||||||
|
.buildlog/ |
||||||
|
.history |
||||||
|
.svn/ |
||||||
|
|
||||||
|
# IntelliJ related |
||||||
|
*.iml |
||||||
|
*.ipr |
||||||
|
*.iws |
||||||
|
.idea/ |
||||||
|
|
||||||
|
# The .vscode folder contains launch configuration and tasks you configure in |
||||||
|
# VS Code which you may wish to be included in version control, so this line |
||||||
|
# is commented out by default. |
||||||
|
#.vscode/ |
||||||
|
|
||||||
|
# Flutter/Dart/Pub related |
||||||
|
**/doc/api/ |
||||||
|
**/ios/Flutter/.last_build_id |
||||||
|
.dart_tool/ |
||||||
|
.flutter-plugins |
||||||
|
.flutter-plugins-dependencies |
||||||
|
.packages |
||||||
|
.pub-cache/ |
||||||
|
.pub/ |
||||||
|
/build/ |
||||||
|
|
||||||
|
# Web related |
||||||
|
lib/generated_plugin_registrant.dart |
||||||
|
|
||||||
|
# Symbolication related |
||||||
|
app.*.symbols |
||||||
|
|
||||||
|
# Obfuscation related |
||||||
|
app.*.map.json |
||||||
|
|
||||||
|
# Android Studio will place build artifacts here |
||||||
|
/android/app/debug |
||||||
|
/android/app/profile |
||||||
|
/android/app/release |
@ -0,0 +1,10 @@ |
|||||||
|
# This file tracks properties of this Flutter project. |
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc. |
||||||
|
# |
||||||
|
# This file should be version controlled and should not be manually edited. |
||||||
|
|
||||||
|
version: |
||||||
|
revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5 |
||||||
|
channel: stable |
||||||
|
|
||||||
|
project_type: app |
@ -0,0 +1,16 @@ |
|||||||
|
# flutter_openim_sdk_example |
||||||
|
|
||||||
|
Demonstrates how to use the flutter_openim_sdk plugin. |
||||||
|
|
||||||
|
## Getting Started |
||||||
|
|
||||||
|
This project is a starting point for a Flutter application. |
||||||
|
|
||||||
|
A few resources to get you started if this is your first Flutter project: |
||||||
|
|
||||||
|
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) |
||||||
|
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) |
||||||
|
|
||||||
|
For help getting started with Flutter, view our |
||||||
|
[online documentation](https://flutter.dev/docs), which offers tutorials, |
||||||
|
samples, guidance on mobile development, and a full API reference. |
@ -0,0 +1,11 @@ |
|||||||
|
gradle-wrapper.jar |
||||||
|
/.gradle |
||||||
|
/captures/ |
||||||
|
/gradlew |
||||||
|
/gradlew.bat |
||||||
|
/local.properties |
||||||
|
GeneratedPluginRegistrant.java |
||||||
|
|
||||||
|
# Remember to never publicly share your keystore. |
||||||
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app |
||||||
|
key.properties |
@ -0,0 +1,69 @@ |
|||||||
|
def localProperties = new Properties() |
||||||
|
def localPropertiesFile = rootProject.file('local.properties') |
||||||
|
if (localPropertiesFile.exists()) { |
||||||
|
localPropertiesFile.withReader('UTF-8') { reader -> |
||||||
|
localProperties.load(reader) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
def flutterRoot = localProperties.getProperty('flutter.sdk') |
||||||
|
if (flutterRoot == null) { |
||||||
|
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") |
||||||
|
} |
||||||
|
|
||||||
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
||||||
|
if (flutterVersionCode == null) { |
||||||
|
flutterVersionCode = '1' |
||||||
|
} |
||||||
|
|
||||||
|
def flutterVersionName = localProperties.getProperty('flutter.versionName') |
||||||
|
if (flutterVersionName == null) { |
||||||
|
flutterVersionName = '1.0' |
||||||
|
} |
||||||
|
|
||||||
|
apply plugin: 'com.android.application' |
||||||
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
||||||
|
|
||||||
|
android { |
||||||
|
compileSdkVersion 30 |
||||||
|
|
||||||
|
defaultConfig { |
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
||||||
|
applicationId "io.openim.flutter_openim_sdk_example" |
||||||
|
minSdkVersion 21 |
||||||
|
targetSdkVersion 30 |
||||||
|
versionCode flutterVersionCode.toInteger() |
||||||
|
versionName flutterVersionName |
||||||
|
} |
||||||
|
|
||||||
|
buildTypes { |
||||||
|
debug { |
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
||||||
|
} |
||||||
|
release { |
||||||
|
// TODO: Add your own signing config for the release build. |
||||||
|
// Signing with the debug keys for now, so `flutter run --release` works. |
||||||
|
// signingConfig signingConfigs.debug |
||||||
|
|
||||||
|
signingConfig signingConfigs.debug |
||||||
|
|
||||||
|
minifyEnabled false |
||||||
|
shrinkResources false |
||||||
|
|
||||||
|
useProguard true |
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
repositories{ |
||||||
|
flatDir { |
||||||
|
dirs 'libs' |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
dependencies { |
||||||
|
|
||||||
|
} |
||||||
|
flutter { |
||||||
|
source '../..' |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
package="io.openim.flutter_openim_sdk_example"> |
||||||
|
<!-- Flutter needs it to communicate with the running application |
||||||
|
to allow setting breakpoints, to provide hot reload, etc. |
||||||
|
--> |
||||||
|
<uses-permission android:name="android.permission.INTERNET"/> |
||||||
|
</manifest> |
@ -0,0 +1,41 @@ |
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
package="io.openim.flutter_openim_sdk_example"> |
||||||
|
<application |
||||||
|
android:label="flutter_openim_sdk_example" |
||||||
|
android:icon="@mipmap/ic_launcher"> |
||||||
|
<activity |
||||||
|
android:name=".MainActivity" |
||||||
|
android:launchMode="singleTop" |
||||||
|
android:theme="@style/LaunchTheme" |
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" |
||||||
|
android:hardwareAccelerated="true" |
||||||
|
android:windowSoftInputMode="adjustResize"> |
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as |
||||||
|
the Android process has started. This theme is visible to the user |
||||||
|
while the Flutter UI initializes. After that, this theme continues |
||||||
|
to determine the Window background behind the Flutter UI. --> |
||||||
|
<meta-data |
||||||
|
android:name="io.flutter.embedding.android.NormalTheme" |
||||||
|
android:resource="@style/NormalTheme" |
||||||
|
/> |
||||||
|
<!-- Displays an Android View that continues showing the launch screen |
||||||
|
Drawable until Flutter paints its first frame, then this splash |
||||||
|
screen fades out. A splash screen is useful to avoid any visual |
||||||
|
gap between the end of Android's launch screen and the painting of |
||||||
|
Flutter's first frame. --> |
||||||
|
<meta-data |
||||||
|
android:name="io.flutter.embedding.android.SplashScreenDrawable" |
||||||
|
android:resource="@drawable/launch_background" |
||||||
|
/> |
||||||
|
<intent-filter> |
||||||
|
<action android:name="android.intent.action.MAIN"/> |
||||||
|
<category android:name="android.intent.category.LAUNCHER"/> |
||||||
|
</intent-filter> |
||||||
|
</activity> |
||||||
|
<!-- Don't delete the meta-data below. |
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> |
||||||
|
<meta-data |
||||||
|
android:name="flutterEmbedding" |
||||||
|
android:value="2" /> |
||||||
|
</application> |
||||||
|
</manifest> |
@ -0,0 +1,6 @@ |
|||||||
|
package io.openim.flutter_openim_sdk_example; |
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity; |
||||||
|
|
||||||
|
public class MainActivity extends FlutterActivity { |
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<!-- Modify this file to customize your launch splash screen --> |
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
||||||
|
<item android:drawable="?android:colorBackground" /> |
||||||
|
|
||||||
|
<!-- You can insert your own image assets here --> |
||||||
|
<!-- <item> |
||||||
|
<bitmap |
||||||
|
android:gravity="center" |
||||||
|
android:src="@mipmap/launch_image" /> |
||||||
|
</item> --> |
||||||
|
</layer-list> |
@ -0,0 +1,12 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<!-- Modify this file to customize your launch splash screen --> |
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
||||||
|
<item android:drawable="@android:color/white" /> |
||||||
|
|
||||||
|
<!-- You can insert your own image assets here --> |
||||||
|
<!-- <item> |
||||||
|
<bitmap |
||||||
|
android:gravity="center" |
||||||
|
android:src="@mipmap/launch_image" /> |
||||||
|
</item> --> |
||||||
|
</layer-list> |
After Width: | Height: | Size: 544 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 721 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,18 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<resources> |
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> |
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> |
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when |
||||||
|
Flutter draws its first frame --> |
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item> |
||||||
|
</style> |
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started. |
||||||
|
This theme determines the color of the Android Window while your |
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its |
||||||
|
running. |
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. --> |
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> |
||||||
|
<item name="android:windowBackground">?android:colorBackground</item> |
||||||
|
</style> |
||||||
|
</resources> |
@ -0,0 +1,18 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<resources> |
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> |
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> |
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when |
||||||
|
Flutter draws its first frame --> |
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item> |
||||||
|
</style> |
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started. |
||||||
|
This theme determines the color of the Android Window while your |
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its |
||||||
|
running. |
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. --> |
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> |
||||||
|
<item name="android:windowBackground">?android:colorBackground</item> |
||||||
|
</style> |
||||||
|
</resources> |
@ -0,0 +1,7 @@ |
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
package="io.openim.flutter_openim_sdk_example"> |
||||||
|
<!-- Flutter needs it to communicate with the running application |
||||||
|
to allow setting breakpoints, to provide hot reload, etc. |
||||||
|
--> |
||||||
|
<uses-permission android:name="android.permission.INTERNET"/> |
||||||
|
</manifest> |
@ -0,0 +1,35 @@ |
|||||||
|
buildscript { |
||||||
|
repositories { |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } |
||||||
|
google() |
||||||
|
mavenCentral() |
||||||
|
} |
||||||
|
|
||||||
|
dependencies { |
||||||
|
classpath 'com.android.tools.build:gradle:3.5.1' |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
allprojects { |
||||||
|
repositories { |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } |
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } |
||||||
|
google() |
||||||
|
mavenCentral() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
rootProject.buildDir = '../build' |
||||||
|
subprojects { |
||||||
|
project.buildDir = "${rootProject.buildDir}/${project.name}" |
||||||
|
project.evaluationDependsOn(':app') |
||||||
|
} |
||||||
|
|
||||||
|
task clean(type: Delete) { |
||||||
|
delete rootProject.buildDir |
||||||
|
} |
@ -0,0 +1,3 @@ |
|||||||
|
org.gradle.jvmargs=-Xmx1536M |
||||||
|
android.useAndroidX=true |
||||||
|
android.enableJetifier=true |
@ -0,0 +1,6 @@ |
|||||||
|
#Fri Jun 23 08:50:38 CEST 2017 |
||||||
|
distributionBase=GRADLE_USER_HOME |
||||||
|
distributionPath=wrapper/dists |
||||||
|
zipStoreBase=GRADLE_USER_HOME |
||||||
|
zipStorePath=wrapper/dists |
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip |
@ -0,0 +1,107 @@ |
|||||||
|
#默认的proguard-android.txt已经增加了Annotation、native、view的setget方法、Activity参数为view的 方法、Enum枚举、Parcelable、R,此处不再写 |
||||||
|
#------------------------------------------通用区域---------------------------------------------------- |
||||||
|
#----------------------基本指令------------------------ |
||||||
|
-optimizationpasses 5 |
||||||
|
-dontusemixedcaseclassnames |
||||||
|
-dontskipnonpubliclibraryclasses |
||||||
|
-dontskipnonpubliclibraryclassmembers |
||||||
|
-dontpreverify |
||||||
|
-verbose |
||||||
|
-printmapping proguardMapping.txt |
||||||
|
-optimizations !code/simplification/cast,!field/*,!class/merging/* |
||||||
|
-keepattributes *Annotation*,InnerClasses |
||||||
|
-keepattributes Signature |
||||||
|
-keepattributes SourceFile,LineNumberTable |
||||||
|
|
||||||
|
#如果引用了v4或者v7包 |
||||||
|
-dontwarn android.support.** |
||||||
|
-keep class android.support.** { *; } |
||||||
|
-keep interface android.support.** { *; } |
||||||
|
-keep public class * extends android.support.** |
||||||
|
-dontwarn android.support.** |
||||||
|
|
||||||
|
#如果引用了androidx包 |
||||||
|
-keep class com.google.android.material.** {*;} |
||||||
|
-keep class androidx.** {*;} |
||||||
|
-keep public class * extends androidx.** |
||||||
|
-keep interface androidx.** {*;} |
||||||
|
-dontwarn com.google.android.material.** |
||||||
|
-dontnote com.google.android.material.** |
||||||
|
-dontwarn androidx.** |
||||||
|
|
||||||
|
#---------------------默认保留------------------------- |
||||||
|
## 基础保留 ## |
||||||
|
-keep public class * extends android.app.Fragment |
||||||
|
-keep public class * extends android.app.Activity |
||||||
|
-keep public class * extends android.app.Application |
||||||
|
-keep public class * extends android.app.Service |
||||||
|
-keep public class * extends android.content.BroadcastReceiver |
||||||
|
-keep public class * extends android.content.ContentProvider |
||||||
|
-keep public class * extends android.app.backup.BackupAgentHelper |
||||||
|
-keep public class * extends android.preference.Preference |
||||||
|
-keep public class com.android.vending.licensing.ILicensingService |
||||||
|
|
||||||
|
-keep public class * extends android.view.View { |
||||||
|
public <init>(android.content.Context); |
||||||
|
public <init>(android.content.Context, android.util.AttributeSet); |
||||||
|
public <init>(android.content.Context, android.util.AttributeSet, int); |
||||||
|
public void set*(...); |
||||||
|
} |
||||||
|
# 保持自定义控件类不被混淆 |
||||||
|
-keepclasseswithmembers class * { |
||||||
|
public <init>(android.content.Context, android.util.AttributeSet); |
||||||
|
public <init>(android.content.Context, android.util.AttributeSet, int); |
||||||
|
} |
||||||
|
#保持自定义控件类不被混淆 |
||||||
|
-keepclassmembers class * extends android.app.Activity { |
||||||
|
public void *(android.view.View); |
||||||
|
} |
||||||
|
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆 |
||||||
|
public static **[] values(); |
||||||
|
public static ** valueOf(java.lang.String); |
||||||
|
} |
||||||
|
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆 |
||||||
|
public static final android.os.Parcelable$Creator *; |
||||||
|
} |
||||||
|
-keep class * implements java.io.Serializable # 保持 Serializable 不被混淆 |
||||||
|
#保持 Serializable 不被混淆并且enum 类也不被混淆 |
||||||
|
-keepclassmembers class * implements java.io.Serializable { |
||||||
|
static final long serialVersionUID; |
||||||
|
private static final java.io.ObjectStreamField[] serialPersistentFields; |
||||||
|
!static !transient <fields>; |
||||||
|
!private <fields>; |
||||||
|
!private <methods>; |
||||||
|
private void writeObject(java.io.ObjectOutputStream); |
||||||
|
private void readObject(java.io.ObjectInputStream); |
||||||
|
java.lang.Object writeReplace(); |
||||||
|
java.lang.Object readResolve(); |
||||||
|
} |
||||||
|
#不混淆资源类 |
||||||
|
-keepclassmembers class **.R$* { |
||||||
|
public static <fields>; |
||||||
|
} |
||||||
|
# 保持 native 方法不被混淆 |
||||||
|
-keepclasseswithmembernames class * { |
||||||
|
native <methods>; |
||||||
|
} |
||||||
|
|
||||||
|
#WebView |
||||||
|
-keepclassmembers class * extends android.webkit.WebView {*;} |
||||||
|
-keepclassmembers class * extends android.webkit.WebViewClient {*;} |
||||||
|
-keepclassmembers class * extends android.webkit.WebChromeClient {*;} |
||||||
|
-keepclassmembers class * { |
||||||
|
@android.webkit.JavascriptInterface <methods>; |
||||||
|
} |
||||||
|
|
||||||
|
-keep class androidx.lifecycle.DefaultLifecycleObserver |
||||||
|
#-------------------------------------------项目定义区------------------------------------------------- |
||||||
|
#im |
||||||
|
-keep class io.openim.flutter_openim_sdk.** { *; } |
||||||
|
#Flutter Wrapper |
||||||
|
#-dontwarn io.flutter.** |
||||||
|
#-keep class io.flutter.app.** { *; } |
||||||
|
#-keep class io.flutter.plugin.** { *; } |
||||||
|
#-keep class io.flutter.util.** { *; } |
||||||
|
#-keep class io.flutter.view.** { *; } |
||||||
|
#-keep class io.flutter.** { *; } |
||||||
|
#-keep class io.flutter.plugins.** { *; } |
@ -0,0 +1,11 @@ |
|||||||
|
include ':app' |
||||||
|
|
||||||
|
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") |
||||||
|
def properties = new Properties() |
||||||
|
|
||||||
|
assert localPropertiesFile.exists() |
||||||
|
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } |
||||||
|
|
||||||
|
def flutterSdkPath = properties.getProperty("flutter.sdk") |
||||||
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" |
||||||
|
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" |
@ -0,0 +1,33 @@ |
|||||||
|
*.mode1v3 |
||||||
|
*.mode2v3 |
||||||
|
*.moved-aside |
||||||
|
*.pbxuser |
||||||
|
*.perspectivev3 |
||||||
|
**/*sync/ |
||||||
|
.sconsign.dblite |
||||||
|
.tags* |
||||||
|
**/.vagrant/ |
||||||
|
**/DerivedData/ |
||||||
|
Icon? |
||||||
|
**/Pods/ |
||||||
|
**/.symlinks/ |
||||||
|
profile |
||||||
|
xcuserdata |
||||||
|
**/.generated/ |
||||||
|
Flutter/App.framework |
||||||
|
Flutter/Flutter.framework |
||||||
|
Flutter/Flutter.podspec |
||||||
|
Flutter/Generated.xcconfig |
||||||
|
Flutter/ephemeral/ |
||||||
|
Flutter/app.flx |
||||||
|
Flutter/app.zip |
||||||
|
Flutter/flutter_assets/ |
||||||
|
Flutter/flutter_export_environment.sh |
||||||
|
ServiceDefinitions.json |
||||||
|
Runner/GeneratedPluginRegistrant.* |
||||||
|
|
||||||
|
# Exceptions to above rules. |
||||||
|
!default.mode1v3 |
||||||
|
!default.mode2v3 |
||||||
|
!default.pbxuser |
||||||
|
!default.perspectivev3 |
@ -0,0 +1,26 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||||
|
<plist version="1.0"> |
||||||
|
<dict> |
||||||
|
<key>CFBundleDevelopmentRegion</key> |
||||||
|
<string>en</string> |
||||||
|
<key>CFBundleExecutable</key> |
||||||
|
<string>App</string> |
||||||
|
<key>CFBundleIdentifier</key> |
||||||
|
<string>io.flutter.flutter.app</string> |
||||||
|
<key>CFBundleInfoDictionaryVersion</key> |
||||||
|
<string>6.0</string> |
||||||
|
<key>CFBundleName</key> |
||||||
|
<string>App</string> |
||||||
|
<key>CFBundlePackageType</key> |
||||||
|
<string>FMWK</string> |
||||||
|
<key>CFBundleShortVersionString</key> |
||||||
|
<string>1.0</string> |
||||||
|
<key>CFBundleSignature</key> |
||||||
|
<string>????</string> |
||||||
|
<key>CFBundleVersion</key> |
||||||
|
<string>1.0</string> |
||||||
|
<key>MinimumOSVersion</key> |
||||||
|
<string>8.0</string> |
||||||
|
</dict> |
||||||
|
</plist> |
@ -0,0 +1,2 @@ |
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" |
||||||
|
#include "Generated.xcconfig" |
@ -0,0 +1,2 @@ |
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" |
||||||
|
#include "Generated.xcconfig" |
@ -0,0 +1,41 @@ |
|||||||
|
# Uncomment this line to define a global platform for your project |
||||||
|
# platform :ios, '9.0' |
||||||
|
|
||||||
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. |
||||||
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true' |
||||||
|
|
||||||
|
project 'Runner', { |
||||||
|
'Debug' => :debug, |
||||||
|
'Profile' => :release, |
||||||
|
'Release' => :release, |
||||||
|
} |
||||||
|
|
||||||
|
def flutter_root |
||||||
|
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) |
||||||
|
unless File.exist?(generated_xcode_build_settings_path) |
||||||
|
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" |
||||||
|
end |
||||||
|
|
||||||
|
File.foreach(generated_xcode_build_settings_path) do |line| |
||||||
|
matches = line.match(/FLUTTER_ROOT\=(.*)/) |
||||||
|
return matches[1].strip if matches |
||||||
|
end |
||||||
|
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" |
||||||
|
end |
||||||
|
|
||||||
|
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) |
||||||
|
|
||||||
|
flutter_ios_podfile_setup |
||||||
|
|
||||||
|
target 'Runner' do |
||||||
|
use_frameworks! |
||||||
|
use_modular_headers! |
||||||
|
|
||||||
|
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) |
||||||
|
end |
||||||
|
|
||||||
|
post_install do |installer| |
||||||
|
installer.pods_project.targets.each do |target| |
||||||
|
flutter_additional_ios_build_settings(target) |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,471 @@ |
|||||||
|
// !$*UTF8*$! |
||||||
|
{ |
||||||
|
archiveVersion = 1; |
||||||
|
classes = { |
||||||
|
}; |
||||||
|
objectVersion = 46; |
||||||
|
objects = { |
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */ |
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; |
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; |
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; |
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; |
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; |
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; |
||||||
|
/* End PBXBuildFile section */ |
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */ |
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */ = { |
||||||
|
isa = PBXCopyFilesBuildPhase; |
||||||
|
buildActionMask = 2147483647; |
||||||
|
dstPath = ""; |
||||||
|
dstSubfolderSpec = 10; |
||||||
|
files = ( |
||||||
|
); |
||||||
|
name = "Embed Frameworks"; |
||||||
|
runOnlyForDeploymentPostprocessing = 0; |
||||||
|
}; |
||||||
|
/* End PBXCopyFilesBuildPhase section */ |
||||||
|
|
||||||
|
/* Begin PBXFileReference section */ |
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; |
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; |
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; |
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; |
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; |
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; |
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; |
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; |
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
||||||
|
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; |
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; |
||||||
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
||||||
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
||||||
|
/* End PBXFileReference section */ |
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */ |
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */ = { |
||||||
|
isa = PBXFrameworksBuildPhase; |
||||||
|
buildActionMask = 2147483647; |
||||||
|
files = ( |
||||||
|
); |
||||||
|
runOnlyForDeploymentPostprocessing = 0; |
||||||
|
}; |
||||||
|
/* End PBXFrameworksBuildPhase section */ |
||||||
|
|
||||||
|
/* Begin PBXGroup section */ |
||||||
|
9740EEB11CF90186004384FC /* Flutter */ = { |
||||||
|
isa = PBXGroup; |
||||||
|
children = ( |
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, |
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */, |
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */, |
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */, |
||||||
|
); |
||||||
|
name = Flutter; |
||||||
|
sourceTree = "<group>"; |
||||||
|
}; |
||||||
|
97C146E51CF9000F007C117D = { |
||||||
|
isa = PBXGroup; |
||||||
|
children = ( |
||||||
|
9740EEB11CF90186004384FC /* Flutter */, |
||||||
|
97C146F01CF9000F007C117D /* Runner */, |
||||||
|
97C146EF1CF9000F007C117D /* Products */, |
||||||
|
); |
||||||
|
sourceTree = "<group>"; |
||||||
|
}; |
||||||
|
97C146EF1CF9000F007C117D /* Products */ = { |
||||||
|
isa = PBXGroup; |
||||||
|
children = ( |
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */, |
||||||
|
); |
||||||
|
name = Products; |
||||||
|
sourceTree = "<group>"; |
||||||
|
}; |
||||||
|
97C146F01CF9000F007C117D /* Runner */ = { |
||||||
|
isa = PBXGroup; |
||||||
|
children = ( |
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */, |
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */, |
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, |
||||||
|
97C147021CF9000F007C117D /* Info.plist */, |
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, |
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, |
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */, |
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, |
||||||
|
); |
||||||
|
path = Runner; |
||||||
|
sourceTree = "<group>"; |
||||||
|
}; |
||||||
|
/* End PBXGroup section */ |
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */ |
||||||
|
97C146ED1CF9000F007C117D /* Runner */ = { |
||||||
|
isa = PBXNativeTarget; |
||||||
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; |
||||||
|
buildPhases = ( |
||||||
|
9740EEB61CF901F6004384FC /* Run Script */, |
||||||
|
97C146EA1CF9000F007C117D /* Sources */, |
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */, |
||||||
|
97C146EC1CF9000F007C117D /* Resources */, |
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */, |
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */, |
||||||
|
); |
||||||
|
buildRules = ( |
||||||
|
); |
||||||
|
dependencies = ( |
||||||
|
); |
||||||
|
name = Runner; |
||||||
|
productName = Runner; |
||||||
|
productReference = 97C146EE1CF9000F007C117D /* Runner.app */; |
||||||
|
productType = "com.apple.product-type.application"; |
||||||
|
}; |
||||||
|
/* End PBXNativeTarget section */ |
||||||
|
|
||||||
|
/* Begin PBXProject section */ |
||||||
|
97C146E61CF9000F007C117D /* Project object */ = { |
||||||
|
isa = PBXProject; |
||||||
|
attributes = { |
||||||
|
LastUpgradeCheck = 1020; |
||||||
|
ORGANIZATIONNAME = ""; |
||||||
|
TargetAttributes = { |
||||||
|
97C146ED1CF9000F007C117D = { |
||||||
|
CreatedOnToolsVersion = 7.3.1; |
||||||
|
LastSwiftMigration = 1100; |
||||||
|
}; |
||||||
|
}; |
||||||
|
}; |
||||||
|
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; |
||||||
|
compatibilityVersion = "Xcode 9.3"; |
||||||
|
developmentRegion = en; |
||||||
|
hasScannedForEncodings = 0; |
||||||
|
knownRegions = ( |
||||||
|
en, |
||||||
|
Base, |
||||||
|
); |
||||||
|
mainGroup = 97C146E51CF9000F007C117D; |
||||||
|
productRefGroup = 97C146EF1CF9000F007C117D /* Products */; |
||||||
|
projectDirPath = ""; |
||||||
|
projectRoot = ""; |
||||||
|
targets = ( |
||||||
|
97C146ED1CF9000F007C117D /* Runner */, |
||||||
|
); |
||||||
|
}; |
||||||
|
/* End PBXProject section */ |
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */ |
||||||
|
97C146EC1CF9000F007C117D /* Resources */ = { |
||||||
|
isa = PBXResourcesBuildPhase; |
||||||
|
buildActionMask = 2147483647; |
||||||
|
files = ( |
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, |
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, |
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, |
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, |
||||||
|
); |
||||||
|
runOnlyForDeploymentPostprocessing = 0; |
||||||
|
}; |
||||||
|
/* End PBXResourcesBuildPhase section */ |
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */ |
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { |
||||||
|
isa = PBXShellScriptBuildPhase; |
||||||
|
buildActionMask = 2147483647; |
||||||
|
files = ( |
||||||
|
); |
||||||
|
inputPaths = ( |
||||||
|
); |
||||||
|
name = "Thin Binary"; |
||||||
|
outputPaths = ( |
||||||
|
); |
||||||
|
runOnlyForDeploymentPostprocessing = 0; |
||||||
|
shellPath = /bin/sh; |
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; |
||||||
|
}; |
||||||
|
9740EEB61CF901F6004384FC /* Run Script */ = { |
||||||
|
isa = PBXShellScriptBuildPhase; |
||||||
|
buildActionMask = 2147483647; |
||||||
|
files = ( |
||||||
|
); |
||||||
|
inputPaths = ( |
||||||
|
); |
||||||
|
name = "Run Script"; |
||||||
|
outputPaths = ( |
||||||
|
); |
||||||
|
runOnlyForDeploymentPostprocessing = 0; |
||||||
|
shellPath = /bin/sh; |
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; |
||||||
|
}; |
||||||
|
/* End PBXShellScriptBuildPhase section */ |
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */ |
||||||
|
97C146EA1CF9000F007C117D /* Sources */ = { |
||||||
|
isa = PBXSourcesBuildPhase; |
||||||
|
buildActionMask = 2147483647; |
||||||
|
files = ( |
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, |
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, |
||||||
|
); |
||||||
|
runOnlyForDeploymentPostprocessing = 0; |
||||||
|
}; |
||||||
|
/* End PBXSourcesBuildPhase section */ |
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */ |
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */ = { |
||||||
|
isa = PBXVariantGroup; |
||||||
|
children = ( |
||||||
|
97C146FB1CF9000F007C117D /* Base */, |
||||||
|
); |
||||||
|
name = Main.storyboard; |
||||||
|
sourceTree = "<group>"; |
||||||
|
}; |
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { |
||||||
|
isa = PBXVariantGroup; |
||||||
|
children = ( |
||||||
|
97C147001CF9000F007C117D /* Base */, |
||||||
|
); |
||||||
|
name = LaunchScreen.storyboard; |
||||||
|
sourceTree = "<group>"; |
||||||
|
}; |
||||||
|
/* End PBXVariantGroup section */ |
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */ |
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */ = { |
||||||
|
isa = XCBuildConfiguration; |
||||||
|
buildSettings = { |
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO; |
||||||
|
CLANG_ANALYZER_NONNULL = YES; |
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
||||||
|
CLANG_CXX_LIBRARY = "libc++"; |
||||||
|
CLANG_ENABLE_MODULES = YES; |
||||||
|
CLANG_ENABLE_OBJC_ARC = YES; |
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES; |
||||||
|
CLANG_WARN_COMMA = YES; |
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES; |
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
||||||
|
CLANG_WARN_EMPTY_BODY = YES; |
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES; |
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES; |
||||||
|
CLANG_WARN_INT_CONVERSION = YES; |
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES; |
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES; |
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES; |
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
||||||
|
COPY_PHASE_STRIP = NO; |
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
||||||
|
ENABLE_NS_ASSERTIONS = NO; |
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES; |
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99; |
||||||
|
GCC_NO_COMMON_BLOCKS = YES; |
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES; |
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES; |
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES; |
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
||||||
|
MTL_ENABLE_DEBUG_INFO = NO; |
||||||
|
SDKROOT = iphoneos; |
||||||
|
SUPPORTED_PLATFORMS = iphoneos; |
||||||
|
TARGETED_DEVICE_FAMILY = "1,2"; |
||||||
|
VALIDATE_PRODUCT = YES; |
||||||
|
}; |
||||||
|
name = Profile; |
||||||
|
}; |
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */ = { |
||||||
|
isa = XCBuildConfiguration; |
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; |
||||||
|
buildSettings = { |
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
||||||
|
CLANG_ENABLE_MODULES = YES; |
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
||||||
|
ENABLE_BITCODE = NO; |
||||||
|
INFOPLIST_FILE = Runner/Info.plist; |
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample; |
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
||||||
|
SWIFT_VERSION = 5.0; |
||||||
|
VERSIONING_SYSTEM = "apple-generic"; |
||||||
|
}; |
||||||
|
name = Profile; |
||||||
|
}; |
||||||
|
97C147031CF9000F007C117D /* Debug */ = { |
||||||
|
isa = XCBuildConfiguration; |
||||||
|
buildSettings = { |
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO; |
||||||
|
CLANG_ANALYZER_NONNULL = YES; |
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
||||||
|
CLANG_CXX_LIBRARY = "libc++"; |
||||||
|
CLANG_ENABLE_MODULES = YES; |
||||||
|
CLANG_ENABLE_OBJC_ARC = YES; |
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES; |
||||||
|
CLANG_WARN_COMMA = YES; |
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES; |
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
||||||
|
CLANG_WARN_EMPTY_BODY = YES; |
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES; |
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES; |
||||||
|
CLANG_WARN_INT_CONVERSION = YES; |
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES; |
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES; |
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES; |
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
||||||
|
COPY_PHASE_STRIP = NO; |
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf; |
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES; |
||||||
|
ENABLE_TESTABILITY = YES; |
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99; |
||||||
|
GCC_DYNAMIC_NO_PIC = NO; |
||||||
|
GCC_NO_COMMON_BLOCKS = YES; |
||||||
|
GCC_OPTIMIZATION_LEVEL = 0; |
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = ( |
||||||
|
"DEBUG=1", |
||||||
|
"$(inherited)", |
||||||
|
); |
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES; |
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES; |
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES; |
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
||||||
|
MTL_ENABLE_DEBUG_INFO = YES; |
||||||
|
ONLY_ACTIVE_ARCH = YES; |
||||||
|
SDKROOT = iphoneos; |
||||||
|
TARGETED_DEVICE_FAMILY = "1,2"; |
||||||
|
}; |
||||||
|
name = Debug; |
||||||
|
}; |
||||||
|
97C147041CF9000F007C117D /* Release */ = { |
||||||
|
isa = XCBuildConfiguration; |
||||||
|
buildSettings = { |
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO; |
||||||
|
CLANG_ANALYZER_NONNULL = YES; |
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
||||||
|
CLANG_CXX_LIBRARY = "libc++"; |
||||||
|
CLANG_ENABLE_MODULES = YES; |
||||||
|
CLANG_ENABLE_OBJC_ARC = YES; |
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES; |
||||||
|
CLANG_WARN_COMMA = YES; |
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES; |
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
||||||
|
CLANG_WARN_EMPTY_BODY = YES; |
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES; |
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES; |
||||||
|
CLANG_WARN_INT_CONVERSION = YES; |
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES; |
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES; |
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES; |
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
||||||
|
COPY_PHASE_STRIP = NO; |
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
||||||
|
ENABLE_NS_ASSERTIONS = NO; |
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES; |
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99; |
||||||
|
GCC_NO_COMMON_BLOCKS = YES; |
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES; |
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES; |
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES; |
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
||||||
|
MTL_ENABLE_DEBUG_INFO = NO; |
||||||
|
SDKROOT = iphoneos; |
||||||
|
SUPPORTED_PLATFORMS = iphoneos; |
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; |
||||||
|
TARGETED_DEVICE_FAMILY = "1,2"; |
||||||
|
VALIDATE_PRODUCT = YES; |
||||||
|
}; |
||||||
|
name = Release; |
||||||
|
}; |
||||||
|
97C147061CF9000F007C117D /* Debug */ = { |
||||||
|
isa = XCBuildConfiguration; |
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; |
||||||
|
buildSettings = { |
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
||||||
|
CLANG_ENABLE_MODULES = YES; |
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
||||||
|
ENABLE_BITCODE = NO; |
||||||
|
INFOPLIST_FILE = Runner/Info.plist; |
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample; |
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; |
||||||
|
SWIFT_VERSION = 5.0; |
||||||
|
VERSIONING_SYSTEM = "apple-generic"; |
||||||
|
}; |
||||||
|
name = Debug; |
||||||
|
}; |
||||||
|
97C147071CF9000F007C117D /* Release */ = { |
||||||
|
isa = XCBuildConfiguration; |
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; |
||||||
|
buildSettings = { |
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
||||||
|
CLANG_ENABLE_MODULES = YES; |
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
||||||
|
ENABLE_BITCODE = NO; |
||||||
|
INFOPLIST_FILE = Runner/Info.plist; |
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample; |
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
||||||
|
SWIFT_VERSION = 5.0; |
||||||
|
VERSIONING_SYSTEM = "apple-generic"; |
||||||
|
}; |
||||||
|
name = Release; |
||||||
|
}; |
||||||
|
/* End XCBuildConfiguration section */ |
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */ |
||||||
|
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { |
||||||
|
isa = XCConfigurationList; |
||||||
|
buildConfigurations = ( |
||||||
|
97C147031CF9000F007C117D /* Debug */, |
||||||
|
97C147041CF9000F007C117D /* Release */, |
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */, |
||||||
|
); |
||||||
|
defaultConfigurationIsVisible = 0; |
||||||
|
defaultConfigurationName = Release; |
||||||
|
}; |
||||||
|
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { |
||||||
|
isa = XCConfigurationList; |
||||||
|
buildConfigurations = ( |
||||||
|
97C147061CF9000F007C117D /* Debug */, |
||||||
|
97C147071CF9000F007C117D /* Release */, |
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */, |
||||||
|
); |
||||||
|
defaultConfigurationIsVisible = 0; |
||||||
|
defaultConfigurationName = Release; |
||||||
|
}; |
||||||
|
/* End XCConfigurationList section */ |
||||||
|
}; |
||||||
|
rootObject = 97C146E61CF9000F007C117D /* Project object */; |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<Workspace |
||||||
|
version = "1.0"> |
||||||
|
<FileRef |
||||||
|
location = "self:"> |
||||||
|
</FileRef> |
||||||
|
</Workspace> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||||
|
<plist version="1.0"> |
||||||
|
<dict> |
||||||
|
<key>IDEDidComputeMac32BitWarning</key> |
||||||
|
<true/> |
||||||
|
</dict> |
||||||
|
</plist> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||||
|
<plist version="1.0"> |
||||||
|
<dict> |
||||||
|
<key>PreviewsEnabled</key> |
||||||
|
<false/> |
||||||
|
</dict> |
||||||
|
</plist> |
@ -0,0 +1,91 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<Scheme |
||||||
|
LastUpgradeVersion = "1020" |
||||||
|
version = "1.3"> |
||||||
|
<BuildAction |
||||||
|
parallelizeBuildables = "YES" |
||||||
|
buildImplicitDependencies = "YES"> |
||||||
|
<BuildActionEntries> |
||||||
|
<BuildActionEntry |
||||||
|
buildForTesting = "YES" |
||||||
|
buildForRunning = "YES" |
||||||
|
buildForProfiling = "YES" |
||||||
|
buildForArchiving = "YES" |
||||||
|
buildForAnalyzing = "YES"> |
||||||
|
<BuildableReference |
||||||
|
BuildableIdentifier = "primary" |
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||||
|
BuildableName = "Runner.app" |
||||||
|
BlueprintName = "Runner" |
||||||
|
ReferencedContainer = "container:Runner.xcodeproj"> |
||||||
|
</BuildableReference> |
||||||
|
</BuildActionEntry> |
||||||
|
</BuildActionEntries> |
||||||
|
</BuildAction> |
||||||
|
<TestAction |
||||||
|
buildConfiguration = "Debug" |
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"> |
||||||
|
<Testables> |
||||||
|
</Testables> |
||||||
|
<MacroExpansion> |
||||||
|
<BuildableReference |
||||||
|
BuildableIdentifier = "primary" |
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||||
|
BuildableName = "Runner.app" |
||||||
|
BlueprintName = "Runner" |
||||||
|
ReferencedContainer = "container:Runner.xcodeproj"> |
||||||
|
</BuildableReference> |
||||||
|
</MacroExpansion> |
||||||
|
<AdditionalOptions> |
||||||
|
</AdditionalOptions> |
||||||
|
</TestAction> |
||||||
|
<LaunchAction |
||||||
|
buildConfiguration = "Debug" |
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
||||||
|
launchStyle = "0" |
||||||
|
useCustomWorkingDirectory = "NO" |
||||||
|
ignoresPersistentStateOnLaunch = "NO" |
||||||
|
debugDocumentVersioning = "YES" |
||||||
|
debugServiceExtension = "internal" |
||||||
|
allowLocationSimulation = "YES"> |
||||||
|
<BuildableProductRunnable |
||||||
|
runnableDebuggingMode = "0"> |
||||||
|
<BuildableReference |
||||||
|
BuildableIdentifier = "primary" |
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||||
|
BuildableName = "Runner.app" |
||||||
|
BlueprintName = "Runner" |
||||||
|
ReferencedContainer = "container:Runner.xcodeproj"> |
||||||
|
</BuildableReference> |
||||||
|
</BuildableProductRunnable> |
||||||
|
<AdditionalOptions> |
||||||
|
</AdditionalOptions> |
||||||
|
</LaunchAction> |
||||||
|
<ProfileAction |
||||||
|
buildConfiguration = "Profile" |
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES" |
||||||
|
savedToolIdentifier = "" |
||||||
|
useCustomWorkingDirectory = "NO" |
||||||
|
debugDocumentVersioning = "YES"> |
||||||
|
<BuildableProductRunnable |
||||||
|
runnableDebuggingMode = "0"> |
||||||
|
<BuildableReference |
||||||
|
BuildableIdentifier = "primary" |
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||||
|
BuildableName = "Runner.app" |
||||||
|
BlueprintName = "Runner" |
||||||
|
ReferencedContainer = "container:Runner.xcodeproj"> |
||||||
|
</BuildableReference> |
||||||
|
</BuildableProductRunnable> |
||||||
|
</ProfileAction> |
||||||
|
<AnalyzeAction |
||||||
|
buildConfiguration = "Debug"> |
||||||
|
</AnalyzeAction> |
||||||
|
<ArchiveAction |
||||||
|
buildConfiguration = "Release" |
||||||
|
revealArchiveInOrganizer = "YES"> |
||||||
|
</ArchiveAction> |
||||||
|
</Scheme> |
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<Workspace |
||||||
|
version = "1.0"> |
||||||
|
<FileRef |
||||||
|
location = "group:Runner.xcodeproj"> |
||||||
|
</FileRef> |
||||||
|
</Workspace> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||||
|
<plist version="1.0"> |
||||||
|
<dict> |
||||||
|
<key>IDEDidComputeMac32BitWarning</key> |
||||||
|
<true/> |
||||||
|
</dict> |
||||||
|
</plist> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||||
|
<plist version="1.0"> |
||||||
|
<dict> |
||||||
|
<key>PreviewsEnabled</key> |
||||||
|
<false/> |
||||||
|
</dict> |
||||||
|
</plist> |
@ -0,0 +1,13 @@ |
|||||||
|
import UIKit |
||||||
|
import Flutter |
||||||
|
|
||||||
|
@UIApplicationMain |
||||||
|
@objc class AppDelegate: FlutterAppDelegate { |
||||||
|
override func application( |
||||||
|
_ application: UIApplication, |
||||||
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? |
||||||
|
) -> Bool { |
||||||
|
GeneratedPluginRegistrant.register(with: self) |
||||||
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions) |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,122 @@ |
|||||||
|
{ |
||||||
|
"images" : [ |
||||||
|
{ |
||||||
|
"size" : "20x20", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-20x20@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "20x20", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-20x20@3x.png", |
||||||
|
"scale" : "3x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "29x29", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-29x29@1x.png", |
||||||
|
"scale" : "1x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "29x29", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-29x29@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "29x29", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-29x29@3x.png", |
||||||
|
"scale" : "3x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "40x40", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-40x40@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "40x40", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-40x40@3x.png", |
||||||
|
"scale" : "3x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "60x60", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-60x60@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "60x60", |
||||||
|
"idiom" : "iphone", |
||||||
|
"filename" : "Icon-App-60x60@3x.png", |
||||||
|
"scale" : "3x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "20x20", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-20x20@1x.png", |
||||||
|
"scale" : "1x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "20x20", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-20x20@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "29x29", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-29x29@1x.png", |
||||||
|
"scale" : "1x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "29x29", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-29x29@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "40x40", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-40x40@1x.png", |
||||||
|
"scale" : "1x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "40x40", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-40x40@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "76x76", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-76x76@1x.png", |
||||||
|
"scale" : "1x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "76x76", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-76x76@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "83.5x83.5", |
||||||
|
"idiom" : "ipad", |
||||||
|
"filename" : "Icon-App-83.5x83.5@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"size" : "1024x1024", |
||||||
|
"idiom" : "ios-marketing", |
||||||
|
"filename" : "Icon-App-1024x1024@1x.png", |
||||||
|
"scale" : "1x" |
||||||
|
} |
||||||
|
], |
||||||
|
"info" : { |
||||||
|
"version" : 1, |
||||||
|
"author" : "xcode" |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
@ -0,0 +1,23 @@ |
|||||||
|
{ |
||||||
|
"images" : [ |
||||||
|
{ |
||||||
|
"idiom" : "universal", |
||||||
|
"filename" : "LaunchImage.png", |
||||||
|
"scale" : "1x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"idiom" : "universal", |
||||||
|
"filename" : "LaunchImage@2x.png", |
||||||
|
"scale" : "2x" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"idiom" : "universal", |
||||||
|
"filename" : "LaunchImage@3x.png", |
||||||
|
"scale" : "3x" |
||||||
|
} |
||||||
|
], |
||||||
|
"info" : { |
||||||
|
"version" : 1, |
||||||
|
"author" : "xcode" |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
@ -0,0 +1,5 @@ |
|||||||
|
# Launch Screen Assets |
||||||
|
|
||||||
|
You can customize the launch screen with your own desired assets by replacing the image files in this directory. |
||||||
|
|
||||||
|
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. |
@ -0,0 +1,37 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> |
||||||
|
<dependencies> |
||||||
|
<deployment identifier="iOS"/> |
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> |
||||||
|
</dependencies> |
||||||
|
<scenes> |
||||||
|
<!--View Controller--> |
||||||
|
<scene sceneID="EHf-IW-A2E"> |
||||||
|
<objects> |
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> |
||||||
|
<layoutGuides> |
||||||
|
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> |
||||||
|
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> |
||||||
|
</layoutGuides> |
||||||
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> |
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||||
|
<subviews> |
||||||
|
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> |
||||||
|
</imageView> |
||||||
|
</subviews> |
||||||
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
||||||
|
<constraints> |
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> |
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> |
||||||
|
</constraints> |
||||||
|
</view> |
||||||
|
</viewController> |
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> |
||||||
|
</objects> |
||||||
|
<point key="canvasLocation" x="53" y="375"/> |
||||||
|
</scene> |
||||||
|
</scenes> |
||||||
|
<resources> |
||||||
|
<image name="LaunchImage" width="168" height="185"/> |
||||||
|
</resources> |
||||||
|
</document> |
@ -0,0 +1,26 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> |
||||||
|
<dependencies> |
||||||
|
<deployment identifier="iOS"/> |
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> |
||||||
|
</dependencies> |
||||||
|
<scenes> |
||||||
|
<!--Flutter View Controller--> |
||||||
|
<scene sceneID="tne-QT-ifu"> |
||||||
|
<objects> |
||||||
|
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> |
||||||
|
<layoutGuides> |
||||||
|
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> |
||||||
|
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> |
||||||
|
</layoutGuides> |
||||||
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> |
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> |
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
||||||
|
</view> |
||||||
|
</viewController> |
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> |
||||||
|
</objects> |
||||||
|
</scene> |
||||||
|
</scenes> |
||||||
|
</document> |
@ -0,0 +1,45 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||||
|
<plist version="1.0"> |
||||||
|
<dict> |
||||||
|
<key>CFBundleDevelopmentRegion</key> |
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string> |
||||||
|
<key>CFBundleExecutable</key> |
||||||
|
<string>$(EXECUTABLE_NAME)</string> |
||||||
|
<key>CFBundleIdentifier</key> |
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
||||||
|
<key>CFBundleInfoDictionaryVersion</key> |
||||||
|
<string>6.0</string> |
||||||
|
<key>CFBundleName</key> |
||||||
|
<string>flutter_openim_sdk_example</string> |
||||||
|
<key>CFBundlePackageType</key> |
||||||
|
<string>APPL</string> |
||||||
|
<key>CFBundleShortVersionString</key> |
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string> |
||||||
|
<key>CFBundleSignature</key> |
||||||
|
<string>????</string> |
||||||
|
<key>CFBundleVersion</key> |
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string> |
||||||
|
<key>LSRequiresIPhoneOS</key> |
||||||
|
<true/> |
||||||
|
<key>UILaunchStoryboardName</key> |
||||||
|
<string>LaunchScreen</string> |
||||||
|
<key>UIMainStoryboardFile</key> |
||||||
|
<string>Main</string> |
||||||
|
<key>UISupportedInterfaceOrientations</key> |
||||||
|
<array> |
||||||
|
<string>UIInterfaceOrientationPortrait</string> |
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string> |
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string> |
||||||
|
</array> |
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key> |
||||||
|
<array> |
||||||
|
<string>UIInterfaceOrientationPortrait</string> |
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string> |
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string> |
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string> |
||||||
|
</array> |
||||||
|
<key>UIViewControllerBasedStatusBarAppearance</key> |
||||||
|
<false/> |
||||||
|
</dict> |
||||||
|
</plist> |
@ -0,0 +1 @@ |
|||||||
|
#import "GeneratedPluginRegistrant.h" |
@ -0,0 +1,48 @@ |
|||||||
|
import 'package:flutter/material.dart'; |
||||||
|
import 'dart:async'; |
||||||
|
|
||||||
|
import 'package:flutter/services.dart'; |
||||||
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; |
||||||
|
|
||||||
|
void main() { |
||||||
|
runApp(MyApp()); |
||||||
|
} |
||||||
|
|
||||||
|
class MyApp extends StatefulWidget { |
||||||
|
@override |
||||||
|
_MyAppState createState() => _MyAppState(); |
||||||
|
} |
||||||
|
|
||||||
|
class _MyAppState extends State<MyApp> { |
||||||
|
@override |
||||||
|
void initState() { |
||||||
|
super.initState(); |
||||||
|
} |
||||||
|
|
||||||
|
@override |
||||||
|
Widget build(BuildContext context) { |
||||||
|
return MaterialApp( |
||||||
|
home: Scaffold( |
||||||
|
appBar: AppBar( |
||||||
|
title: const Text('Plugin example app'), |
||||||
|
), |
||||||
|
body: Column( |
||||||
|
children: [ |
||||||
|
TextButton(onPressed: _testApi, child: Text('api')), |
||||||
|
], |
||||||
|
), |
||||||
|
), |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
void _testApi() { |
||||||
|
// FlutterOpenimSdk.iMManager.initSDK( |
||||||
|
// platform: platform, |
||||||
|
// ipApi: ipApi, |
||||||
|
// ipWs: ipWs, |
||||||
|
// dbPath: dbPath, |
||||||
|
// listener: listener, |
||||||
|
// ); |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,161 @@ |
|||||||
|
# Generated by pub |
||||||
|
# See https://dart.dev/tools/pub/glossary#lockfile |
||||||
|
packages: |
||||||
|
async: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: async |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "2.6.1" |
||||||
|
boolean_selector: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: boolean_selector |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "2.1.0" |
||||||
|
characters: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: characters |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.1.0" |
||||||
|
charcode: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: charcode |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.2.0" |
||||||
|
clock: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: clock |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.1.0" |
||||||
|
collection: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: collection |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.15.0" |
||||||
|
cupertino_icons: |
||||||
|
dependency: "direct main" |
||||||
|
description: |
||||||
|
name: cupertino_icons |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.0.3" |
||||||
|
fake_async: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: fake_async |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.2.0" |
||||||
|
flutter: |
||||||
|
dependency: "direct main" |
||||||
|
description: flutter |
||||||
|
source: sdk |
||||||
|
version: "0.0.0" |
||||||
|
flutter_openim_sdk: |
||||||
|
dependency: "direct main" |
||||||
|
description: |
||||||
|
path: ".." |
||||||
|
relative: true |
||||||
|
source: path |
||||||
|
version: "0.0.1" |
||||||
|
flutter_test: |
||||||
|
dependency: "direct dev" |
||||||
|
description: flutter |
||||||
|
source: sdk |
||||||
|
version: "0.0.0" |
||||||
|
matcher: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: matcher |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "0.12.10" |
||||||
|
meta: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: meta |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.3.0" |
||||||
|
path: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: path |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.8.0" |
||||||
|
sky_engine: |
||||||
|
dependency: transitive |
||||||
|
description: flutter |
||||||
|
source: sdk |
||||||
|
version: "0.0.99" |
||||||
|
source_span: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: source_span |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.8.1" |
||||||
|
stack_trace: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: stack_trace |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.10.0" |
||||||
|
stream_channel: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: stream_channel |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "2.1.0" |
||||||
|
string_scanner: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: string_scanner |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.1.0" |
||||||
|
term_glyph: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: term_glyph |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.2.0" |
||||||
|
test_api: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: test_api |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "0.3.0" |
||||||
|
typed_data: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: typed_data |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "1.3.0" |
||||||
|
vector_math: |
||||||
|
dependency: transitive |
||||||
|
description: |
||||||
|
name: vector_math |
||||||
|
url: "https://pub.flutter-io.cn" |
||||||
|
source: hosted |
||||||
|
version: "2.1.0" |
||||||
|
sdks: |
||||||
|
dart: ">=2.12.0 <3.0.0" |
||||||
|
flutter: ">=1.20.0" |
@ -0,0 +1,71 @@ |
|||||||
|
name: flutter_openim_sdk_example |
||||||
|
description: Demonstrates how to use the flutter_openim_sdk plugin. |
||||||
|
|
||||||
|
# The following line prevents the package from being accidentally published to |
||||||
|
# pub.dev using `pub publish`. This is preferred for private packages. |
||||||
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev |
||||||
|
|
||||||
|
environment: |
||||||
|
sdk: ">=2.12.0 <3.0.0" |
||||||
|
|
||||||
|
dependencies: |
||||||
|
flutter: |
||||||
|
sdk: flutter |
||||||
|
|
||||||
|
flutter_openim_sdk: |
||||||
|
# When depending on this package from a real application you should use: |
||||||
|
# flutter_openim_sdk: ^x.y.z |
||||||
|
# See https://dart.dev/tools/pub/dependencies#version-constraints |
||||||
|
# The example app is bundled with the plugin so we use a path dependency on |
||||||
|
# the parent directory to use the current plugin's version. |
||||||
|
path: ../ |
||||||
|
|
||||||
|
# The following adds the Cupertino Icons font to your application. |
||||||
|
# Use with the CupertinoIcons class for iOS style icons. |
||||||
|
cupertino_icons: ^1.0.2 |
||||||
|
|
||||||
|
dev_dependencies: |
||||||
|
flutter_test: |
||||||
|
sdk: flutter |
||||||
|
|
||||||
|
# For information on the generic Dart part of this file, see the |
||||||
|
# following page: https://dart.dev/tools/pub/pubspec |
||||||
|
|
||||||
|
# The following section is specific to Flutter. |
||||||
|
flutter: |
||||||
|
|
||||||
|
# The following line ensures that the Material Icons font is |
||||||
|
# included with your application, so that you can use the icons in |
||||||
|
# the material Icons class. |
||||||
|
uses-material-design: true |
||||||
|
|
||||||
|
# To add assets to your application, add an assets section, like this: |
||||||
|
# assets: |
||||||
|
# - images/a_dot_burr.jpeg |
||||||
|
# - images/a_dot_ham.jpeg |
||||||
|
|
||||||
|
# An image asset can refer to one or more resolution-specific "variants", see |
||||||
|
# https://flutter.dev/assets-and-images/#resolution-aware. |
||||||
|
|
||||||
|
# For details regarding adding assets from package dependencies, see |
||||||
|
# https://flutter.dev/assets-and-images/#from-packages |
||||||
|
|
||||||
|
# To add custom fonts to your application, add a fonts section here, |
||||||
|
# in this "flutter" section. Each entry in this list should have a |
||||||
|
# "family" key with the font family name, and a "fonts" key with a |
||||||
|
# list giving the asset and other descriptors for the font. For |
||||||
|
# example: |
||||||
|
# fonts: |
||||||
|
# - family: Schyler |
||||||
|
# fonts: |
||||||
|
# - asset: fonts/Schyler-Regular.ttf |
||||||
|
# - asset: fonts/Schyler-Italic.ttf |
||||||
|
# style: italic |
||||||
|
# - family: Trajan Pro |
||||||
|
# fonts: |
||||||
|
# - asset: fonts/TrajanPro.ttf |
||||||
|
# - asset: fonts/TrajanPro_Bold.ttf |
||||||
|
# weight: 700 |
||||||
|
# |
||||||
|
# For details regarding fonts from package dependencies, |
||||||
|
# see https://flutter.dev/custom-fonts/#from-packages |
@ -0,0 +1,27 @@ |
|||||||
|
// This is a basic Flutter widget test. |
||||||
|
// |
||||||
|
// To perform an interaction with a widget in your test, use the WidgetTester |
||||||
|
// utility that Flutter provides. For example, you can send tap and scroll |
||||||
|
// gestures. You can also use WidgetTester to find child widgets in the widget |
||||||
|
// tree, read text, and verify that the values of widget properties are correct. |
||||||
|
|
||||||
|
import 'package:flutter/material.dart'; |
||||||
|
import 'package:flutter_test/flutter_test.dart'; |
||||||
|
|
||||||
|
import 'package:flutter_openim_sdk_example/main.dart'; |
||||||
|
|
||||||
|
void main() { |
||||||
|
testWidgets('Verify Platform version', (WidgetTester tester) async { |
||||||
|
// Build our app and trigger a frame. |
||||||
|
await tester.pumpWidget(MyApp()); |
||||||
|
|
||||||
|
// Verify that platform version is retrieved. |
||||||
|
expect( |
||||||
|
find.byWidgetPredicate( |
||||||
|
(Widget widget) => widget is Text && |
||||||
|
widget.data!.startsWith('Running on:'), |
||||||
|
), |
||||||
|
findsOneWidget, |
||||||
|
); |
||||||
|
}); |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<module type="JAVA_MODULE" version="4"> |
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true"> |
||||||
|
<exclude-output /> |
||||||
|
<content url="file://$MODULE_DIR$"> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.pub" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/.pub" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/example/build" /> |
||||||
|
</content> |
||||||
|
<orderEntry type="sourceFolder" forTests="false" /> |
||||||
|
<orderEntry type="library" name="Dart SDK" level="project" /> |
||||||
|
<orderEntry type="library" name="Flutter Plugins" level="project" /> |
||||||
|
</component> |
||||||
|
</module> |
@ -0,0 +1,38 @@ |
|||||||
|
.idea/ |
||||||
|
.vagrant/ |
||||||
|
.sconsign.dblite |
||||||
|
.svn/ |
||||||
|
|
||||||
|
.DS_Store |
||||||
|
*.swp |
||||||
|
profile |
||||||
|
|
||||||
|
DerivedData/ |
||||||
|
build/ |
||||||
|
GeneratedPluginRegistrant.h |
||||||
|
GeneratedPluginRegistrant.m |
||||||
|
|
||||||
|
.generated/ |
||||||
|
|
||||||
|
*.pbxuser |
||||||
|
*.mode1v3 |
||||||
|
*.mode2v3 |
||||||
|
*.perspectivev3 |
||||||
|
|
||||||
|
!default.pbxuser |
||||||
|
!default.mode1v3 |
||||||
|
!default.mode2v3 |
||||||
|
!default.perspectivev3 |
||||||
|
|
||||||
|
xcuserdata |
||||||
|
|
||||||
|
*.moved-aside |
||||||
|
|
||||||
|
*.pyc |
||||||
|
*sync/ |
||||||
|
Icon? |
||||||
|
.tags* |
||||||
|
|
||||||
|
/Flutter/Generated.xcconfig |
||||||
|
/Flutter/ephemeral/ |
||||||
|
/Flutter/flutter_export_environment.sh |
@ -0,0 +1,4 @@ |
|||||||
|
#import <Flutter/Flutter.h> |
||||||
|
|
||||||
|
@interface FlutterOpenimSdkPlugin : NSObject<FlutterPlugin> |
||||||
|
@end |
@ -0,0 +1,15 @@ |
|||||||
|
#import "FlutterOpenimSdkPlugin.h" |
||||||
|
#if __has_include(<flutter_openim_sdk/flutter_openim_sdk-Swift.h>) |
||||||
|
#import <flutter_openim_sdk/flutter_openim_sdk-Swift.h> |
||||||
|
#else |
||||||
|
// Support project import fallback if the generated compatibility header |
||||||
|
// is not copied when this plugin is created as a library. |
||||||
|
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 |
||||||
|
#import "flutter_openim_sdk-Swift.h" |
||||||
|
#endif |
||||||
|
|
||||||
|
@implementation FlutterOpenimSdkPlugin |
||||||
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar { |
||||||
|
[SwiftFlutterOpenimSdkPlugin registerWithRegistrar:registrar]; |
||||||
|
} |
||||||
|
@end |
@ -0,0 +1,14 @@ |
|||||||
|
import Flutter |
||||||
|
import UIKit |
||||||
|
|
||||||
|
public class SwiftFlutterOpenimSdkPlugin: NSObject, FlutterPlugin { |
||||||
|
public static func register(with registrar: FlutterPluginRegistrar) { |
||||||
|
let channel = FlutterMethodChannel(name: "flutter_openim_sdk", binaryMessenger: registrar.messenger()) |
||||||
|
let instance = SwiftFlutterOpenimSdkPlugin() |
||||||
|
registrar.addMethodCallDelegate(instance, channel: channel) |
||||||
|
} |
||||||
|
|
||||||
|
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { |
||||||
|
result("iOS " + UIDevice.current.systemVersion) |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
# |
||||||
|
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. |
||||||
|
# Run `pod lib lint flutter_openim_sdk.podspec` to validate before publishing. |
||||||
|
# |
||||||
|
Pod::Spec.new do |s| |
||||||
|
s.name = 'flutter_openim_sdk' |
||||||
|
s.version = '0.0.1' |
||||||
|
s.summary = 'A new Flutter project.' |
||||||
|
s.description = <<-DESC |
||||||
|
A new Flutter project. |
||||||
|
DESC |
||||||
|
s.homepage = 'http://example.com' |
||||||
|
s.license = { :file => '../LICENSE' } |
||||||
|
s.author = { 'Your Company' => 'email@example.com' } |
||||||
|
s.source = { :path => '.' } |
||||||
|
s.source_files = 'Classes/**/*' |
||||||
|
s.dependency 'Flutter' |
||||||
|
s.platform = :ios, '8.0' |
||||||
|
|
||||||
|
# Flutter.framework does not contain a i386 slice. |
||||||
|
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } |
||||||
|
s.swift_version = '5.0' |
||||||
|
end |
@ -0,0 +1,36 @@ |
|||||||
|
/// 事件监听类型 |
||||||
|
/// |
||||||
|
/// {@category Enums} |
||||||
|
/// |
||||||
|
class ListenerType { |
||||||
|
///简单监听 |
||||||
|
/// |
||||||
|
static const String simpleMsgListener = 'simpleMsgListener'; |
||||||
|
|
||||||
|
///初始化监听 |
||||||
|
/// |
||||||
|
static const String initSDKListener = 'initSDKListener'; |
||||||
|
|
||||||
|
///群组监听 |
||||||
|
/// |
||||||
|
static const String groupListener = 'groupListener'; |
||||||
|
|
||||||
|
///高级消息监听 |
||||||
|
/// |
||||||
|
static const String advancedMsgListener = 'advancedMsgListener'; |
||||||
|
|
||||||
|
///会话监听 |
||||||
|
/// |
||||||
|
static const String conversationListener = 'conversationListener'; |
||||||
|
|
||||||
|
///好友关系链监听 |
||||||
|
/// |
||||||
|
static const String friendListener = 'friendListener'; |
||||||
|
|
||||||
|
///信令监听 |
||||||
|
/// |
||||||
|
static const String signalingListener = 'signalingListener'; |
||||||
|
|
||||||
|
static const String messageProgressListener = |
||||||
|
"messageProgressListener"; |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
class MessageType { |
||||||
|
/// |
||||||
|
static const text = 101; |
||||||
|
|
||||||
|
/// |
||||||
|
static const picture = 102; |
||||||
|
|
||||||
|
/// |
||||||
|
static const voice = 103; |
||||||
|
|
||||||
|
/// |
||||||
|
static const video = 104; |
||||||
|
|
||||||
|
/// |
||||||
|
static const file = 105; |
||||||
|
|
||||||
|
static const accept_friend = 201; |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
import 'package:flutter/services.dart'; |
||||||
|
import 'package:flutter_openim_sdk/manager/im_manager.dart'; |
||||||
|
|
||||||
|
class FlutterOpenimSdk { |
||||||
|
static const MethodChannel _channel = |
||||||
|
const MethodChannel('flutter_openim_sdk'); |
||||||
|
|
||||||
|
static IMManager iMManager = IMManager(_channel); |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
import 'package:flutter_openim_sdk/models/message.dart'; |
||||||
|
|
||||||
|
class AdvancedMsgListener { |
||||||
|
/// listener uniquely identifies |
||||||
|
final String id; |
||||||
|
|
||||||
|
AdvancedMsgListener({required this.id}); |
||||||
|
|
||||||
|
void onRecvNewMessage(Message msg) {} |
||||||
|
|
||||||
|
void onRecvC2CReadReceipt(Message msg) {} |
||||||
|
|
||||||
|
void onRecvMessageRevoked(Message msg) {} |
||||||
|
} |