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 {
100100 displayLink.preferredFramesPerSecond = 60 ;
101101 }
102102
103- [displayLink addToRunLoop: [ NSRunLoop currentRunLoop ] forMode: NSDefaultRunLoopMode ];
103+ [displayLink addToRunLoop: NSRunLoop . currentRunLoop forMode: NSDefaultRunLoopMode ];
104104
105105 // Create the global JS context in its own group, so it can be released properly
106106 jsGlobalContext = JSGlobalContextCreateInGroup (NULL , NULL );
@@ -401,7 +401,7 @@ - (void)pause {
401401 if ( isPaused ) { return ; }
402402
403403 [windowEventsDelegate pause ];
404- [ displayLink removeFromRunLoop: NSRunLoop .currentRunLoop forMode: NSDefaultRunLoopMode ] ;
404+ displayLink. paused = YES ;
405405 [screenRenderingContext finish ];
406406
407407 [AVAudioSession.sharedInstance setActive: NO error: NULL ];
@@ -415,7 +415,7 @@ - (void)resume {
415415
416416 [windowEventsDelegate resume ];
417417 [EAGLContext setCurrentContext: glCurrentContext];
418- [ displayLink addToRunLoop: NSRunLoop .currentRunLoop forMode: NSDefaultRunLoopMode ] ;
418+ displayLink. paused = NO ;
419419
420420 [AVAudioSession.sharedInstance setActive: YES error: NULL ];
421421 [openALManager endInterruption ];
Original file line number Diff line number Diff line change 55// The image is returned as EJBindingImage instance to JavaScript and can be
66// directly drawn onto a Canvas or loaded as a WebGL texture.
77
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+
825#import " EJBindingBase.h"
926
1027#define EJ_PICKER_TYPE_FULLSCREEN 1
@@ -35,3 +52,5 @@ typedef enum {
3552+ (BOOL )isSourceTypeAvailable : (NSString *) sourceType ;
3653
3754@end
55+
56+ #endif
Original file line number Diff line number Diff line change 1- #import < MobileCoreServices/UTCoreTypes.h> // for media filtering
21#import " EJBindingImagePicker.h"
2+
3+ #if EJ_PICKER_ENABLED
4+
5+ #import < MobileCoreServices/UTCoreTypes.h> // for media filtering
36#import " EJJavaScriptView.h"
47#import " EJTexture.h"
58#import " EJBindingImage.h"
@@ -218,3 +221,5 @@ + (UIImagePickerControllerSourceType)getSourceTypeClass:(NSString *) sourceType
218221}
219222
220223@end
224+
225+ #endif
You can’t perform that action at this time.
0 commit comments