b1100a9c7a
Ladies and gentlemen, allow me to introduce you to Jitsi Meet SDK for iOS, the mobile SDK which powers Jitsi Meet. The goal is to encapsulate the entire React Native app into a framework / SDK and offer an API for native (ObjC or Swift) applications to embed the Jitsi conferencing experience. While React Native can be embedded in native applications, I don't think it was designed to be embedded as part of a framework, hidden away from the application using it. This surfaced as a number of issues which had to be addressed specifically due to our use-case: - Universal / deep linking needed to be wrapped to avoid the embedding app from linking with RN. - The bundle URL had to be manually constructed, since RN considers that all resources are in the main bundle, but in case of a framework that is not the case. - Custom fonts had to be manually loaded, since UIAppFonts doesn't work on the framework's Info.plist file. - The RN packager has to be manually triggered since the React project will no longer do it for us. - Custom App Transport Security rules were added since the builtin way to do it modifies the framework's Info.plist, which is useless in this case. At this stage, the Jitsi Meet application is just a small single view application which uses the Jitsi Meet SDK to create a single view which represents the entire application. Events and external conference handling are forthcoming. |
||
---|---|---|
.. | ||
Jitsi Meet SDK.xcodeproj | ||
app | ||
jitsi-meet.xcodeproj | ||
jitsi-meet.xcworkspace | ||
sdk | ||
utils | ||
Podfile | ||
README.md | ||
apple-app-site-association | ||
jitsi-meet.entitlements |
README.md
Jitsi Meet SDK for iOS
This directory contains the source code for Jitsi Meet for iOS (the application) and the Jitsi Meet SDK.
Jitsi Meet SDK
JitsiMeet is an iOS framework which embodies the Jitsi Meet experience,
gift-wrapped so other applications can use it. Using it is very simple. Use
a Storyboard or Interface Builder to add a JitsiMeetView
to your
application.
Then, once the view has loaded, set the delegate in your controller and load the desired URL:
- (void)viewDidLoad {
[super viewDidLoad];
JitsiMeetView *meetView = (JitsiMeetView*) self.view;
meetView.delegate = self;
[meetView loadURL:nil];
}
JitsiMeetView class
The JitsiMeetView
class is the entrypoint to the SDK. It a subclass of
UIView
which renders a full conference in the designated area.
[meetView loadURL:[NSURL URLWithString:@"https://meet.jit.si/test123"]];
Loads the given URL and joins the room. If null
is specified the welcome page
is displayed instead.
Universal / deep linking
In order to support universal / deep linking, JitsiMeetView
offers 2 class
methods that you application's delegate should call in order for the application
to follow those links. Example:
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
{
return [JitsiMeetView application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
{
return [JitsiMeetView application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
JitsiMeetViewDelegate
TODO.