File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1+ ## [ 1.0.2]
2+
3+ ### Fixed
4+
5+ * Fixed ` unlockWithLicense ` .
6+
17## [ 1.0.0]
28
39### Added
Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ - (void)unlockWithLicense:(nonnull id)json
177177{
178178 NSString *string = nil ;
179179 NSURL *url = nil ;
180- if ([json isKindOfClass: [NSString class ]]) {
180+ BOOL isString = [json isKindOfClass: [NSString class ]];
181+ if (isString) {
181182 string = json;
182183 @try { // NSURL has a history of crashing with bad input, so let's be safe
183184 url = [NSURL URLWithString: string];
@@ -187,10 +188,13 @@ - (void)unlockWithLicense:(nonnull id)json
187188
188189 // If the user specifies a file URL we do not use the converter and use the URL without any checks
189190 if (url == nil || !url.isFileURL ) {
190- url = [RCTConvert NSURL: json];
191- // Test if the resulting URL is an existing local file otherwise we try to read the license from a string or a dictionary
192- if (![[NSFileManager defaultManager ] fileExistsAtPath: url.path]) {
193- url = nil ;
191+ // `RCTConvert` changed the conversion for json to URL and it throws now an error if it is not a string
192+ if (isString) {
193+ url = [RCTConvert NSURL: json];
194+ // Test if the resulting URL is an existing local file otherwise we try to read the license from a string or a dictionary
195+ if (![[NSFileManager defaultManager ] fileExistsAtPath: url.path]) {
196+ url = nil ;
197+ }
194198 }
195199 }
196200
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-videoeditorsdk" ,
33 "title" : " React Native module for VideoEditor SDK" ,
4- "version" : " 1.0.1 " ,
4+ "version" : " 1.0.2 " ,
55 "description" : " A React Native module for VideoEditor SDK. Integrate the video editor into your own HTML5, iOS or Android app - in minutes!" ,
66 "main" : " index.js" ,
77 "typings" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments