All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Messaging: Added a new
Conversation.isLocalOnly
boolean to indicate local conversations that haven't been sent to the server yet (because they haven't had any message yet).
- Core: Allow minor version updates from Sentry version
8.1
. Runpod update Sentry
to resolve any version conflict. - VideoCall: Bumped the
Livekit
dependency to1.0.13
to address breaking change introduced in their library.
- Messaging UI: Users can tap any where on the conversation screen to close the keyboard.
- Core: Calling
NablaClient.setCurrentUser(userId:)
when the app starts is no longer required whenNablaClient.currentUserId
returns a non-null value. - Core: The
SessionTokenProvider
might be called immediately afterNablaClient.initialize()
is called.
- Core: Improve live updates stability. Under bad network conditions, some websocket subscription would not reconnect as expected.
- Core: Fixed watchers emitting new values when the observed object don't change.
- Core: Reverted Apollo library to version
0.51.2
. Fixes cache issue preventing the loading of older conversation messages.
- Messaging core: Fix a race condition where auto replies would break websocket connection and prevent new events to be handled live.
- Global: Added portuguese localization.
- Messaging core: Added new
lastMessage
property onConversation
that gives access to the whole message and not just its preview.
- Global: Views will display an error if visible on screen when
clearCurrentUserData()
is called. - MessagingCore:
watchConversations()
,watchConversation(withId:)
andwatchItems(ofConversationWithId:)
will send someUserIdNotSetError
if they are active whenclearCurrentUserData()
is called. - MessagingUI:
NablaClient.shared.messaging.views
is NOT marked@MainActor
. - Scheduling: Rename
Appointment.State.upcoming
toAppointment.State.scheduled
- MessagingUI: Fixed an issue in items date grouping where some date separators where missing.
- Core:
NablaTheme
is marked@MainActor
. - MessagingUI: Methods of
InboxDelegate
andConversationViewControllerDelegate
are marked@MainActor
. - MessagingUI:
NablaClient.shared.messaging.views
is marked@MainActor
(Reverted in1.0.0-alpha35
). - Scheduling: Methods of
AppointmentDetailsDelegate
,AppointmentListDelegate
andScheduleAppointmentDelegate
are marked@MainActor
.
Any @MainActor
member should only be accessed from the MainActor
. Apple marked UIView
and UIViewController
as @MainActor
so you should not have any change to make to your code. If you are not calling those methods from a UIView
, a UIViewController
or SwiftUI, we encourage you to visit the official documentation to update your app.
- Core: Fixed an issue preventing the same current user to log in after a log out.
- Scheduling: support for registering a payment step. See doc for details/instructions.
- Scheduling: Replace
NablaSchedulingViewFactory.presentScheduleAppointmentNavigationController(from:delegate:)
withNablaSchedulingViewFactory.createScheduleAppointmentNavigationController(delegate:)
.
- Core:
NablaClient.authenticate
is replaced byNablaClient.setCurrentUser
andNablaClient.clearCurrentUser
.SessionTokenProvider
is set duringNablaClient.initialize
. - Core: Moved the
SessionTokenProvider
fromConfiguration
toNablaClient.initialize
arguments. Also changed the arguments order ofNablaClient.initialize
. - MessagingCore: Renamed
ConversationActivity.Activity
toConversationActivity.Content
. - Scheduling: Removed
Location.RemoteLocation.unknown
case.
- Fixed typos
- Core: Added a new
watchEventsConnectionState
method onNablaClient
which allows you to monitor the current state of the network connection used to receive live events. - Messaging Core: Added a new
Response
object returned by watchers. It contains metadata about the freshness of the data returned, allowing the caller to know if the data comes from cache or is fresh and if a background refresh is in progress. - VideoCall: Disabled screen idling during video calls.
- VideoCall: Handle and open external video call urls when specified on appointments.
- Messaging Core:
watchConversation(withId:)
now returns aAnyPublisher<Response<Conversation>, NablaError>
. - Messaging Core:
watchItems(ofConversationWithId:)
now returns aAnyPublisher<Response<PaginatedList<ConversationItem>>, NablaError>
. - Messaging Core:
watchConversations()
now returns aAnyPublisher<Response<PaginatedList<Conversation>>, NablaError>
. - Messaging UI: After sending a message in a conversation, the view will automatically scroll to it.
- Messaging UI: Increased the composer default font size.
- Scheduling: Months are no longer capitalized when using the french locale.
- VideoCall: Prevent a scenario where the video call screen would appear after the user hangs up.
- Scheduling: Improved the loading indicators in the new appointment flow.
- Scheduling: Fixed appointment scheduling consents not being updated when they are already present in the cache.
- VideoCall: Fixed a bug preventing video call request messages from being displayed in the chat.
- Added an extra step in the "schedule appointment" flow to choose between remote and physical appointments.
- Added an appointment detail view accessible from the list of appointments. For physical appointments, this view displays the address of the appointment.
- You can now register your own
UniversalLinkGenerator
onNablaClient.shared.scheduling.universalLinkGenerators
to let users open addresses in other apps installed on their phone.
- Avatar view will now display a default icon image when no picture or initials are available.
- Avatar view is now exposing more customizable theme properties.
NablaTheme.AvatarView.backgroundColor
: used for the background color when someone doesn't have a profile picture.NablaTheme.AvatarView.tintColor
: used to tint the initials or the default icon of someone who doesn't have a profile picture.NablaTheme.AvatarView.defaultIcon
: displayed when we don't have the profile picture nor the initials
- Core: The
Logger
interface now has an nullableerror
property for each log level. If you implemented your own custom logger you'll have to change the methods signature to migrate. - Removed the default navigation from
NablaScheduling
views. ExposedAppointmentListDelegate
andAppointmentDetailsDelegate
instead so you can build the most adequate navigation for your app.
- Fixes a crash when opening a conversation with a video call interactive message while
NablaVideoCallModule
is not set up. - Messaging UI: Fixed load more items animation in the conversation list view.
- Enable cache persistence on disk for network calls in Messaging and Scheduling modules.
- Added NablaTheme
PrimaryButtonTheme.cornerRadius
property. - Added NablaTheme
AppointmentListViewTheme.CellTheme.cornerRadius
property. - Added NablaTheme
CategoryPickerViewTheme.CellTheme.cornerRadius
property. - Added NablaTheme
TimeSlotPickerViewTheme.CellTheme.cornerRadius
property. - Added NablaTheme
TimeSlotPickerViewTheme.CellTheme.insets
property. - Added NablaTheme
TimeSlotPickerViewTheme.CellTheme.ButtonTheme.cornerRadius
property. - Added NablaTheme
AppointmentConfirmationTheme.headerCornerRadius
property. - Added NablaTheme
AppointmentConfirmationTheme.captionShape
property. - Added NablaTheme
Conversation.videoCallActionRequestIcon
property.
- Changed spacings between cards in the appointment list, appointment category list and time slot list.
- Fixed some UI layout issues in the Conversation screen composer and in the Scheduling confirmation screen.
- Fixed the color of the chat's content appearing below the composer in Messaging UI module.
- Fixed a bug where some view controllers would override the global
UINavigationBar.appearance()
. - All spinners now use the
NablaTheme.Shared.loadingViewIndicatorTintColor
color. - Better support for screen sharing during video calls.
- Messaging Core: Renamed
createDraftConversation
tostartConversation
. It keeps the behavior of creating the conversation lazily when the patient sends the first message. - Messaging Core:
createConversation
now has a requiredwithMessage
argument and should be used to start a conversation on behalf of the patient with a first message from them.
- Removed
Cancellable
andResultHandler
from client interfaces.- watchers now return some
AnyPublisher
from theCombine
framework. - other methods return only once, and leverage the new
async
/await
feature from Swift.
- watchers now return some
// Before
private var watcher: Cancellable?
private func startWatching() {
watcher = client.watchConversations(handler: { [weak self] result in
// Do something with result
})
}
// After
import Combine
private var watcher: AnyCancellable?
private func startWatching() {
watcher = client.watchConversations()
.sink(receiveValue: { conversations in
// Do something with conversations
})
}
You can use sink(receiveCompletion:receiveValue:)
to catch errors. See https://developer.apple.com/documentation/combine/receiving-and-handling-events-with-combine for more details.
async
/await
:
// Before
NablaMessagingClient.shared.markConversationAsSeen(handler: { [weak self] result in
// Do something with result
})
// After
Task(priority: .userInitiated) {
do {
try await NablaMessagingClient.shared.markConversationAsSeen(conversationId)
} catch {
// Do something with error
}
}
To learn more about async
, await
and Task
: https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html.
- Fixed an issue preventing the watchers from automatically fetching new data after connectivity is restored.
- Fixed a bug causing the conversation list to be visible under the tab bar and the navigation bar.
- Fixed a crash that could happen if an emoji is used in appointment consents in Scheduling module.
- Added an empty state when the conversation list is empty. You can customize this text appearance using
Theme.ConversationPreview.EmptyView
attributes.
- Added a "play" indicator on videos on iOS 16 since the default one has been removed by the system update.
- The full screen image and document viewers in conversation screen are now presented modally with customizable theming.
- Fixed an infinite loop that could happen when
SessionTokenProvider
was returning badly formatted tokens. - Fixed a layout issue in the conversation screen that happens when a conversation is unlocked while displayed on screen.
- Fixed NablaTheme.Colors being immutable.
- Reporting: Add an ErrorReporter to report anonymous events to nabla servers to help debug some features like video calls.
- Removed the
showComposer
parameter fromcreateConversationViewController
method and relied onConversation
isLocked
property to hide the composer.
⚠️ If you were using theshowComposer
parameter ofNablaClient.shared.messaging.views.createConversationViewController
, it is not available anymore and you should migrate to using lock conversation from the Console.
- Fixed an issue in video calls where the Provider's video could sometime not be displayed.
- Support for dynamic consents in Scheduling module that you can customize from the console.
-
The
NablaClient.initialize
method now takes aConfiguration
struct instead of multiple params.⚠️ This change is breaking and you will need to update allNablaClient
initialize
andinit
calls. -
NablaTheme
colors have been reworked to better support dark mode. The new colors can be found inNablaTheme.Colors
. -
NablaTheme
fonts have been reworked for better consistency. The new fonts can be found inNablaTheme.Fonts
.
To know more about NablaTheme
, please visit our documentation: https://docs.nabla.com/docs/theming-ios
- Added the option to scan a document in conversation screen.
- Added missing NablaTheme properties to customize the video calls action requests in MessagingUI.
- Introduced
ConversationViewControllerDelegate
to control taps on the conversation screen's title view. - A new
ConversationMessageSender.patient(Patient)
was introduced for conversations with multiple patients. - New attributes (
messageOtherBackgroundColor
,textMessageOtherTextColor
,documentMessageOtherTitleColor
,audioMessageOtherTitleColor
,replyToOtherSeparatorColor
) have been added to customize how other patient and system messages appear in the conversation on our Messaging UI module.
- Updated the cell layout for ended video calls action requests in MessagingUI.
ConversationMessageSender.patient
was renamed toConversationMessageSender.me
.- Improved the appearance of the "send message" button.
- Fix an issue that could lead to messages having the wrong size in the conversation screen of the Messaging UI module
- Fix an issue where the spinner when loading more messages in the conversation screen of the Messaging UI module would not be at the correct position
- Remove any color under the avatar picture of a Provider in case the picture has transparency
- Example app has been renamed to
Messaging Sample App
to better reflect what it showcases. - The media message input in
NablaMessagingClient.sendMessage
now supports sendingData
in addition to a fileURL
.
⚠️ This change is breaking and you will need to update allMedia
concrete types instantiations by replacing thefileURL: URL
withcontent: MediaContent
.
- Fixed the type of the duration in
keyboardAnimationDurationUserInfoKey
in thekeyboardWillChangeFrameNotification
notification (could cause an issue if other classes are listening and expecting a double value).
- Enabled images and documents sharing in conversation screen.
- The
Conversation
screen's navigation does not use large titles anymore (navigationItem.largeTitleDisplayMode
defaults to.never
). - The
Conversation
screen'shidesBottomBarWhenPushed
defaults totrue
.
- Fixed the original message preview layout in messaging cells.
- Fixed the composer text alignment in the conversation screen.
- Added
presentScheduleAppointmentViewController
toNablaScheduling
views.
- Messaging Core
VideoCallActionRequest
struct has been renamed toVideoCallRoomInteractiveMessage
. - Renamed
NablaSchedulingViewFactory.presentScheduleAppointmentViewController
toNablaSchedulingViewFactory.presentScheduleAppointmentNavigationController
.
- Introduced
NablaScheduling
SDK to schedule video call appointments usingNablaVideoCall
.
- Updated
LiveKit
pod dependency inNablaVideoCall
podspec.
- It is now possible to change the
title
andtitleView
ofNablaMessagingUI
view controllers.
- On simulator: disabled using the camera to send a new photo/video.
- On simulator: disabled joining video calls.
- View controllers no longer enforce
preferLargeTitles
on theirUINavigationController
. NablaVideoCallClient.views.createVideoCallRoomViewController(url:token:)
was removed in favor ofNablaVideoCallClient.openVideoCallRoom(url:token:from:)
. You no longer need to check for thecurrentVideoCall
before using this method.
- Prevents a crash on iOS 15.6
- Introduced
NablaVideoCall
SDK and video call requests fromNablaMessagingCore
.
- Changed
ConversationItems.items
inNablaMessagingClient.watchItems(ofConversationWithId:)
output ordering to be descending. - Removed
NablaUtils
target. - A new
modules
parameter is now required when callingNablaClient.initialize()
:
NablaClient.initialize(
apiKey = "Your API Key",
modules = [
NablaMessagingModule()
]
)
- The
NablaViewFactory
has been removed. You can now create the views fromNablaMessagingUI
SDK fromNablaClient.shared.messaging.views
instead.
- Fixed a crash when opening the "add media" action sheet on iPad.
- Fixed an issue when sending documents from iCloud files.
- Fixed an issue where new conversations would appear twice in the list.
- Fixed MessagingUI and MessagingCore pods resource_bundles
- Fixed
NablaMessaginCore
pod resources by adding missingspec.resource_bundles
. - Prevents websocket disconnects when keeping the app in foreground but inactive for a long time.
- Introduced
NablaMessagingClient.createDraftConversation
to create a conversation locally that does not exist yet server side. - Adds some
initialMessage
argument tocreateConversation
to pre-populate conversations. - Server-made i18n will now follow user's device language.
NablaClient.authenticate
now takes aString
rather than aUUID
to identify the user. This ID should be uniquely representing your current app user and will be passed to theSessionTokenProvider
when a call to your backend is needed to get fresh authentication tokens.
- Fixes an issue where creating multiple watchers would cause some to stop receiving updates after one of them is deallocated.
- Fixed a bug preventing conversation from appearing "seen" the first time you tap on them.
- You can now tap on links and phone numbers in text messages.
- Make some
NablaTheme
property public instead of internal. - A
NetworkError
will now be returned in case of a network error instead of aServerError
before. - Fix an issue where date separators would be incorrectly ordered in the chat.
- Conversations in
watchConversations()
are now correctly sorted by theirlastModified
date. Tokens
has been renamed toAuthTokens
for more clarity.
- Fix for
watchConversations()
that would return the sameConversation
multiple times under certain conditions.
- Methods like
watchConversations()
,watchConverversation()
orwatchItems(ofConversationWithId:)
now return aWatcher
. - Using
NablaMessagingUI
will automatically register someNotificationRefetchTrigger
forUIApplication.willEnterForegroundNotification
.
Configuration
has been renamed toNetworkConfiguration
. This should not have an impact on an existing app as this is supposed to be for internal tests only.- Added a new
showComposer
parameter toNablaViewFactory.createConversationViewController
that can be set to false to hide the message composer for the patient. PaginatedWatcher
now returns properNablaError
in case of error instead of the basicError
.- Extract
NablaClient
fromNablaMessagingCore
to a newNablaCore
library. - Replaced
providerIdToAssign
by a list aproviderIds
inNablaMessagingClient.createConversation
.
- Added
headerTitleFont
,headerSubtitleFont
,headerTitleColor
andheaderSubtitleColor
toNablaTheme.Conversation
to customize the look of theConversationViewController
header
- Remove the
description
field fromConversation
and replace it by asubtitle
that is displayed by theConversationViewController
NablaTheme.Conversation.textSeparatorFont
&NablaTheme.Conversation.textSeparatorColor
have been split intodateSeparator
&conversationActivity
items to allow for customization of the 2 elements differently
- Add default
title
andproviderIdToAssign
arguments tocreateConversation()
endpoint. Fixes #1.
- Added the handle of replies to message, Core & UI.
- Added video messages, Core & UI.
NablaViewFactory
can create anInboxViewController
that adds the button to create conversation and create them.- Added optional
title
andproviderIdToAssign
arguments toNablaMessagingClient.createConversation
.
ConversationViewController
can be used without aUINavigationController
NablaMessagingClient.sendMessage
now takes an optional parameterreplyToMessageId
of typeUUID?
which correspond to the message the patient replies to.MimeType
is now split in different types (image, video, audio, document) and fallback on wildcard when receiving an unknown value.NablaClient.initialise
now logs awarning
log in case of multiple calls instead of afailure
.
ConversationsListView
andConversationViewController
now use the device locale to format dates.
- Enable use of
NablaViewFactory.createConversationViewController
with the conversation'sUUID
only. - It is possible to inject a
Logger
intoNablaClient.initialize
to intercept the SDK's logs.
- Used
spec.resource_bundles
instead ofspec.resources
forNablaMessaginUI
podspec.
- New
ConversationActivity
items are now correctly handled when the chat is open.
- Automatically refreshes expired
accessToken
returned bySessionTokenProvider.provideTokens
.
ConversationActivity
in conversations. A message is displayed when a provider joins a conversation.ConversationViewController
now displays system messages, with the right name and avatar.- The creation of audio messages is now supported. To make it work, you should fill your
info.plist
with the keyNSMicrophoneUsageDescription
with the desired description.
ConversationMessageSender.sender
now exposes aSystemProvider
parameter which contains the name of the organization and the avatar url.ConversationMessageSender.system
now exposes aSystemProvider
parameter which contains the name of the organization and the avatar url.ConversationMessageSender
now exposes a new.unknown
case for sender types that are not handled by this version of the SDK.NablaTheme
simplified it's internal naming.
- This CHANGELOG file
NablaMessagingUI
conversation screen now separates older messages from newer with a date separatorNablaMessagingUI
avatar component now displays Provider initials when no avatar picture is availableNablaMessagingUI
conversation screen now has an option to copy any text message in the conversation- Public APIs are now documented in the code, making it available for developers in Xcode
- Started Cocoapods support for SDK integration
NablaClient
messaging APIs are now a part ofNablaMessagingClient
. Only initialization and authentication are provided byNablaClient
NablaAuthenticationProvider
has been renamedSessionTokenProvider
watchConversationList
has been renamedwatchConversations
- You can now pass your own instance of
NablaMessagingClient
to any UI component ofNablaMessagingUI
NablaClient.authenticate
now requires auserId
in addition to theSessionTokenProvider
, this id should be stable if the authenticated user doesn't change- Some
NablaMessagingUI
strings have been updated Conversation
struct has been revamped and now contains the providers with a properProviderInConversation
structNablaMessagingClient.watchConversationItems
now returns aConversationItems
struct which only contains the messages themselves. Details of the conversation and its participants should now be watched usingNablaMessagingClient.watchConversation
- Used explicit errors for
NablaMessagingClient
methods
NablaMessagingClient
now correctly triggerswatchConversationItems
watcher when a Provider is not typing anymoreNablaMessagingUI
conversation screen now correctly adds an image message in the conversation optimistically while sending it to the serverNablaMessagingUI
conversation screen now correctly provides an image picker to upload an image from the library on iOS 13
- First public version of the SDK