File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ -(void)setupWithAppFolder:(NSString*)folder {
100
100
displayLink.preferredFramesPerSecond = 60 ;
101
101
}
102
102
103
- [displayLink addToRunLoop: [ NSRunLoop currentRunLoop ] forMode: NSDefaultRunLoopMode ];
103
+ [displayLink addToRunLoop: NSRunLoop . currentRunLoop forMode: NSDefaultRunLoopMode ];
104
104
105
105
// Create the global JS context in its own group, so it can be released properly
106
106
jsGlobalContext = JSGlobalContextCreateInGroup (NULL , NULL );
@@ -401,7 +401,7 @@ - (void)pause {
401
401
if ( isPaused ) { return ; }
402
402
403
403
[windowEventsDelegate pause ];
404
- [ displayLink removeFromRunLoop: NSRunLoop .currentRunLoop forMode: NSDefaultRunLoopMode ] ;
404
+ displayLink. paused = YES ;
405
405
[screenRenderingContext finish ];
406
406
407
407
[AVAudioSession.sharedInstance setActive: NO error: NULL ];
@@ -415,7 +415,7 @@ - (void)resume {
415
415
416
416
[windowEventsDelegate resume ];
417
417
[EAGLContext setCurrentContext: glCurrentContext];
418
- [ displayLink addToRunLoop: NSRunLoop .currentRunLoop forMode: NSDefaultRunLoopMode ] ;
418
+ displayLink. paused = NO ;
419
419
420
420
[AVAudioSession.sharedInstance setActive: YES error: NULL ];
421
421
[openALManager endInterruption ];
Original file line number Diff line number Diff line change 5
5
// The image is returned as EJBindingImage instance to JavaScript and can be
6
6
// directly drawn onto a Canvas or loaded as a WebGL texture.
7
7
8
+ // The Image Picker is disabled by default, because Apple will reject your
9
+ // app from the appstore if this functionality is compiled in, but an
10
+ // `NSPhotoLibraryUsageDescription` key is missing from the app's plist,
11
+ // explaining what it's used for.
12
+
13
+
14
+
15
+ // To enable the image picker, change the following `EJ_PICKER_ENABLED` to
16
+ // true and add the `NSPhotoLibraryUsageDescription` key to your info.plist.
17
+
18
+ #define EJ_PICKER_ENABLED false
19
+
20
+
21
+
22
+
23
+ #if EJ_PICKER_ENABLED
24
+
8
25
#import " EJBindingBase.h"
9
26
10
27
#define EJ_PICKER_TYPE_FULLSCREEN 1
@@ -35,3 +52,5 @@ typedef enum {
35
52
+ (BOOL )isSourceTypeAvailable : (NSString *) sourceType ;
36
53
37
54
@end
55
+
56
+ #endif
Original file line number Diff line number Diff line change 1
- #import < MobileCoreServices/UTCoreTypes.h> // for media filtering
2
1
#import " EJBindingImagePicker.h"
2
+
3
+ #if EJ_PICKER_ENABLED
4
+
5
+ #import < MobileCoreServices/UTCoreTypes.h> // for media filtering
3
6
#import " EJJavaScriptView.h"
4
7
#import " EJTexture.h"
5
8
#import " EJBindingImage.h"
@@ -218,3 +221,5 @@ + (UIImagePickerControllerSourceType)getSourceTypeClass:(NSString *) sourceType
218
221
}
219
222
220
223
@end
224
+
225
+ #endif
You can’t perform that action at this time.
0 commit comments