Git Product home page Git Product logo

easeui-ios-hyphenate-cocoapods's Introduction

easeui-ios

环信iOS easeui CocoaPod repo

从3.1.1开始, 小伙伴们可以使用 Cocoapods 来集成环信3.0SDK版本的easeui啦, 集成方法如下:

  1. Podfile 文件添加如下代码(建议集成EaseUI时指定其版本,与SDK保持版本相同)

     pod 'EaseUI', :git => 'https://github.com/easemob/easeui-ios-hyphenate-cocoapods.git', :tag => '3.3.2'
    
  2. 使用时, 需要引入头文件, 在 pch 预编译文件中, 引入头文件如下:

     #import <EaseUI/EaseUI.h>
    

接下来, 就可以正常使用环信的所有功能啦. 具体的使用步骤可以参考我们的官方文档: 集成文档

注意:由于SDK改成了动态库,EaseUI引入的头文件Full版本和Lite版本不同,导致集成EaseUI失败。代码中包含了宏ENABLE_LITE的定义这个是为了区分集成Lite版本SDK还是Full版本SDK,当通过pod在集成EaseUILite 时会在Build Settings> GCC_PREPROCESSOR_DEFINITIONS >ENABLE_LITE=1中定义ENABLE_LITE,集成EaseUI时则不会定义,所以开发者不需要关注这个字段,如果集成Lite版本SDK,建议使用

	pod 'EaseUILite', :git =>'https://github.com/easemob/easeui-ios-hyphenate-cocoapods.git'
	
	//引入头文件
	#import <EaseUILite/EaseUI.h>

easeui-ios-hyphenate-cocoapods's People

Contributors

githubzhaoliang avatar jma01 avatar lizilong1989 avatar xieyajie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easeui-ios-hyphenate-cocoapods's Issues

请分离依赖MBProgressHUD,MWPhotoBrowser !

[!] CocoaPods could not find compatible versions for pod "MBProgressHUD":
In snapshot (Podfile.lock):
MBProgressHUD (= 1.1.0)

In Podfile:
EaseUI (from https://github.com/easemob/easeui-ios-hyphenate-cocoapods.git, tag 3.4.3) was resolved to 3.4.2, which depends on
MWPhotoBrowser (> 2.1.1) was resolved to 2.1.2, which depends on
MBProgressHUD (
> 0.9)

MBProgressHUD

请移除 stdc++

stdc++已废弃,Xcode 10 也不能编译通过。请删除 spec.libraries = 'stdc++'

-[UIApplication registerForRemoteNotifications] must be used from main thread

EaseSDKHelper.m 文件中:

** @brief 注册远程通知 */
- (void)_registerRemoteNotification
{
    UIApplication *application = [UIApplication sharedApplication];
    application.applicationIconBadgeNumber = 0;

    if (NSClassFromString(@"UNUserNotificationCenter")) {
        [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert completionHandler:^(BOOL granted, NSError *error) {
            if (granted) {

#这里需要在主线程中执行
#if !TARGET_IPHONE_SIMULATOR
                dispatch_async(dispatch_get_main_queue(), ^{
                    [application registerForRemoteNotifications];
                    
                });
                
#endif
            }
        }];
        return;
    }

    if([application respondsToSelector:@selector(registerUserNotificationSettings:)])
    {
        UIUserNotificationType notificationTypes = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil];
        [application registerUserNotificationSettings:settings];
    }
    
#if !TARGET_IPHONE_SIMULATOR
    if ([application respondsToSelector:@selector(registerForRemoteNotifications)]) {
        [application registerForRemoteNotifications];
    }else{
        UIRemoteNotificationType notificationTypes = UIRemoteNotificationTypeBadge |
        UIRemoteNotificationTypeSound |
        UIRemoteNotificationTypeAlert;
        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
    }
#endif
}

EaseChatBarMoreView更新item方法没有设置更新title

{
UIView moreButton = [_scrollview viewWithTag:MOREVIEW_BUTTON_TAG+index];
if (moreButton && [moreButton isKindOfClass:[UIButton class]]) {
[(UIButton
)moreButton setImage:image forState:UIControlStateNormal];
[(UIButton*)moreButton setImage:highLightedImage forState:UIControlStateHighlighted];
//源码缺少设置item title的代码
[(UIButton*)moreButton setTitle:title forState:UIControlStateNormal];
}
}

pod falied

#import <EaseUI/UIImageView+WebCache.h> file not found

pod EaseUI失败

[!] Unable to satisfy the following requirements:

  • Hyphenate required by Podfile
  • Hyphenate (= 3.2.3) required by Podfile.lock
  • Hyphenate (~> 3.3.1) required by `EaseUI (3.3.1)

音频消息录入recordView不显示

  • (void)didStartRecordingVoiceAction:(UIView )recordView
    方法中设置tmpView.center = self.view.center;在某些情况下会发生错误,建议改成CGPointMake(self.view.frame.size.width
    0.5, self.view.frame.size.height*0.5)

第三方依赖

你们依赖的库的版本不是新的,导致引用时很多方法报错,我只能从你们官网下载去手动继承,但是一些库的用法已经改变了,我的新项目集成出现很多莫名其妙的问题,甚至会出现foundation库报错...

use_frameworks! bug

EaseUI中创建图片还是使用的[UIImage imageNamed:]创建图片。使用use_frameworks!后,会导致图片获取不到

cocoapods集成后问题太多了!!!!赶紧过来看.

1.少c++编译库
2.使用Lite版本头文件全部报错 (当然可以手动一个一个改)
3.EaseUI.h 头文件引入报错虽然加了TARGET_OS_IPHONE的判断 但还是走到else中然而cocoapods管理的Ease文件并没有UIImageView+WebCache UIViewController+HUD 等等文件.最严重的是这个头文件是无法修改.
总结:无法使用cocoapods集成easeUI.希望官方能解决.

EaseUI最新版本 初始化方法 错误

图片
[[EaseSDKHelper shareHelper] hyphenateApplication:application
didFinishLaunchingWithOptions:launchOptions
appkey:appkey
apnsCertName:apnsCertName
otherConfig:@{kSDKConfigEnableConsoleLogger:[NSNumber numberWithBool:YES]}];

文档方法 和 提供的方法不一致。。。怎么处理呢

'UIImage+Resource.h' file not found

使用3.3.7能够运行,UI这个版本UI已经不能适配手机了
使用3.3.8就这个错误呀~~~
'UIImage+Resource.h' file not found
可以瞧瞧帮解决么~~~

聊天列表页面的一个返回值类型不匹配

EaseConversationListViewController 该控制器中的以下方法返回值有问题

// 声明
- (NSAttributedString *)conversationListViewController:(EaseConversationListViewController *)conversationListViewController  latestMessageTitleForConversationModel:(id<IConversationModel>)conversationModel;

该方法实际返回的是NSString 类型,

// 实现
- (NSString *)conversationListViewController:(EaseConversationListViewController *)conversationListViewController  latestMessageTitleForConversationModel: (id<IConversationModel>)conversationModel
{
    NSString *latestMessageTitle = @"";
    EMMessage *lastMessage = [conversationModel.conversation latestMessage];
    if (lastMessage) {
        EMMessageBody *messageBody = lastMessage.body;
        switch (messageBody.type) {
            case EMMessageBodyTypeImage:{
                latestMessageTitle = NSLocalizedString(@"message.image1", @"[image]");
            } break;
            case EMMessageBodyTypeText:{
                // 表情映射。
                NSString *didReceiveText = [EaseConvertToCommonEmoticonsHelper
                                            convertToSystemEmoticons:((EMTextMessageBody *)messageBody).text];
                latestMessageTitle = didReceiveText;
                if ([lastMessage.ext objectForKey:MESSAGE_ATTR_IS_BIG_EXPRESSION]) {
                    latestMessageTitle = @"[动画表情]";
                }
            } break;
            case EMMessageBodyTypeVoice:{
                latestMessageTitle = NSLocalizedString(@"message.voice1", @"[voice]");
            } break;
            case EMMessageBodyTypeLocation: {
                latestMessageTitle = NSLocalizedString(@"message.location1", @"[location]");
            } break;
            case EMMessageBodyTypeVideo: {
                latestMessageTitle = NSLocalizedString(@"message.video1", @"[video]");
            } break;
            case EMMessageBodyTypeFile: {
                latestMessageTitle = NSLocalizedString(@"message.file1", @"[file]");
            } break;
            default: {
            } break;
        }
    }
    
    return latestMessageTitle;
}

混合swift编译失败

:1:9: note: in file included from :1:
#import "Headers/EaseUI-umbrella.h"
^
/Users/mllw/Library/Developer/Xcode/DerivedData/VHSIPro-cbzywzzpqnzuigdfrtadqljjhgtr/Build/Products/Debug-iphoneos/EaseUI/EaseUI.framework/Headers/EaseUI-umbrella.h:25:9: note: in file included from /Users/mllw/Library/Developer/Xcode/DerivedData/VHSIPro-cbzywzzpqnzuigdfrtadqljjhgtr/Build/Products/Debug-iphoneos/EaseUI/EaseUI.framework/Headers/EaseUI-umbrella.h:25:
#import "wav.h"
^

/Users/mllw/Library/Developer/Xcode/DerivedData/VHSIPro-cbzywzzpqnzuigdfrtadqljjhgtr/Build/Products/Debug-iphoneos/EaseUI/EaseUI.framework/Headers/wav.h:24:1: error: unknown type name 'class'; did you mean 'Class'?
class WavWriter {
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/objc/objc.h:38:28: note: 'Class' declared here
typedef struct objc_class *Class;
^
:1:9: note: in file included from :1:
#import "Headers/EaseUI-umbrella.h"
^
/Users/mllw/Library/Developer/Xcode/DerivedData/VHSIPro-cbzywzzpqnzuigdfrtadqljjhgtr/Build/Products/Debug-iphoneos/EaseUI/EaseUI.framework/Headers/EaseUI-umbrella.h:25:9: note: in file included from /Users/mllw/Library/Developer/Xcode/DerivedData/VHSIPro-cbzywzzpqnzuigdfrtadqljjhgtr/Build/Products/Debug-iphoneos/EaseUI/EaseUI.framework/Headers/EaseUI-umbrella.h:25:
#import "wav.h"
^
/Users/mllw/Library/Developer/Xcode/DerivedData/VHSIPro-cbzywzzpqnzuigdfrtadqljjhgtr/Build/Products/Debug-iphoneos/EaseUI/EaseUI.framework/Headers/wav.h:24:16: error: expected ';' after top level declarator
class WavWriter {
^
/Volumes/skd/workspace/iOS/objc/VHSIPro/VHSIPro/swift/VHAppDelegate.swift:12:8: error: could not build Objective-C module 'EaseUI'
import EaseUI
^

登录问题

loginWithUsername 同步方法返回EMError 为null,再检查登录状态结果是未登录。异步方法没有任何回调,请尽快看一看是什么原因,谢谢

自动打包失败

error: Resource "/Users/geping/Library/Developer/Xcode/DerivedData/boyibang-cwasfhgldmuxkdeuwchmmobouiho/Build/Products/Debug-iphoneos/MWPhotoBrowser/MWPhotoBrowser.bundle" not found. Run 'pod install' to update the copy resources script.

工程在自动打包过程中pod管理的EaseUI依赖的第三方MWPhotoBrowser,iphoneos模式下不存在MWPhotoBrowser.bundle,导致打包失败,Debug-iphonesimulator没问题

pod 引入EaseUILite问题

由于SDK改成了动态库,EaseUI引入的头文件Full版本和Lite版本不同,导致集成EaseUI失败。代码中包含了宏ENABLE_LITE的定义这个是为了区分集成Lite版本SDK还是Full版本SDK,当通过pod在集成EaseUILite 时会在Build Settings> GCC_PREPROCESSOR_DEFINITIONS >ENABLE_LITE=1中定义ENABLE_LITE,集成EaseUI时则不会定义,所以开发者不需要关注这个字段,如果集成Lite版本SDK,建议使用,请问下这个GCC_PREPROCESSOR_DEFINITIONS是指什么? 我没太明白, 能帮我看看不?我通过cocopods引入报错了, 说有个类型找不到,我看文档说要做这个设置。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.