nexmo-iOS v1.0.0

Fixed

  • NexmoClient when disconnected returns error callback for all function.
  • CallMember status calculated by the current leg status.
  • CallMember supports failed, busy, timeout and canceled statuses.
  • Supports member invited.
  • Conversation has media methods.
  • NexmoClient is now singleton.
  • Call method changed to string instead of array.
  • NexmoClient delegate methods renamed.

Added

  • Added conversation media:
NXMConversation myConversation;
[myConversation enableMedia];   // my media will be enabled
[myConversation disableMedia];  // my media will be disabled

​ Added invite member:

NXMConversation myConversation;
[myConversation inviteMemberWithUsername:@"someUsername"
                      completion:myCompletionBlock];

  • Added the member state initiator:
NXMMember *member = someMember;
NSDictionary<NSValue *, NXMInitiator *> *initiators = member.initiators; 
​
NXMInitiator leftStateInitiator = initiators[NXMMemberStateLeft];
leftStateInitiator.isSystem;
leftStateInitiator.userId;
leftStateInitiator.memberId;
leftStateInitiator.time;

Added NXMConversationUpdateDelegate to notify on member updates like media,leg, and state. Added updatesDelegate property to NXMConversation:

@property (nonatomic, weak, nullable) id <NXMConversationUpdateDelegate> updatesDelegate;

Example:

@interface MyClass() <NXMConversationUpdateDelegate>
@implementation MyClass
​
- (void)setConversation:(NXMConversation *conversation) {
	conversation.updatesDelegate(self); // register to conversation updatesDelegate
}
​
- (void)conversation:(nonnull NXMConversation *)conversation didUpdateMember:(nonnull NXMMember *)member withType:(NXMMemberUpdateType)type {
	if (type == NXMMemberUpdateTypeState) {
		// the member state changed
	}
​
	if (type == NXMMemberUpdateTypeMedia) {
		// the member media changed
	}
}
@end

Changed

  • NXMClient is now a singleton:
NXMClient.shared // the shared instance of NXMClient

Renamed:

@property (nonatomic, readonly, nullable, getter=getToken) NSString *authToken; // was token
​
// was - (void)login;
- (void)loginWithAuthToken:(NSString *)authToken;
​
// was - (void)refreshAuthToken:(nonnull NSString *)authToken;
- (void)updateAuthToken:(nonnull NSString *)authToken;
​
// was callees array
- (void)call:(nonnull NSString *)callee
    callHandler:(NXMCallHandler)callHandler
    delegate:(nullable id<NXMCallDelegate>)delegate
  completion:(void(^_Nullable)(NSError * _Nullable error, NXMCall * _Nullable call))completion;
completionHandler:(void(^_Nullable)(NSError * _Nullable error, NXMCall * _Nullable call))completionHandler;

  • NXMClientDelegate renamed:
@protocol NXMClientDelegate <NSObject>
​
// was - (void)connectionStatusChanged:(NXMConnectionStatus)status reason:(NXMConnectionStatusReason)reason;
- (void)client:(nonnull NXMClient *)client didChangeConnectionStatus:(NXMConnectionStatus)status reason:(NXMConnectionStatusReason)reason;
​
// was - (void)incomingCall:(nonnull NXMCall *)call;
- (void)client:(nonnull NXMClient *)client didReceiveCall:(nonnull NXMCall *)call;
​
// was - (void)incomingConversation:(nonnull NXMConversation *)conversation;
- (void)client:(nonnull NXMClient *)client didReceiveConversation:(nonnull NXMConversation *)conversation;
@end

  • NXMConversation otherMembers property renamed to allMembers:
NXMConversation myConversation = someConversation;
NSArray<NXMMember *> * allMembers = myConversation.allMembers // return the all conversation members
​
- (void)joinMemberWithUsername:(nonnull NSString *)username // username instead of userId

  • NXMConversationDelegate renamed methods:
// was - (void)customEvent:(nonnull NXMCustomEvent *)customEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveCustomEvent:(nonnull NXMCustomEvent *)event;
​
// was - (void)textEvent:(nonnull NXMMessageEvent *)textEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveTextEvent:(nonnull NXMTextEvent *)event;
​
// was - (void)attachmentEvent:(nonnull NXMMessageEvent *)attachmentEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveImageEvent:(nonnull NXMImageEvent *)event;
​
// - (void)messageStatusEvent:(nonnull NXMMessageStatusEvent *)messageStatusEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveMessageStatusEvent:(nonnull NXMMessageStatusEvent *)event;
​
// was - (void)typingEvent:(nonnull NXMTextTypingEvent *)typingEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveTypingEvent:(nonnull NXMTextTypingEvent *)event;
​
// was - (void)memberEvent:(nonnull NXMMemberEvent *)memberEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveMemberEvent:(nonnull NXMMemberEvent *)event;
​
// was - (void)legStatusEvent:(nonnull NXMLegStatusEvent *)legStatusEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveLegStatusEvent:(nonnull NXMLegStatusEvent *)event;
​
// was - (void)mediaEvent:(nonnull NXMEvent *)mediaEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveMediaEvent:(nonnull NXMMediaEvent *)event;

​ Use username instead of userId.

NXMCallDelegate renamed:

// was - (void)statusChanged:(nonnull NXMCallMember *)callMember;
- (void)didUpdate:(nonnull NXMCallMember *)callMember status:(NXMCallMemberStatus)status; 
- (void)didUpdate:(nonnull NXMCallMember *)callMember muted:(BOOL)muted;
​
// was - (void)DTMFReceived:(nonnull NSString *)dtmf callMember:(nonnull NXMCallMember *)callMember;
- (void)didReceive:(nonnull NSString *)dtmf fromCallMember:(nonnull NXMCallMember *)callMember;

NXMEvent and NXMMemberEvent add member object instead of memberId:

@property (nonatomic, readonly, nonnull) NXMMember *member;

NXMImageInfo renamed properties:

@property NSInteger sizeInBytes; // was size
@property NXMImageSize size; // was type

NXMMessageStatusEvent renamed property:

@property NSInteger referenceEventId; // was refEventId

NexmoClient logger exposed - NXMLogger object:

[NXMLogger setLogLevel:NXMLoggerLevelDebug];
NSArray *logNames = [NXMLogger getLogFileNames];
  • Removed NXMLoggerDelegate:
NXMClient myClient
[myClient setLoggerDelegate:LoggerDelegate];