Browse Source

ios: update SDK documentation

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
f696a6dbe2
4 changed files with 53 additions and 88 deletions
  1. 29
    88
      ios/README.md
  2. 14
    0
      ios/sdk/src/JitsiMeet.h
  3. 7
    0
      ios/sdk/src/JitsiMeetView.h
  4. 3
    0
      ios/sdk/src/JitsiMeetView.m

+ 29
- 88
ios/README.md View File

43
   [super viewDidLoad];
43
   [super viewDidLoad];
44
 
44
 
45
   JitsiMeetView *jitsiMeetView = (JitsiMeetView *) self.view;
45
   JitsiMeetView *jitsiMeetView = (JitsiMeetView *) self.view;
46
-
47
   jitsiMeetView.delegate = self;
46
   jitsiMeetView.delegate = self;
48
-  [jitsiMeetView loadURL:nil];
47
+
48
+  JitsiMeetConferenceOptions *options = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
49
+      builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
50
+      builder.room = @"test123";
51
+      builder.audioOnly = YES;
52
+  }];
53
+
54
+  [jitsiMeetView join:options];
49
 }
55
 }
50
 ```
56
 ```
51
 
57
 
58
 
64
 
59
 Property to get/set the `JitsiMeetViewDelegate` on `JitsiMeetView`.
65
 Property to get/set the `JitsiMeetViewDelegate` on `JitsiMeetView`.
60
 
66
 
61
-#### defaultURL
62
-
63
-Property to get/set the default base URL used to join a conference when a
64
-partial URL (e.g. a room name only) is specified to
65
-`loadURLString:`/`loadURLObject:`. If not set or if set to `nil`, the default
66
-built in JavaScript is used: https://meet.jit.si.
67
-
68
-NOTE: Must be set (if at all) before `loadURL:`/`loadURLString:` for it to take
69
-effect.
70
-
71
-#### pictureInPictureEnabled
72
-
73
-Property to get / set whether Picture-in-Picture is enabled. Defaults to `YES`
74
-if `delegate` implements `enterPictureInPicture:`; otherwise, `NO`.
75
-
76
-NOTE: Must be set (if at all) before `loadURL:`/`loadURLString:` for it to take
77
-effect.
78
-
79
-#### welcomePageEnabled
80
-
81
-Property to get/set whether the Welcome page is enabled. If `NO`, a black empty
82
-view will be rendered when not in a conference. Defaults to `NO`.
67
+#### join:JitsiMeetConferenceOptions
83
 
68
 
84
-NOTE: Must be set (if at all) before `loadURL:`/`loadURLString:` for it to take
85
-effect.
86
-
87
-#### loadURL:NSURL
69
+Joins the conference specified by the given options.
88
 
70
 
89
 ```objc
71
 ```objc
90
-[jitsiMeetView loadURL:[NSURL URLWithString:@"https://meet.jit.si/test123"]];
72
+  JitsiMeetConferenceOptions *options = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
73
+      builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
74
+      builder.room = @"test123";
75
+      builder.audioOnly = NO;
76
+      builder.audioMuted = NO;
77
+      builder.videoMuted = NO;
78
+      builder.welcomePageEnabled = NO;
79
+  }];
80
+
81
+  [jitsiMeetView join:options];
91
 ```
82
 ```
92
 
83
 
93
-Loads a specific URL which may identify a conference to join. If the specified
94
-URL is `nil` and the Welcome page is enabled, the Welcome page is displayed
95
-instead.
96
-
97
-#### loadURLObject:NSDictionary
98
-
99
-```objc
100
-[jitsiMeetView loadURLObject:@{
101
-    @"config": @{
102
-        @"startWithAudioMuted": @YES,
103
-        @"startWithVideoMuted": @NO
104
-    },
105
-    @"url": @"https://meet.jit.si/test123"
106
-}];
107
-```
84
+#### leave
108
 
85
 
109
-Loads a specific URL which may identify a conference to join. The URL is
110
-specified in the form of an `NSDictionary` of properties which (1) internally
111
-are sufficient to construct a URL (string) while (2) abstracting the specifics
112
-of constructing the URL away from API clients/consumers. If the specified URL is
113
-`nil` and the Welcome page is enabled, the Welcome page is displayed instead.
114
-
115
-#### loadURLString:NSString
116
-
117
-```objc
118
-[jitsiMeetView loadURLString:@"https://meet.jit.si/test123"];
119
-```
120
-
121
-Loads a specific URL which may identify a conference to join. If the specified
122
-URL is `nil` and the Welcome page is enabled, the Welcome page is displayed
123
-instead.
86
+Leaves the currently active conference.
124
 
87
 
125
 #### Universal / deep linking
88
 #### Universal / deep linking
126
 
89
 
128
 methods that you app's delegate should call in order for the app to follow those
91
 methods that you app's delegate should call in order for the app to follow those
129
 links.
92
 links.
130
 
93
 
94
+If these functions return NO it means the URL wasn't handled by the SDK. This
95
+is useful when the host application uses other SDKs which also use linking.
96
+
131
 ```objc
97
 ```objc
132
 -  (BOOL)application:(UIApplication *)application
98
 -  (BOOL)application:(UIApplication *)application
133
 continueUserActivity:(NSUserActivity *)userActivity
99
 continueUserActivity:(NSUserActivity *)userActivity
151
                             options: options];
117
                             options: options];
152
 }
118
 }
153
 ```
119
 ```
154
-or
155
-```objc
156
-// See https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623112-application?language=objc
157
-- (BOOL)application:(UIApplication *)application
158
-            openURL:(NSURL *)url
159
-  sourceApplication:(NSString *)sourceApplication
160
-         annotation:(id)annotation
161
-{
162
-  return [JitsiMeetView application:application
163
-                            openURL:url
164
-                  sourceApplication:sourceApplication
165
-                         annotation:annotation];
166
-}
167
-```
168
-
169
-NOTE: The latter is deprecated.
170
 
120
 
171
 ### JitsiMeetViewDelegate
121
 ### JitsiMeetViewDelegate
172
 
122
 
239
 desired, apps need to implement non-native Picture-in-Picture themselves and
189
 desired, apps need to implement non-native Picture-in-Picture themselves and
240
 resize `JitsiMeetView`.
190
 resize `JitsiMeetView`.
241
 
191
 
242
-If `pictureInPictureEnabled` is set to `YES` or `delegate` implements
243
-`enterPictureInPicture:`, the in-call toolbar will render a button to afford the
244
-user to request entering Picture-in-Picture.
192
+If `delegate` implements `enterPictureInPicture:`, the in-call toolbar will
193
+render a button to afford the user to request entering Picture-in-Picture.
245
 
194
 
246
 ## Dropbox integration
195
 ## Dropbox integration
247
 
196
 
268
 </array>
217
 </array>
269
 ```
218
 ```
270
 
219
 
271
-2. Add the following to the app's `AppDelegate`:
272
-```objc
273
-- (BOOL)application:(UIApplication *)app
274
-            openURL:(NSURL *)url
275
-            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
276
-  return [JitsiMeetView application:app
277
-                            openURL:url
278
-                            options:options];
279
-}
280
-```
220
+2. Make sure your app calls the Jitsi Meet SDK universal / deep linking delegate
221
+   methods.

+ 14
- 0
ios/sdk/src/JitsiMeet.h View File

22
 
22
 
23
 @interface JitsiMeet : NSObject
23
 @interface JitsiMeet : NSObject
24
 
24
 
25
+/**
26
+ * Name for the conference NSUserActivity type. This is used when integrating with
27
+ * SiriKit or Handoff, for example.
28
+ */
25
 @property (copy, nonatomic, nullable) NSString *conferenceActivityType;
29
 @property (copy, nonatomic, nullable) NSString *conferenceActivityType;
30
+/**
31
+ * Custom URL scheme used for deep-linking.
32
+ */
26
 @property (copy, nonatomic, nullable) NSString *customUrlScheme;
33
 @property (copy, nonatomic, nullable) NSString *customUrlScheme;
34
+/**
35
+ * List of domains used for universal linking.
36
+ */
27
 @property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
37
 @property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
28
 
38
 
39
+/**
40
+ * Default conference options used for all conferences. These options will be merged
41
+ * with those passed to JitsiMeetView.join when joining a conference.
42
+ */
29
 @property (nonatomic, nullable) JitsiMeetConferenceOptions *defaultConferenceOptions;
43
 @property (nonatomic, nullable) JitsiMeetConferenceOptions *defaultConferenceOptions;
30
 
44
 
31
 #pragma mak - This class is a singleton
45
 #pragma mak - This class is a singleton

+ 7
- 0
ios/sdk/src/JitsiMeetView.h View File

25
 
25
 
26
 @property (nonatomic, nullable, weak) id<JitsiMeetViewDelegate> delegate;
26
 @property (nonatomic, nullable, weak) id<JitsiMeetViewDelegate> delegate;
27
 
27
 
28
+/**
29
+ * Joins the conference specified by the given options. The gievn options will
30
+ * be merged with the defaultConferenceOptions (if set) in JitsiMeet.
31
+ */
28
 - (void)join:(JitsiMeetConferenceOptions *)options;
32
 - (void)join:(JitsiMeetConferenceOptions *)options;
33
+/**
34
+ * Leaves the currently active conference.
35
+ */
29
 - (void)leave;
36
 - (void)leave;
30
 
37
 
31
 @end
38
 @end

+ 3
- 0
ios/sdk/src/JitsiMeetView.m View File

33
      */
33
      */
34
     NSString *externalAPIScope;
34
     NSString *externalAPIScope;
35
 
35
 
36
+    /**
37
+     * React Native view where the entire content will be rendered.
38
+     */
36
     RCTRootView *rootView;
39
     RCTRootView *rootView;
37
 }
40
 }
38
 
41
 

Loading…
Cancel
Save