瀏覽代碼

ios: update SDK documentation

master
Saúl Ibarra Corretgé 6 年之前
父節點
當前提交
f696a6dbe2
共有 4 個檔案被更改,包括 53 行新增88 行删除
  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 查看文件

@@ -43,9 +43,15 @@ To get started:
43 43
   [super viewDidLoad];
44 44
 
45 45
   JitsiMeetView *jitsiMeetView = (JitsiMeetView *) self.view;
46
-
47 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,69 +64,26 @@ The `JitsiMeetView` class is the entry point to the SDK. It a subclass of
58 64
 
59 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 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 88
 #### Universal / deep linking
126 89
 
@@ -128,6 +91,9 @@ In order to support Universal / deep linking, `JitsiMeetView` offers 2 class
128 91
 methods that you app's delegate should call in order for the app to follow those
129 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 97
 ```objc
132 98
 -  (BOOL)application:(UIApplication *)application
133 99
 continueUserActivity:(NSUserActivity *)userActivity
@@ -151,22 +117,6 @@ And also one of the following:
151 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 121
 ### JitsiMeetViewDelegate
172 122
 
@@ -239,9 +189,8 @@ Jitsi Meet SDK does not currently implement native Picture-in-Picture on iOS. If
239 189
 desired, apps need to implement non-native Picture-in-Picture themselves and
240 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 195
 ## Dropbox integration
247 196
 
@@ -268,13 +217,5 @@ Dropbox app key:
268 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 查看文件

@@ -22,10 +22,24 @@
22 22
 
23 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 29
 @property (copy, nonatomic, nullable) NSString *conferenceActivityType;
30
+/**
31
+ * Custom URL scheme used for deep-linking.
32
+ */
26 33
 @property (copy, nonatomic, nullable) NSString *customUrlScheme;
34
+/**
35
+ * List of domains used for universal linking.
36
+ */
27 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 43
 @property (nonatomic, nullable) JitsiMeetConferenceOptions *defaultConferenceOptions;
30 44
 
31 45
 #pragma mak - This class is a singleton

+ 7
- 0
ios/sdk/src/JitsiMeetView.h 查看文件

@@ -25,7 +25,14 @@
25 25
 
26 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 32
 - (void)join:(JitsiMeetConferenceOptions *)options;
33
+/**
34
+ * Leaves the currently active conference.
35
+ */
29 36
 - (void)leave;
30 37
 
31 38
 @end

+ 3
- 0
ios/sdk/src/JitsiMeetView.m 查看文件

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

Loading…
取消
儲存