Procházet zdrojové kódy

[RN] Consistency in Jitsi Meet SDK for iOS

1. Aligns the project structure of Jitsi Meet SDK for iOS with that for
   Android for better comprehension.

2. The command `react-native run-ios` uses the last Xcode project or
   workspace in the list of these sorted in alphabetical order. Which
   limits our freedom in naming. Thus having only an Xcode project in
   the root directory of the iOS project structure gives us back the
   freedom in naming.

3. Allows the Podspec to work for the app project in addition to the sdk
   project because we need Crashlytics in the app which is integrated
   via Cocoapods as well.

4. Further removes references to JitsiKit in the source code for the
   sake of consistent naming.
j8
Lyubo Marinov před 8 roky
rodič
revize
2251a17f96
42 změnil soubory, kde provedl 204 přidání a 216 odebrání
  1. 2
    2
      ios/Podfile
  2. 24
    20
      ios/README.md
  3. 0
    0
      ios/app/app.entitlements
  4. 27
    28
      ios/app/app.xcodeproj/project.pbxproj
  5. 5
    5
      ios/app/app.xcodeproj/xcshareddata/xcschemes/jitsi-meet.xcscheme
  6. 0
    1
      ios/app/src/AppDelegate.h
  7. 15
    18
      ios/app/src/AppDelegate.m
  8. 0
    0
      ios/app/src/Base.lproj/LaunchScreen.xib
  9. 0
    0
      ios/app/src/Base.lproj/Main.storyboard
  10. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-29@2x.png
  11. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-29@3x.png
  12. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-40@2x.png
  13. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-60@2x.png
  14. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-60@3x.png
  15. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-76@1x.png
  16. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-76@2x.png
  17. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-83.5@2x.png
  18. 0
    0
      ios/app/src/Images.xcassets/AppIcon.appiconset/Contents.json
  19. 0
    0
      ios/app/src/Images.xcassets/Contents.json
  20. 0
    0
      ios/app/src/Images.xcassets/LaunchScreen.imageset/Contents.json
  21. 0
    0
      ios/app/src/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@1x.png
  22. 0
    0
      ios/app/src/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@2x.png
  23. 0
    0
      ios/app/src/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@3x.png
  24. 0
    0
      ios/app/src/Info.plist
  25. 0
    1
      ios/app/src/ViewController.h
  26. 8
    7
      ios/app/src/ViewController.m
  27. 6
    3
      ios/app/src/main.m
  28. 2
    2
      ios/jitsi-meet.xcworkspace/contents.xcworkspacedata
  29. 0
    0
      ios/scripts/fixup-ats.sh
  30. 0
    0
      ios/scripts/fixup-frameworks.sh
  31. 1
    1
      ios/scripts/run-packager.sh
  32. 46
    46
      ios/sdk/sdk.xcodeproj/project.pbxproj
  33. 0
    0
      ios/sdk/src/AudioMode.m
  34. 5
    5
      ios/sdk/src/Info.plist
  35. 0
    0
      ios/sdk/src/JitsiMeet.h
  36. 3
    4
      ios/sdk/src/JitsiMeetView.h
  37. 23
    32
      ios/sdk/src/JitsiMeetView.m
  38. 0
    0
      ios/sdk/src/JitsiMeetViewDelegate.h
  39. 0
    0
      ios/sdk/src/POSIX.m
  40. 0
    0
      ios/sdk/src/Proximity.m
  41. 1
    1
      ios/sdk/src/RCTBridgeWrapper.h
  42. 36
    40
      ios/sdk/src/RCTBridgeWrapper.m

+ 2
- 2
ios/Podfile Zobrazit soubor

@@ -1,9 +1,10 @@
1 1
 platform :ios, '9.0'
2 2
 
3 3
 workspace 'jitsi-meet'
4
-project 'Jitsi Meet SDK.xcodeproj'
5 4
 
6 5
 target 'JitsiMeet' do
6
+  project 'sdk/sdk.xcodeproj'
7
+
7 8
   pod 'React', :path => '../node_modules/react-native', :subspecs => [
8 9
     'Core',
9 10
     'RCTActionSheet',
@@ -20,7 +21,6 @@ target 'JitsiMeet' do
20 21
   pod 'react-native-keep-awake', :path => '../node_modules/react-native-keep-awake'
21 22
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
22 23
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
23
-
24 24
 end
25 25
 
26 26
 post_install do |installer|

+ 24
- 20
ios/README.md Zobrazit soubor

@@ -1,60 +1,64 @@
1 1
 # Jitsi Meet SDK for iOS
2 2
 
3
-This directory contains the source code for Jitsi Meet for iOS (the application)
4
-and the Jitsi Meet SDK.
3
+This directory contains the source code of the Jitsi Meet app and the Jitsi Meet
4
+SDK for iOS.
5 5
 
6 6
 ## Jitsi Meet SDK
7 7
 
8
-JitsiMeet is an iOS framework which embodies the Jitsi Meet experience,
9
-gift-wrapped so other applications can use it. Using it is very simple. Use
10
-a Storyboard or Interface Builder to add a `JitsiMeetView` to your
11
-application.
8
+JitsiMeet is an iOS framework which embodies the whole Jitsi Meet experience and
9
+makes it reusable by third-party apps.
12 10
 
13
-Then, once the view has loaded, set the delegate in your controller and load the
14
-desired URL:
11
+To get started:
12
+
13
+1. Add a `JitsiMeetView` to your app using a Storyboard or Interface Builder,
14
+   for example.
15
+
16
+2. Then, once the view has loaded, set the delegate in your controller and load
17
+   the desired URL:
15 18
 
16 19
 ```objc
17 20
 - (void)viewDidLoad {
18 21
   [super viewDidLoad];
19 22
 
20
-  JitsiMeetView *meetView = (JitsiMeetView*) self.view;
21
-  meetView.delegate = self;
22
-  [meetView loadURL:nil];
23
+  JitsiMeetView *view = (JitsiMeetView *) self.view;
24
+
25
+  view.delegate = self;
26
+  [view loadURL:nil];
23 27
 }
24 28
 ```
25 29
 
26 30
 ### JitsiMeetView class
27 31
 
28
-The `JitsiMeetView` class is the entrypoint to the SDK. It a subclass of
32
+The `JitsiMeetView` class is the entry point to the SDK. It a subclass of
29 33
 `UIView` which renders a full conference in the designated area.
30 34
 
31 35
 ```objc
32 36
 [meetView loadURL:[NSURL URLWithString:@"https://meet.jit.si/test123"]];
33 37
 ```
34 38
 
35
-Loads the given URL and joins the room. If `null` is specified the welcome page
39
+Loads the given URL and joins the room. If `null` is specified, the welcome page
36 40
 is displayed instead.
37 41
 
38 42
 #### Universal / deep linking
39 43
 
40
-In order to support universal / deep linking, `JitsiMeetView` offers 2 class
41
-methods that you application's delegate should call in order for the application
42
-to follow those links. Example:
44
+In order to support Universal / deep linking, `JitsiMeetView` offers 2 class
45
+methods that you app's delegate should call in order for the app to follow those
46
+links.
43 47
 
44 48
 ```objc
45
-- (BOOL)application:(UIApplication *)application
49
+-  (BOOL)application:(UIApplication *)application
46 50
 continueUserActivity:(NSUserActivity *)userActivity
47
- restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
51
+  restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
48 52
 {
49 53
   return [JitsiMeetView application:application
50 54
                continueUserActivity:userActivity
51 55
                  restorationHandler:restorationHandler];
52
- }
56
+}
53 57
 
54 58
 - (BOOL)application:(UIApplication *)application
55 59
             openURL:(NSURL *)url
56 60
   sourceApplication:(NSString *)sourceApplication
57
-        annotation:(id)annotation
61
+         annotation:(id)annotation
58 62
 {
59 63
   return [JitsiMeetView application:application
60 64
                             openURL:url

ios/jitsi-meet.entitlements → ios/app/app.entitlements Zobrazit soubor


ios/jitsi-meet.xcodeproj/project.pbxproj → ios/app/app.xcodeproj/project.pbxproj Zobrazit soubor

@@ -33,17 +33,17 @@
33 33
 
34 34
 /* Begin PBXFileReference section */
35 35
 		0B26BE6D1EC5BC3C00EEFB41 /* JitsiMeet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = JitsiMeet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
36
-		0B412F1D1EDEE6E800B1A0A6 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = app/ViewController.h; sourceTree = "<group>"; };
37
-		0B412F1E1EDEE6E800B1A0A6 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = app/ViewController.m; sourceTree = "<group>"; };
38
-		0B412F201EDEE95300B1A0A6 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = app/Base.lproj/Main.storyboard; sourceTree = "<group>"; };
36
+		0B412F1D1EDEE6E800B1A0A6 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
37
+		0B412F1E1EDEE6E800B1A0A6 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
38
+		0B412F201EDEE95300B1A0A6 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
39 39
 		13B07F961A680F5B00A75B9A /* jitsi-meet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "jitsi-meet.app"; sourceTree = BUILT_PRODUCTS_DIR; };
40
-		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = app/AppDelegate.h; sourceTree = "<group>"; };
41
-		13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = app/AppDelegate.m; sourceTree = "<group>"; };
40
+		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
41
+		13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
42 42
 		13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
43
-		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = app/Images.xcassets; sourceTree = "<group>"; };
44
-		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = app/Info.plist; sourceTree = "<group>"; };
45
-		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = app/main.m; sourceTree = "<group>"; };
46
-		B3B083EB1D4955FF0069CEE7 /* jitsi-meet.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "jitsi-meet.entitlements"; sourceTree = "<group>"; };
43
+		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
44
+		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
45
+		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
46
+		B3B083EB1D4955FF0069CEE7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = app.entitlements; sourceTree = "<group>"; };
47 47
 /* End PBXFileReference section */
48 48
 
49 49
 /* Begin PBXFrameworksBuildPhase section */
@@ -66,29 +66,29 @@
66 66
 			name = Frameworks;
67 67
 			sourceTree = "<group>";
68 68
 		};
69
-		13B07FAE1A68108700A75B9A /* app */ = {
69
+		13B07FAE1A68108700A75B9A /* src */ = {
70 70
 			isa = PBXGroup;
71 71
 			children = (
72
-				13B07FB71A68108700A75B9A /* main.m */,
73 72
 				13B07FAF1A68108700A75B9A /* AppDelegate.h */,
74 73
 				13B07FB01A68108700A75B9A /* AppDelegate.m */,
75
-				0B412F1D1EDEE6E800B1A0A6 /* ViewController.h */,
76
-				0B412F1E1EDEE6E800B1A0A6 /* ViewController.m */,
77
-				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
78
-				0B412F201EDEE95300B1A0A6 /* Main.storyboard */,
79 74
 				13B07FB51A68108700A75B9A /* Images.xcassets */,
80 75
 				13B07FB61A68108700A75B9A /* Info.plist */,
76
+				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
77
+				13B07FB71A68108700A75B9A /* main.m */,
78
+				0B412F201EDEE95300B1A0A6 /* Main.storyboard */,
79
+				0B412F1D1EDEE6E800B1A0A6 /* ViewController.h */,
80
+				0B412F1E1EDEE6E800B1A0A6 /* ViewController.m */,
81 81
 			);
82
-			name = app;
82
+			path = src;
83 83
 			sourceTree = "<group>";
84 84
 		};
85 85
 		83CBB9F61A601CBA00E9B192 = {
86 86
 			isa = PBXGroup;
87 87
 			children = (
88
+				B3B083EB1D4955FF0069CEE7 /* app.entitlements */,
88 89
 				0B26BE711EC5BC4D00EEFB41 /* Frameworks */,
89
-				13B07FAE1A68108700A75B9A /* app */,
90
-				B3B083EB1D4955FF0069CEE7 /* jitsi-meet.entitlements */,
91 90
 				83CBBA001A601CBA00E9B192 /* Products */,
91
+				13B07FAE1A68108700A75B9A /* src */,
92 92
 			);
93 93
 			indentWidth = 2;
94 94
 			sourceTree = "<group>";
@@ -145,7 +145,7 @@
145 145
 					};
146 146
 				};
147 147
 			};
148
-			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "jitsi-meet" */;
148
+			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "app" */;
149 149
 			compatibilityVersion = "Xcode 3.2";
150 150
 			developmentRegion = English;
151 151
 			hasScannedForEncodings = 0;
@@ -189,7 +189,7 @@
189 189
 			);
190 190
 			runOnlyForDeploymentPostprocessing = 0;
191 191
 			shellPath = /bin/sh;
192
-			shellScript = "utils/fixup-ats.sh";
192
+			shellScript = "../scripts/fixup-ats.sh";
193 193
 		};
194 194
 		0BBA83C41EC9F7600075A103 /* Run React packager */ = {
195 195
 			isa = PBXShellScriptBuildPhase;
@@ -203,7 +203,7 @@
203 203
 			);
204 204
 			runOnlyForDeploymentPostprocessing = 0;
205 205
 			shellPath = /bin/sh;
206
-			shellScript = "utils/run-packager.sh";
206
+			shellScript = "../scripts/run-packager.sh";
207 207
 		};
208 208
 		B35383AD1DDA0083008F406A /* Adjust embedded framework architectures */ = {
209 209
 			isa = PBXShellScriptBuildPhase;
@@ -217,7 +217,7 @@
217 217
 			);
218 218
 			runOnlyForDeploymentPostprocessing = 0;
219 219
 			shellPath = /bin/sh;
220
-			shellScript = "utils/fixup-frameworks.sh";
220
+			shellScript = "../scripts/fixup-frameworks.sh";
221 221
 		};
222 222
 /* End PBXShellScriptBuildPhase section */
223 223
 
@@ -241,7 +241,6 @@
241 241
 				13B07FB21A68108700A75B9A /* Base */,
242 242
 			);
243 243
 			name = LaunchScreen.xib;
244
-			path = app;
245 244
 			sourceTree = "<group>";
246 245
 		};
247 246
 /* End PBXVariantGroup section */
@@ -251,7 +250,7 @@
251 250
 			isa = XCBuildConfiguration;
252 251
 			buildSettings = {
253 252
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
254
-				CODE_SIGN_ENTITLEMENTS = "jitsi-meet.entitlements";
253
+				CODE_SIGN_ENTITLEMENTS = app.entitlements;
255 254
 				CURRENT_PROJECT_VERSION = 1;
256 255
 				DEAD_CODE_STRIPPING = NO;
257 256
 				ENABLE_BITCODE = NO;
@@ -260,7 +259,7 @@
260 259
 					"$(inherited)",
261 260
 					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
262 261
 				);
263
-				INFOPLIST_FILE = app/Info.plist;
262
+				INFOPLIST_FILE = src/Info.plist;
264 263
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
265 264
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
266 265
 				LIBRARY_SEARCH_PATHS = "$(inherited)";
@@ -279,7 +278,7 @@
279 278
 			isa = XCBuildConfiguration;
280 279
 			buildSettings = {
281 280
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
282
-				CODE_SIGN_ENTITLEMENTS = "jitsi-meet.entitlements";
281
+				CODE_SIGN_ENTITLEMENTS = app.entitlements;
283 282
 				CURRENT_PROJECT_VERSION = 1;
284 283
 				ENABLE_BITCODE = NO;
285 284
 				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
@@ -287,7 +286,7 @@
287 286
 					"$(inherited)",
288 287
 					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
289 288
 				);
290
-				INFOPLIST_FILE = app/Info.plist;
289
+				INFOPLIST_FILE = src/Info.plist;
291 290
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
292 291
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
293 292
 				LIBRARY_SEARCH_PATHS = "$(inherited)";
@@ -407,7 +406,7 @@
407 406
 			defaultConfigurationIsVisible = 0;
408 407
 			defaultConfigurationName = Release;
409 408
 		};
410
-		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "jitsi-meet" */ = {
409
+		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "app" */ = {
411 410
 			isa = XCConfigurationList;
412 411
 			buildConfigurations = (
413 412
 				83CBBA201A601CBA00E9B192 /* Debug */,

ios/jitsi-meet.xcodeproj/xcshareddata/xcschemes/jitsi-meet.xcscheme → ios/app/app.xcodeproj/xcshareddata/xcschemes/jitsi-meet.xcscheme Zobrazit soubor

@@ -17,7 +17,7 @@
17 17
                BlueprintIdentifier = "0BD906E41EC0C00300C8C18E"
18 18
                BuildableName = "JitsiMeet.framework"
19 19
                BlueprintName = "JitsiMeet"
20
-               ReferencedContainer = "container:Jitsi Meet SDK.xcodeproj">
20
+               ReferencedContainer = "container:sdk.xcodeproj">
21 21
             </BuildableReference>
22 22
          </BuildActionEntry>
23 23
          <BuildActionEntry
@@ -31,7 +31,7 @@
31 31
                BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
32 32
                BuildableName = "jitsi-meet.app"
33 33
                BlueprintName = "jitsi-meet"
34
-               ReferencedContainer = "container:jitsi-meet.xcodeproj">
34
+               ReferencedContainer = "container:app.xcodeproj">
35 35
             </BuildableReference>
36 36
          </BuildActionEntry>
37 37
       </BuildActionEntries>
@@ -49,7 +49,7 @@
49 49
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
50 50
             BuildableName = "jitsi-meet.app"
51 51
             BlueprintName = "jitsi-meet"
52
-            ReferencedContainer = "container:jitsi-meet.xcodeproj">
52
+            ReferencedContainer = "container:app.xcodeproj">
53 53
          </BuildableReference>
54 54
       </MacroExpansion>
55 55
       <AdditionalOptions>
@@ -72,7 +72,7 @@
72 72
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
73 73
             BuildableName = "jitsi-meet.app"
74 74
             BlueprintName = "jitsi-meet"
75
-            ReferencedContainer = "container:jitsi-meet.xcodeproj">
75
+            ReferencedContainer = "container:app.xcodeproj">
76 76
          </BuildableReference>
77 77
       </BuildableProductRunnable>
78 78
       <AdditionalOptions>
@@ -91,7 +91,7 @@
91 91
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
92 92
             BuildableName = "jitsi-meet.app"
93 93
             BlueprintName = "jitsi-meet"
94
-            ReferencedContainer = "container:jitsi-meet.xcodeproj">
94
+            ReferencedContainer = "container:app.xcodeproj">
95 95
          </BuildableReference>
96 96
       </BuildableProductRunnable>
97 97
    </ProfileAction>

ios/app/AppDelegate.h → ios/app/src/AppDelegate.h Zobrazit soubor

@@ -16,7 +16,6 @@
16 16
 
17 17
 #import <UIKit/UIKit.h>
18 18
 
19
-
20 19
 @interface AppDelegate : UIResponder <UIApplicationDelegate>
21 20
 
22 21
 @property (nonatomic, strong) UIWindow *window;

ios/app/AppDelegate.m → ios/app/src/AppDelegate.m Zobrazit soubor

@@ -18,34 +18,31 @@
18 18
 
19 19
 #import <JitsiMeet/JitsiMeet.h>
20 20
 
21
-
22 21
 @implementation AppDelegate
23 22
 
24
-- (BOOL)application:(UIApplication *)application
25
-    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
26
-  return YES;
23
+-             (BOOL)application:(UIApplication *)application
24
+  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
25
+    return YES;
27 26
 }
28 27
 
29
-#pragma mark linking delegate methods
28
+#pragma mark Linking delegate methods
30 29
 
31
-- (BOOL)application:(UIApplication *)application
30
+-  (BOOL)application:(UIApplication *)application
32 31
 continueUserActivity:(NSUserActivity *)userActivity
33
- restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
34
-{
35
-  return [JitsiMeetView application:application
36
-                  continueUserActivity:userActivity
37
-                    restorationHandler:restorationHandler];
38
- }
32
+  restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
33
+    return [JitsiMeetView application:application
34
+                 continueUserActivity:userActivity
35
+                   restorationHandler:restorationHandler];
36
+}
39 37
 
40 38
 - (BOOL)application:(UIApplication *)application
41 39
             openURL:(NSURL *)url
42 40
   sourceApplication:(NSString *)sourceApplication
43
-        annotation:(id)annotation
44
-{
45
-  return [JitsiMeetView application:application
46
-                            openURL:url
47
-                  sourceApplication:sourceApplication
48
-                         annotation:annotation];
41
+         annotation:(id)annotation {
42
+    return [JitsiMeetView application:application
43
+                              openURL:url
44
+                    sourceApplication:sourceApplication
45
+                           annotation:annotation];
49 46
 }
50 47
 
51 48
 @end

ios/app/Base.lproj/LaunchScreen.xib → ios/app/src/Base.lproj/LaunchScreen.xib Zobrazit soubor


ios/app/Base.lproj/Main.storyboard → ios/app/src/Base.lproj/Main.storyboard Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-29@2x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-29@2x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-29@3x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-29@3x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-40@2x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-40@2x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-60@2x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-60@2x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-60@3x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-60@3x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-76@1x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-76@1x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-76@2x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-76@2x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/AppIcon-83.5@2x.png → ios/app/src/Images.xcassets/AppIcon.appiconset/AppIcon-83.5@2x.png Zobrazit soubor


ios/app/Images.xcassets/AppIcon.appiconset/Contents.json → ios/app/src/Images.xcassets/AppIcon.appiconset/Contents.json Zobrazit soubor


ios/app/Images.xcassets/Contents.json → ios/app/src/Images.xcassets/Contents.json Zobrazit soubor


ios/app/Images.xcassets/LaunchScreen.imageset/Contents.json → ios/app/src/Images.xcassets/LaunchScreen.imageset/Contents.json Zobrazit soubor


ios/app/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@1x.png → ios/app/src/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@1x.png Zobrazit soubor


ios/app/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@2x.png → ios/app/src/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@2x.png Zobrazit soubor


ios/app/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@3x.png → ios/app/src/Images.xcassets/LaunchScreen.imageset/LaunchScreen-480@3x.png Zobrazit soubor


ios/app/Info.plist → ios/app/src/Info.plist Zobrazit soubor


ios/app/ViewController.h → ios/app/src/ViewController.h Zobrazit soubor

@@ -18,7 +18,6 @@
18 18
 
19 19
 #import <JitsiMeet/JitsiMeet.h>
20 20
 
21
-
22 21
 @interface ViewController : UIViewController<JitsiMeetViewDelegate>
23 22
 
24 23
 @end

ios/app/ViewController.m → ios/app/src/ViewController.m Zobrazit soubor

@@ -22,16 +22,17 @@
22 22
 
23 23
 @implementation ViewController
24 24
 
25
+- (void)didReceiveMemoryWarning {
26
+    [super didReceiveMemoryWarning];
27
+}
28
+
25 29
 - (void)viewDidLoad {
26
-  [super viewDidLoad];
30
+    [super viewDidLoad];
27 31
 
28
-  JitsiMeetView *meetView = (JitsiMeetView*) self.view;
29
-  meetView.delegate = self;
30
-  [meetView loadURL:nil];
31
-}
32
+    JitsiMeetView *view = (JitsiMeetView *) self.view;
32 33
 
33
-- (void)didReceiveMemoryWarning {
34
-    [super didReceiveMemoryWarning];
34
+    view.delegate = self;
35
+    [view loadURL:nil];
35 36
 }
36 37
 
37 38
 @end

ios/app/main.m → ios/app/src/main.m Zobrazit soubor

@@ -19,7 +19,10 @@
19 19
 #import "AppDelegate.h"
20 20
 
21 21
 int main(int argc, char * argv[]) {
22
-  @autoreleasepool {
23
-    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
24
-  }
22
+    @autoreleasepool {
23
+        return UIApplicationMain(
24
+            argc, argv,
25
+            nil,
26
+            NSStringFromClass([AppDelegate class]));
27
+    }
25 28
 }

+ 2
- 2
ios/jitsi-meet.xcworkspace/contents.xcworkspacedata Zobrazit soubor

@@ -2,10 +2,10 @@
2 2
 <Workspace
3 3
    version = "1.0">
4 4
    <FileRef
5
-      location = "group:Jitsi Meet SDK.xcodeproj">
5
+      location = "group:app/app.xcodeproj">
6 6
    </FileRef>
7 7
    <FileRef
8
-      location = "group:jitsi-meet.xcodeproj">
8
+      location = "group:sdk/sdk.xcodeproj">
9 9
    </FileRef>
10 10
    <FileRef
11 11
       location = "group:Pods/Pods.xcodeproj">

ios/utils/fixup-ats.sh → ios/scripts/fixup-ats.sh Zobrazit soubor


ios/utils/fixup-frameworks.sh → ios/scripts/fixup-frameworks.sh Zobrazit soubor


ios/utils/run-packager.sh → ios/scripts/run-packager.sh Zobrazit soubor

@@ -11,6 +11,6 @@ if [[ "$CONFIGURATION" = "Debug" ]]; then
11 11
       exit 2
12 12
     fi
13 13
   else
14
-    open "$SRCROOT/../node_modules/react-native/packager/launchPackager.command" || echo "Can't start packager automatically"
14
+    open "$SRCROOT/../../node_modules/react-native/packager/launchPackager.command" || echo "Can't start packager automatically"
15 15
   fi
16 16
 fi

ios/Jitsi Meet SDK.xcodeproj/project.pbxproj → ios/sdk/sdk.xcodeproj/project.pbxproj Zobrazit soubor

@@ -11,15 +11,15 @@
11 11
 		0B412F191EDEC65D00B1A0A6 /* JitsiMeetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B412F171EDEC65D00B1A0A6 /* JitsiMeetView.m */; };
12 12
 		0B412F221EDEF6EA00B1A0A6 /* JitsiMeetViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B412F1B1EDEC80100B1A0A6 /* JitsiMeetViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 13
 		0B93EF7B1EC608550030D24D /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B93EF7A1EC608550030D24D /* CoreText.framework */; };
14
-		0B93EF7E1EC9DDCD0030D24D /* JitsiRCTBridgeWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B93EF7C1EC9DDCD0030D24D /* JitsiRCTBridgeWrapper.h */; };
15
-		0B93EF7F1EC9DDCD0030D24D /* JitsiRTCBridgeWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B93EF7D1EC9DDCD0030D24D /* JitsiRTCBridgeWrapper.m */; };
14
+		0B93EF7E1EC9DDCD0030D24D /* RCTBridgeWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B93EF7C1EC9DDCD0030D24D /* RCTBridgeWrapper.h */; };
15
+		0B93EF7F1EC9DDCD0030D24D /* RCTBridgeWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B93EF7D1EC9DDCD0030D24D /* RCTBridgeWrapper.m */; };
16 16
 		0BCA495F1EC4B6C600B793EE /* AudioMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495C1EC4B6C600B793EE /* AudioMode.m */; };
17 17
 		0BCA49601EC4B6C600B793EE /* POSIX.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495D1EC4B6C600B793EE /* POSIX.m */; };
18 18
 		0BCA49611EC4B6C600B793EE /* Proximity.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495E1EC4B6C600B793EE /* Proximity.m */; };
19 19
 		0BCA49641EC4B76D00B793EE /* WebRTC.framework in Copy embedded WebRTC framework */ = {isa = PBXBuildFile; fileRef = 0BCA49631EC4B76D00B793EE /* WebRTC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
20 20
 		0BCA496C1EC4BBF900B793EE /* jitsi.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0BCA496B1EC4BBF900B793EE /* jitsi.ttf */; };
21 21
 		0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BD906E81EC0C00300C8C18E /* JitsiMeet.h */; settings = {ATTRIBUTES = (Public, ); }; };
22
-		399E84404A63DA0F3B34EB9C /* libPods-JitsiMeet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F102AB2F4BCDCF220A512816 /* libPods-JitsiMeet.a */; };
22
+		0F65EECE1D95DA94561BB47E /* libPods-JitsiMeet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03F2ADC957FF109849B7FCA1 /* libPods-JitsiMeet.a */; };
23 23
 /* End PBXBuildFile section */
24 24
 
25 25
 /* Begin PBXCopyFilesBuildPhase section */
@@ -37,23 +37,23 @@
37 37
 /* End PBXCopyFilesBuildPhase section */
38 38
 
39 39
 /* Begin PBXFileReference section */
40
-		062651321278D27A9BAEFAD4 /* Pods-JitsiMeet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JitsiMeet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet.debug.xcconfig"; sourceTree = "<group>"; };
40
+		03F2ADC957FF109849B7FCA1 /* libPods-JitsiMeet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-JitsiMeet.a"; sourceTree = BUILT_PRODUCTS_DIR; };
41 41
 		0B412F161EDEC65D00B1A0A6 /* JitsiMeetView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JitsiMeetView.h; sourceTree = "<group>"; };
42 42
 		0B412F171EDEC65D00B1A0A6 /* JitsiMeetView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JitsiMeetView.m; sourceTree = "<group>"; };
43 43
 		0B412F1B1EDEC80100B1A0A6 /* JitsiMeetViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeetViewDelegate.h; sourceTree = "<group>"; };
44 44
 		0B93EF7A1EC608550030D24D /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
45
-		0B93EF7C1EC9DDCD0030D24D /* JitsiRCTBridgeWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JitsiRCTBridgeWrapper.h; sourceTree = "<group>"; };
46
-		0B93EF7D1EC9DDCD0030D24D /* JitsiRTCBridgeWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JitsiRTCBridgeWrapper.m; sourceTree = "<group>"; };
45
+		0B93EF7C1EC9DDCD0030D24D /* RCTBridgeWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBridgeWrapper.h; sourceTree = "<group>"; };
46
+		0B93EF7D1EC9DDCD0030D24D /* RCTBridgeWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTBridgeWrapper.m; sourceTree = "<group>"; };
47 47
 		0BCA495C1EC4B6C600B793EE /* AudioMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioMode.m; sourceTree = "<group>"; };
48 48
 		0BCA495D1EC4B6C600B793EE /* POSIX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = POSIX.m; sourceTree = "<group>"; };
49 49
 		0BCA495E1EC4B6C600B793EE /* Proximity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Proximity.m; sourceTree = "<group>"; };
50
-		0BCA49631EC4B76D00B793EE /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = "../node_modules/react-native-webrtc/ios/WebRTC.framework"; sourceTree = "<group>"; };
51
-		0BCA496B1EC4BBF900B793EE /* jitsi.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = jitsi.ttf; path = ../fonts/jitsi.ttf; sourceTree = "<group>"; };
50
+		0BCA49631EC4B76D00B793EE /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = "../../node_modules/react-native-webrtc/ios/WebRTC.framework"; sourceTree = "<group>"; };
51
+		0BCA496B1EC4BBF900B793EE /* jitsi.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = jitsi.ttf; path = ../../fonts/jitsi.ttf; sourceTree = "<group>"; };
52 52
 		0BD906E51EC0C00300C8C18E /* JitsiMeet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JitsiMeet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
53 53
 		0BD906E81EC0C00300C8C18E /* JitsiMeet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JitsiMeet.h; sourceTree = "<group>"; };
54 54
 		0BD906E91EC0C00300C8C18E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
55
-		E358F7AEFCB4033712107DF5 /* Pods-JitsiMeet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JitsiMeet.release.xcconfig"; path = "Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet.release.xcconfig"; sourceTree = "<group>"; };
56
-		F102AB2F4BCDCF220A512816 /* libPods-JitsiMeet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-JitsiMeet.a"; sourceTree = BUILT_PRODUCTS_DIR; };
55
+		98E09B5C73D9036B4ED252FC /* Pods-JitsiMeet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JitsiMeet.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet.debug.xcconfig"; sourceTree = "<group>"; };
56
+		9C77CA3CC919B081F1A52982 /* Pods-JitsiMeet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JitsiMeet.release.xcconfig"; path = "../Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet.release.xcconfig"; sourceTree = "<group>"; };
57 57
 /* End PBXFileReference section */
58 58
 
59 59
 /* Begin PBXFrameworksBuildPhase section */
@@ -62,7 +62,7 @@
62 62
 			buildActionMask = 2147483647;
63 63
 			files = (
64 64
 				0B93EF7B1EC608550030D24D /* CoreText.framework in Frameworks */,
65
-				399E84404A63DA0F3B34EB9C /* libPods-JitsiMeet.a in Frameworks */,
65
+				0F65EECE1D95DA94561BB47E /* libPods-JitsiMeet.a in Frameworks */,
66 66
 			);
67 67
 			runOnlyForDeploymentPostprocessing = 0;
68 68
 		};
@@ -80,11 +80,11 @@
80 80
 		0BD906DB1EC0C00300C8C18E = {
81 81
 			isa = PBXGroup;
82 82
 			children = (
83
-				0BCA49681EC4BBE500B793EE /* Resources */,
84
-				0BD906E71EC0C00300C8C18E /* sdk */,
85
-				0BD906E61EC0C00300C8C18E /* Products */,
86
-				C2471A7E156487CC2009E5E0 /* Pods */,
87 83
 				9C3C6FA2341729836589B856 /* Frameworks */,
84
+				C5E72ADFC30ED96F9B35F076 /* Pods */,
85
+				0BD906E61EC0C00300C8C18E /* Products */,
86
+				0BCA49681EC4BBE500B793EE /* Resources */,
87
+				0BD906E71EC0C00300C8C18E /* src */,
88 88
 			);
89 89
 			sourceTree = "<group>";
90 90
 		};
@@ -96,21 +96,21 @@
96 96
 			name = Products;
97 97
 			sourceTree = "<group>";
98 98
 		};
99
-		0BD906E71EC0C00300C8C18E /* sdk */ = {
99
+		0BD906E71EC0C00300C8C18E /* src */ = {
100 100
 			isa = PBXGroup;
101 101
 			children = (
102
-				0BD906E81EC0C00300C8C18E /* JitsiMeet.h */,
103 102
 				0BCA495C1EC4B6C600B793EE /* AudioMode.m */,
104
-				0BCA495D1EC4B6C600B793EE /* POSIX.m */,
105
-				0BCA495E1EC4B6C600B793EE /* Proximity.m */,
106 103
 				0BD906E91EC0C00300C8C18E /* Info.plist */,
107
-				0B93EF7C1EC9DDCD0030D24D /* JitsiRCTBridgeWrapper.h */,
108
-				0B93EF7D1EC9DDCD0030D24D /* JitsiRTCBridgeWrapper.m */,
109
-				0B412F1B1EDEC80100B1A0A6 /* JitsiMeetViewDelegate.h */,
104
+				0BD906E81EC0C00300C8C18E /* JitsiMeet.h */,
110 105
 				0B412F161EDEC65D00B1A0A6 /* JitsiMeetView.h */,
111 106
 				0B412F171EDEC65D00B1A0A6 /* JitsiMeetView.m */,
107
+				0B412F1B1EDEC80100B1A0A6 /* JitsiMeetViewDelegate.h */,
108
+				0B93EF7C1EC9DDCD0030D24D /* RCTBridgeWrapper.h */,
109
+				0B93EF7D1EC9DDCD0030D24D /* RCTBridgeWrapper.m */,
110
+				0BCA495D1EC4B6C600B793EE /* POSIX.m */,
111
+				0BCA495E1EC4B6C600B793EE /* Proximity.m */,
112 112
 			);
113
-			path = sdk;
113
+			path = src;
114 114
 			sourceTree = "<group>";
115 115
 		};
116 116
 		9C3C6FA2341729836589B856 /* Frameworks */ = {
@@ -118,16 +118,16 @@
118 118
 			children = (
119 119
 				0B93EF7A1EC608550030D24D /* CoreText.framework */,
120 120
 				0BCA49631EC4B76D00B793EE /* WebRTC.framework */,
121
-				F102AB2F4BCDCF220A512816 /* libPods-JitsiMeet.a */,
121
+				03F2ADC957FF109849B7FCA1 /* libPods-JitsiMeet.a */,
122 122
 			);
123 123
 			name = Frameworks;
124 124
 			sourceTree = "<group>";
125 125
 		};
126
-		C2471A7E156487CC2009E5E0 /* Pods */ = {
126
+		C5E72ADFC30ED96F9B35F076 /* Pods */ = {
127 127
 			isa = PBXGroup;
128 128
 			children = (
129
-				062651321278D27A9BAEFAD4 /* Pods-JitsiMeet.debug.xcconfig */,
130
-				E358F7AEFCB4033712107DF5 /* Pods-JitsiMeet.release.xcconfig */,
129
+				98E09B5C73D9036B4ED252FC /* Pods-JitsiMeet.debug.xcconfig */,
130
+				9C77CA3CC919B081F1A52982 /* Pods-JitsiMeet.release.xcconfig */,
131 131
 			);
132 132
 			name = Pods;
133 133
 			sourceTree = "<group>";
@@ -140,7 +140,7 @@
140 140
 			buildActionMask = 2147483647;
141 141
 			files = (
142 142
 				0B412F181EDEC65D00B1A0A6 /* JitsiMeetView.h in Headers */,
143
-				0B93EF7E1EC9DDCD0030D24D /* JitsiRCTBridgeWrapper.h in Headers */,
143
+				0B93EF7E1EC9DDCD0030D24D /* RCTBridgeWrapper.h in Headers */,
144 144
 				0B412F221EDEF6EA00B1A0A6 /* JitsiMeetViewDelegate.h in Headers */,
145 145
 				0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */,
146 146
 			);
@@ -153,14 +153,14 @@
153 153
 			isa = PBXNativeTarget;
154 154
 			buildConfigurationList = 0BD906ED1EC0C00300C8C18E /* Build configuration list for PBXNativeTarget "JitsiMeet" */;
155 155
 			buildPhases = (
156
-				8203CAE533C18CEC8284C979 /* [CP] Check Pods Manifest.lock */,
156
+				26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */,
157 157
 				0BD906E01EC0C00300C8C18E /* Sources */,
158 158
 				0BD906E11EC0C00300C8C18E /* Frameworks */,
159 159
 				0BD906E21EC0C00300C8C18E /* Headers */,
160 160
 				0BD906E31EC0C00300C8C18E /* Resources */,
161
-				512A060342EDB080C9BBD5BA /* [CP] Copy Pods Resources */,
162 161
 				0BCA49621EC4B74500B793EE /* Copy embedded WebRTC framework */,
163 162
 				0BCA49651EC4B77500B793EE /* Package React bundle */,
163
+				C7BC10B338C94EEB98048E64 /* [CP] Copy Pods Resources */,
164 164
 			);
165 165
 			buildRules = (
166 166
 			);
@@ -187,7 +187,7 @@
187 187
 					};
188 188
 				};
189 189
 			};
190
-			buildConfigurationList = 0BD906DF1EC0C00300C8C18E /* Build configuration list for PBXProject "Jitsi Meet SDK" */;
190
+			buildConfigurationList = 0BD906DF1EC0C00300C8C18E /* Build configuration list for PBXProject "sdk" */;
191 191
 			compatibilityVersion = "Xcode 3.2";
192 192
 			developmentRegion = English;
193 193
 			hasScannedForEncodings = 0;
@@ -228,36 +228,36 @@
228 228
 			);
229 229
 			runOnlyForDeploymentPostprocessing = 0;
230 230
 			shellPath = /bin/sh;
231
-			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
231
+			shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/packager/react-native-xcode.sh";
232 232
 		};
233
-		512A060342EDB080C9BBD5BA /* [CP] Copy Pods Resources */ = {
233
+		26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */ = {
234 234
 			isa = PBXShellScriptBuildPhase;
235 235
 			buildActionMask = 2147483647;
236 236
 			files = (
237 237
 			);
238 238
 			inputPaths = (
239 239
 			);
240
-			name = "[CP] Copy Pods Resources";
240
+			name = "[CP] Check Pods Manifest.lock";
241 241
 			outputPaths = (
242 242
 			);
243 243
 			runOnlyForDeploymentPostprocessing = 0;
244 244
 			shellPath = /bin/sh;
245
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet-resources.sh\"\n";
245
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
246 246
 			showEnvVarsInLog = 0;
247 247
 		};
248
-		8203CAE533C18CEC8284C979 /* [CP] Check Pods Manifest.lock */ = {
248
+		C7BC10B338C94EEB98048E64 /* [CP] Copy Pods Resources */ = {
249 249
 			isa = PBXShellScriptBuildPhase;
250 250
 			buildActionMask = 2147483647;
251 251
 			files = (
252 252
 			);
253 253
 			inputPaths = (
254 254
 			);
255
-			name = "[CP] Check Pods Manifest.lock";
255
+			name = "[CP] Copy Pods Resources";
256 256
 			outputPaths = (
257 257
 			);
258 258
 			runOnlyForDeploymentPostprocessing = 0;
259 259
 			shellPath = /bin/sh;
260
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
260
+			shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet-resources.sh\"\n";
261 261
 			showEnvVarsInLog = 0;
262 262
 		};
263 263
 /* End PBXShellScriptBuildPhase section */
@@ -267,7 +267,7 @@
267 267
 			isa = PBXSourcesBuildPhase;
268 268
 			buildActionMask = 2147483647;
269 269
 			files = (
270
-				0B93EF7F1EC9DDCD0030D24D /* JitsiRTCBridgeWrapper.m in Sources */,
270
+				0B93EF7F1EC9DDCD0030D24D /* RCTBridgeWrapper.m in Sources */,
271 271
 				0BCA49601EC4B6C600B793EE /* POSIX.m in Sources */,
272 272
 				0BCA495F1EC4B6C600B793EE /* AudioMode.m in Sources */,
273 273
 				0BCA49611EC4B6C600B793EE /* Proximity.m in Sources */,
@@ -380,7 +380,7 @@
380 380
 		};
381 381
 		0BD906EE1EC0C00300C8C18E /* Debug */ = {
382 382
 			isa = XCBuildConfiguration;
383
-			baseConfigurationReference = 062651321278D27A9BAEFAD4 /* Pods-JitsiMeet.debug.xcconfig */;
383
+			baseConfigurationReference = 98E09B5C73D9036B4ED252FC /* Pods-JitsiMeet.debug.xcconfig */;
384 384
 			buildSettings = {
385 385
 				CODE_SIGN_IDENTITY = "iPhone Developer";
386 386
 				DEFINES_MODULE = YES;
@@ -389,10 +389,10 @@
389 389
 				DYLIB_CURRENT_VERSION = 1;
390 390
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
391 391
 				ENABLE_BITCODE = NO;
392
-				INFOPLIST_FILE = sdk/Info.plist;
392
+				INFOPLIST_FILE = src/Info.plist;
393 393
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
394 394
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
395
-				PRODUCT_BUNDLE_IDENTIFIER = org.jitsi.JitsiKit;
395
+				PRODUCT_BUNDLE_IDENTIFIER = org.jitsi.JitsiMeetSDK.ios;
396 396
 				PRODUCT_NAME = "$(TARGET_NAME)";
397 397
 				SKIP_INSTALL = YES;
398 398
 			};
@@ -400,7 +400,7 @@
400 400
 		};
401 401
 		0BD906EF1EC0C00300C8C18E /* Release */ = {
402 402
 			isa = XCBuildConfiguration;
403
-			baseConfigurationReference = E358F7AEFCB4033712107DF5 /* Pods-JitsiMeet.release.xcconfig */;
403
+			baseConfigurationReference = 9C77CA3CC919B081F1A52982 /* Pods-JitsiMeet.release.xcconfig */;
404 404
 			buildSettings = {
405 405
 				CODE_SIGN_IDENTITY = "iPhone Developer";
406 406
 				DEFINES_MODULE = YES;
@@ -409,10 +409,10 @@
409 409
 				DYLIB_CURRENT_VERSION = 1;
410 410
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
411 411
 				ENABLE_BITCODE = NO;
412
-				INFOPLIST_FILE = sdk/Info.plist;
412
+				INFOPLIST_FILE = src/Info.plist;
413 413
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
414 414
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
415
-				PRODUCT_BUNDLE_IDENTIFIER = org.jitsi.JitsiKit;
415
+				PRODUCT_BUNDLE_IDENTIFIER = org.jitsi.JitsiMeetSDK.ios;
416 416
 				PRODUCT_NAME = "$(TARGET_NAME)";
417 417
 				SKIP_INSTALL = YES;
418 418
 			};
@@ -421,7 +421,7 @@
421 421
 /* End XCBuildConfiguration section */
422 422
 
423 423
 /* Begin XCConfigurationList section */
424
-		0BD906DF1EC0C00300C8C18E /* Build configuration list for PBXProject "Jitsi Meet SDK" */ = {
424
+		0BD906DF1EC0C00300C8C18E /* Build configuration list for PBXProject "sdk" */ = {
425 425
 			isa = XCConfigurationList;
426 426
 			buildConfigurations = (
427 427
 				0BD906EB1EC0C00300C8C18E /* Debug */,

ios/sdk/AudioMode.m → ios/sdk/src/AudioMode.m Zobrazit soubor


ios/sdk/Info.plist → ios/sdk/src/Info.plist Zobrazit soubor

@@ -20,10 +20,10 @@
20 20
 	<string>$(CURRENT_PROJECT_VERSION)</string>
21 21
 	<key>NSPrincipalClass</key>
22 22
 	<string></string>
23
-    <key>JitsiKitFonts</key>
24
-    <array>
25
-        <string>jitsi.ttf</string>
26
-        <string>FontAwesome.ttf</string>
27
-    </array>
23
+  <key>JitsiMeetFonts</key>
24
+  <array>
25
+    <string>FontAwesome.ttf</string>
26
+    <string>jitsi.ttf</string>
27
+  </array>
28 28
 </dict>
29 29
 </plist>

ios/sdk/JitsiMeet.h → ios/sdk/src/JitsiMeet.h Zobrazit soubor


ios/sdk/JitsiMeetView.h → ios/sdk/src/JitsiMeetView.h Zobrazit soubor

@@ -19,14 +19,13 @@
19 19
 
20 20
 #import "JitsiMeetViewDelegate.h"
21 21
 
22
-
23 22
 @interface JitsiMeetView : UIView
24 23
 
25 24
 @property (nonatomic, weak, nullable) id<JitsiMeetViewDelegate> delegate;
26 25
 
27
-+ (BOOL)application:(UIApplication *)application
28
-continueUserActivity:(NSUserActivity *)userActivity
29
- restorationHandler:(void (^)(NSArray *))restorationHandler;
26
++    (BOOL)application:(UIApplication *)application
27
+  continueUserActivity:(NSUserActivity *)userActivity
28
+    restorationHandler:(void (^)(NSArray *))restorationHandler;
30 29
 
31 30
 + (BOOL)application:(UIApplication *)application
32 31
             openURL:(NSURL *)URL

ios/sdk/JitsiMeetView.m → ios/sdk/src/JitsiMeetView.m Zobrazit soubor

@@ -21,8 +21,7 @@
21 21
 #import <React/RCTRootView.h>
22 22
 
23 23
 #import "JitsiMeetView.h"
24
-#import "JitsiRCTBridgeWrapper.h"
25
-
24
+#import "RCTBridgeWrapper.h"
26 25
 
27 26
 /**
28 27
  * A <tt>RCTFatalHandler</tt> implementation which swallows JavaScript errors.
@@ -31,8 +30,7 @@
31 30
  * effectively kill the application. <tt>_RCTFatal</tt> is suitable to be in
32 31
  * accord with the Web i.e. not kill the application.
33 32
  */
34
-RCTFatalHandler _RCTFatal = ^(NSError *error)
35
-{
33
+RCTFatalHandler _RCTFatal = ^(NSError *error) {
36 34
     id jsStackTrace = error.userInfo[RCTJSStackTraceKey];
37 35
     @try {
38 36
         NSString *name
@@ -48,25 +46,22 @@ RCTFatalHandler _RCTFatal = ^(NSError *error)
48 46
     }
49 47
 };
50 48
 
51
-
52 49
 @interface JitsiMeetView() {
53 50
     RCTRootView *rootView;
54 51
 }
55 52
 
56 53
 @end
57 54
 
58
-
59 55
 @implementation JitsiMeetView
60 56
 
61
-static JitsiRCTBridgeWrapper *jitsiBridge;
62
-
57
+static RCTBridgeWrapper *bridgeWrapper;
63 58
 
64
-#pragma mark linking delegate helpers
59
+#pragma mark Linking delegate helpers
65 60
 // https://facebook.github.io/react-native/docs/linking.html
66 61
 
67
-+ (BOOL)application:(UIApplication *)application
68
-continueUserActivity:(NSUserActivity *)userActivity
69
- restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
62
++    (BOOL)application:(UIApplication *)application
63
+  continueUserActivity:(NSUserActivity *)userActivity
64
+    restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
70 65
 {
71 66
     return [RCTLinkingManager application:application
72 67
                      continueUserActivity:userActivity
@@ -76,8 +71,7 @@ continueUserActivity:(NSUserActivity *)userActivity
76 71
 + (BOOL)application:(UIApplication *)application
77 72
             openURL:(NSURL *)url
78 73
   sourceApplication:(NSString *)sourceApplication
79
-         annotation:(id)annotation
80
-{
74
+         annotation:(id)annotation {
81 75
     return [RCTLinkingManager application:application
82 76
                                   openURL:url
83 77
                         sourceApplication:sourceApplication
@@ -86,9 +80,8 @@ continueUserActivity:(NSUserActivity *)userActivity
86 80
 
87 81
 #pragma mark initializers
88 82
 
89
-- (instancetype)initWithFrame:(CGRect)frame
90
-{
91
-    self = [super initWithFrame:frame];
83
+- (instancetype)initWithCoder:(NSCoder *)coder {
84
+    self = [super initWithCoder:coder];
92 85
     if (self) {
93 86
         [self initialize];
94 87
     }
@@ -96,9 +89,8 @@ continueUserActivity:(NSUserActivity *)userActivity
96 89
     return self;
97 90
 }
98 91
 
99
-- (instancetype)initWithCoder:(NSCoder *)aDecoder
100
-{
101
-    self = [super initWithCoder:aDecoder];
92
+- (instancetype)initWithFrame:(CGRect)frame {
93
+    self = [super initWithFrame:frame];
102 94
     if (self) {
103 95
         [self initialize];
104 96
     }
@@ -112,12 +104,12 @@ continueUserActivity:(NSUserActivity *)userActivity
112 104
  * Loads the given URL and joins the specified conference. If the specified URL
113 105
  * is null, the welcome page is shown.
114 106
  */
115
-- (void)loadURL:(NSURL *)url
116
-{
107
+- (void)loadURL:(NSURL *)url {
117 108
     NSDictionary *props = url ? @{ url : url.absoluteString } : nil;
109
+
118 110
     if (rootView == nil) {
119 111
         rootView
120
-            = [[RCTRootView alloc] initWithBridge:jitsiBridge.bridge
112
+            = [[RCTRootView alloc] initWithBridge:bridgeWrapper.bridge
121 113
                                        moduleName:@"App"
122 114
                                 initialProperties:props];
123 115
         rootView.backgroundColor = self.backgroundColor;
@@ -126,7 +118,7 @@ continueUserActivity:(NSUserActivity *)userActivity
126 118
         [rootView setFrame:[self bounds]];
127 119
         [self addSubview:rootView];
128 120
     } else {
129
-        // Update props with the new URL
121
+        // Update props with the new URL.
130 122
         rootView.appProperties = props;
131 123
     }
132 124
 }
@@ -141,8 +133,7 @@ continueUserActivity:(NSUserActivity *)userActivity
141 133
  *   - loads the necessary custom fonts
142 134
  *   - registers a custom fatal error error handler for React
143 135
  */
144
-- (void)initialize
145
-{
136
+- (void)initialize {
146 137
     static dispatch_once_t onceToken;
147 138
 
148 139
     dispatch_once(&onceToken, ^{
@@ -153,7 +144,7 @@ continueUserActivity:(NSUserActivity *)userActivity
153 144
             = [UIColor colorWithRed:.07f green:.07f blue:.07f alpha:1];
154 145
 
155 146
         // Initialize the React bridge.
156
-        jitsiBridge = [[JitsiRCTBridgeWrapper alloc] init];
147
+        bridgeWrapper = [[RCTBridgeWrapper alloc] init];
157 148
 
158 149
         // Dynamically load custom bundled fonts.
159 150
         [self loadCustomFonts];
@@ -167,10 +158,9 @@ continueUserActivity:(NSUserActivity *)userActivity
167 158
  * Helper function to dynamically load custom fonts. The UIAppFonts key in the
168 159
  * plist file doesn't work for frameworks, so fonts have to be manually loaded.
169 160
  */
170
-- (void)loadCustomFonts
171
-{
161
+- (void)loadCustomFonts {
172 162
     NSBundle *bundle = [NSBundle bundleForClass:self.class];
173
-    NSArray *fonts = [bundle objectForInfoDictionaryKey:@"JitsiKitFonts"];
163
+    NSArray *fonts = [bundle objectForInfoDictionaryKey:@"JitsiMeetFonts"];
174 164
 
175 165
     for (NSString *item in fonts) {
176 166
         NSString *fontName = [item stringByDeletingPathExtension];
@@ -181,8 +171,10 @@ continueUserActivity:(NSUserActivity *)userActivity
181 171
         CGDataProviderRef provider
182 172
             = CGDataProviderCreateWithCFData((__bridge CFDataRef)inData);
183 173
         CGFontRef font = CGFontCreateWithDataProvider(provider);
174
+
184 175
         if (!CTFontManagerRegisterGraphicsFont(font, &error)) {
185 176
             CFStringRef errorDescription = CFErrorCopyDescription(error);
177
+
186 178
             NSLog(@"Failed to load font: %@", errorDescription);
187 179
             CFRelease(errorDescription);
188 180
         }
@@ -196,8 +188,7 @@ continueUserActivity:(NSUserActivity *)userActivity
196 188
  * won't kill the process, it will swallow JS errors and print stack traces
197 189
  * instead.
198 190
  */
199
-- (void)registerFatalErrorHandler
200
-{
191
+- (void)registerFatalErrorHandler {
201 192
 #if !DEBUG
202 193
     // In the Release configuration, React Native will (intentionally) raise
203 194
     // an unhandled NSException for an unhandled JavaScript error. This will

ios/sdk/JitsiMeetViewDelegate.h → ios/sdk/src/JitsiMeetViewDelegate.h Zobrazit soubor


ios/sdk/POSIX.m → ios/sdk/src/POSIX.m Zobrazit soubor


ios/sdk/Proximity.m → ios/sdk/src/Proximity.m Zobrazit soubor


ios/sdk/JitsiRCTBridgeWrapper.h → ios/sdk/src/RCTBridgeWrapper.h Zobrazit soubor

@@ -30,7 +30,7 @@
30 30
  * singleton, however, so it's possible for us to create multiple instances of
31 31
  * it, though that's not currently used.
32 32
  */
33
-@interface JitsiRCTBridgeWrapper : NSObject<RCTBridgeDelegate>
33
+@interface RCTBridgeWrapper : NSObject<RCTBridgeDelegate>
34 34
 
35 35
 @property (nonatomic, readonly, strong)  RCTBridge *bridge;
36 36
 

ios/sdk/JitsiRTCBridgeWrapper.m → ios/sdk/src/RCTBridgeWrapper.m Zobrazit soubor

@@ -14,18 +14,16 @@
14 14
  * limitations under the License.
15 15
  */
16 16
 
17
-#include "JitsiRCTBridgeWrapper.h"
17
+#include "RCTBridgeWrapper.h"
18 18
 
19 19
 /*
20 20
  * Wrapper around RCTBridge which also implements the RCTBridgeDelegate methods,
21 21
  * allowing us to specify where the bundles are loaded from.
22 22
  */
23
-@implementation JitsiRCTBridgeWrapper
23
+@implementation RCTBridgeWrapper
24 24
 
25
-- (instancetype)init
26
-{
25
+- (instancetype)init {
27 26
     self = [super init];
28
-
29 27
     if (self) {
30 28
         _bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
31 29
     }
@@ -36,16 +34,15 @@
36 34
 #pragma mark helper methods for getting the packager URL
37 35
 
38 36
 #if DEBUG
39
-static NSURL *serverRootWithHost(NSString *host)
40
-{
41
-    return [NSURL URLWithString:
42
-            [NSString stringWithFormat:@"http://%@:8081/", host]];
37
+static NSURL *serverRootWithHost(NSString *host) {
38
+    return
39
+        [NSURL URLWithString:
40
+                [NSString stringWithFormat:@"http://%@:8081/", host]];
43 41
 }
44 42
 
45
-- (BOOL)isPackagerRunning:(NSString *)host
46
-{
47
-    NSURL *url = [serverRootWithHost(host)
48
-                  URLByAppendingPathComponent:@"status"];
43
+- (BOOL)isPackagerRunning:(NSString *)host {
44
+    NSURL *url
45
+        = [serverRootWithHost(host) URLByAppendingPathComponent:@"status"];
49 46
     NSURLRequest *request = [NSURLRequest requestWithURL:url];
50 47
     NSURLResponse *response;
51 48
     NSData *data = [NSURLConnection sendSynchronousRequest:request
@@ -53,24 +50,29 @@ static NSURL *serverRootWithHost(NSString *host)
53 50
                                                      error:NULL];
54 51
     NSString *status = [[NSString alloc] initWithData:data
55 52
                                              encoding:NSUTF8StringEncoding];
53
+
56 54
     return [status isEqualToString:@"packager-status:running"];
57 55
 }
58 56
 
59
-- (NSString *)guessPackagerHost
60
-{
57
+- (NSString *)guessPackagerHost {
61 58
     static NSString *ipGuess;
62 59
     static dispatch_once_t onceToken;
60
+
63 61
     dispatch_once(&onceToken, ^{
64
-        NSString *ipPath = [[NSBundle bundleForClass:self.class]
65
-                            pathForResource:@"ip" ofType:@"txt"];
66
-        ipGuess = [[NSString stringWithContentsOfFile:ipPath
67
-                                             encoding:NSUTF8StringEncoding
68
-                                                error:nil]
69
-                   stringByTrimmingCharactersInSet:
70
-                   [NSCharacterSet newlineCharacterSet]];
62
+        NSString *ipPath
63
+            = [[NSBundle bundleForClass:self.class] pathForResource:@"ip"
64
+                                                             ofType:@"txt"];
65
+
66
+        ipGuess
67
+            = [[NSString stringWithContentsOfFile:ipPath
68
+                                         encoding:NSUTF8StringEncoding
69
+                                            error:nil]
70
+                    stringByTrimmingCharactersInSet:
71
+                            [NSCharacterSet newlineCharacterSet]];
71 72
     });
72 73
 
73 74
     NSString *host = ipGuess ?: @"localhost";
75
+
74 76
     if ([self isPackagerRunning:host]) {
75 77
         return host;
76 78
     }
@@ -81,25 +83,24 @@ static NSURL *serverRootWithHost(NSString *host)
81 83
 
82 84
 #pragma mark RCTBridgeDelegate methods
83 85
 
84
-- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
85
-{
86
+- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
86 87
 #if DEBUG
87
-    /*
88
-     * In debug mode, try to fetch the bundle from the packager, or fallback to
89
-     * the one inside the framework. The IP address for the packager host is
90
-     * fetched from the ip.txt file inside the framework.
91
-     *
92
-     * This duplicates some functionality present in RCTBundleURLProvider, but
93
-     * that mode is not designed to work inside a framework, because all
94
-     * resources are loaded from the main bundle.
95
-     */
88
+    // In debug mode, try to fetch the bundle from the packager, or fallback to
89
+    // the one inside the framework. The IP address for the packager host is
90
+    // fetched from the ip.txt file inside the framework.
91
+    //
92
+    // This duplicates some functionality present in RCTBundleURLProvider, but
93
+    // that mode is not designed to work inside a framework, because all
94
+    // resources are loaded from the main bundle.
96 95
     NSString *host = [self guessPackagerHost];
96
+
97 97
     if (host != nil) {
98 98
         NSString *path = @"/index.ios.bundle";
99 99
         NSString *query = @"platform=ios&dev=true&minify=false";
100 100
         NSURLComponents *components
101
-        = [NSURLComponents componentsWithURL:serverRootWithHost(host)
102
-                     resolvingAgainstBaseURL:NO];
101
+            = [NSURLComponents componentsWithURL:serverRootWithHost(host)
102
+                         resolvingAgainstBaseURL:NO];
103
+
103 104
         components.path = path;
104 105
         components.query = query;
105 106
 
@@ -107,11 +108,6 @@ static NSURL *serverRootWithHost(NSString *host)
107 108
     }
108 109
 #endif
109 110
 
110
-    return [self fallbackSourceURLForBridge:bridge];
111
-}
112
-
113
-- (NSURL *)fallbackSourceURLForBridge:(RCTBridge *)bridge
114
-{
115 111
     return [[NSBundle bundleForClass:self.class] URLForResource:@"main"
116 112
                                                   withExtension:@"jsbundle"];
117 113
 }

Načítá se…
Zrušit
Uložit