Skip to content

Commit

Permalink
Merge branch 'master' into modulesUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga authored May 30, 2024
2 parents 6923b4d + 2f1212f commit ca859a4
Show file tree
Hide file tree
Showing 21 changed files with 319 additions and 8,905 deletions.
2 changes: 1 addition & 1 deletion build/scons-check-lockfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function checkDependencies(deps) {
const packageNames = Object.keys(deps);
for (const packageName of packageNames) {
const whatever = deps[packageName];
const version = whatever.version;
const version = whatever.version.replace('@', '-').replace('npm:', '');
const resolved = whatever.resolved;
if (resolved && !resolved.endsWith(`${version}.tgz`)) {
console.error(`There may be a mismatched url (${resolved}) for the given version (${version}) of dependency ${packageName}`);
Expand Down
6 changes: 3 additions & 3 deletions iphone/Classes/AppModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,9 @@ - (NSNumber *)keyboardVisible
- (void)setForceSplashAsSnapshot:(id)args
{
ENSURE_SINGLE_ARG(args, NSNumber)
[self replaceValue:args
forKey:@"forceSplashAsSnapshot"
notification:NO];
[self replaceValue:args
forKey:@"forceSplashAsSnapshot"
notification:NO];
BOOL flag = [TiUtils boolValue:args def:NO];
[[TiApp app] setForceSplashAsSnapshot:flag];
}
Expand Down
6 changes: 3 additions & 3 deletions iphone/Classes/ContactsModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ - (void)dealloc
RELEASE_TO_NIL(contactStore)
saveRequest = nil;
RELEASE_TO_NIL(contactPicker)
[[NSNotificationCenter defaultCenter] removeObserver:self
name:CNContactStoreDidChangeNotification
object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:CNContactStoreDidChangeNotification
object:nil];
[super dealloc];
}

Expand Down
16 changes: 8 additions & 8 deletions iphone/Classes/TiAppPropertiesProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,32 @@ - (NSDictionary *)bridgedDictionaryFromDictionary:(NSDictionary *)dictionary wit
- (void)setBool:(id)args
{
SETPROP
[defaultsObject setBool:[TiUtils boolValue:value]
forKey:key];
[defaultsObject setBool:[TiUtils boolValue:value]
forKey:key];
[defaultsObject synchronize];
}

- (void)setDouble:(id)args
{
SETPROP
[defaultsObject setDouble:[TiUtils doubleValue:value]
forKey:key];
[defaultsObject setDouble:[TiUtils doubleValue:value]
forKey:key];
[defaultsObject synchronize];
}

- (void)setInt:(id)args
{
SETPROP
[defaultsObject setInteger:[TiUtils intValue:value]
forKey:key];
[defaultsObject setInteger:[TiUtils intValue:value]
forKey:key];
[defaultsObject synchronize];
}

- (void)setString:(id)args
{
SETPROP
[defaultsObject setObject:[TiUtils stringValue:value]
forKey:key];
[defaultsObject setObject:[TiUtils stringValue:value]
forKey:key];
[defaultsObject synchronize];
}

Expand Down
16 changes: 8 additions & 8 deletions iphone/Classes/TiAppiOSUserDefaultsProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,32 +138,32 @@ - (id)getObject:(id)args
- (void)setBool:(id)args
{
SETPROP
[self.defaultsObject setBool:[TiUtils boolValue:value]
forKey:key];
[self.defaultsObject setBool:[TiUtils boolValue:value]
forKey:key];
[self.defaultsObject synchronize];
}

- (void)setDouble:(id)args
{
SETPROP
[self.defaultsObject setDouble:[TiUtils doubleValue:value]
forKey:key];
[self.defaultsObject setDouble:[TiUtils doubleValue:value]
forKey:key];
[self.defaultsObject synchronize];
}

- (void)setInt:(id)args
{
SETPROP
[self.defaultsObject setInteger:[TiUtils intValue:value]
forKey:key];
[self.defaultsObject setInteger:[TiUtils intValue:value]
forKey:key];
[self.defaultsObject synchronize];
}

- (void)setString:(id)args
{
SETPROP
[self.defaultsObject setObject:[TiUtils stringValue:value]
forKey:key];
[self.defaultsObject setObject:[TiUtils stringValue:value]
forKey:key];
[self.defaultsObject synchronize];
}

Expand Down
68 changes: 36 additions & 32 deletions iphone/Classes/TiMediaAudioRecorderProxy.mm
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ - (void)start:(id)args
return;
}
RELEASE_TO_NIL(file);
TiThreadPerformOnMainThread(^{
[self configureRecorder];
if (recorder != nil) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioInterruptionBegin:) name:kTiMediaAudioSessionInterruptionBegin object:[TiMediaAudioSession sharedSession]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioInterruptionEnd:) name:kTiMediaAudioSessionInterruptionEnd object:[TiMediaAudioSession sharedSession]];
[[TiMediaAudioSession sharedSession] startAudioSession];
[recorder record];
curState = RecordStarted;
}
},
TiThreadPerformOnMainThread(
^{
[self configureRecorder];
if (recorder != nil) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioInterruptionBegin:) name:kTiMediaAudioSessionInterruptionBegin object:[TiMediaAudioSession sharedSession]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioInterruptionEnd:) name:kTiMediaAudioSessionInterruptionEnd object:[TiMediaAudioSession sharedSession]];
[[TiMediaAudioSession sharedSession] startAudioSession];
[recorder record];
curState = RecordStarted;
}
},
YES);
}

Expand All @@ -81,16 +82,17 @@ - (id)stop:(id)args
return;
}
__block TiFilesystemFileProxy *theProxy = nil;
TiThreadPerformOnMainThread(^{
if (recorder != nil) {
[recorder stop];
[[TiMediaAudioSession sharedSession] stopAudioSession];
}
curState = RecordStopped;
[[NSNotificationCenter defaultCenter] removeObserver:self];
theProxy = [[[TiFilesystemFileProxy alloc] initWithFile:[file path]] retain];
RELEASE_TO_NIL_AUTORELEASE(recorder);
},
TiThreadPerformOnMainThread(
^{
if (recorder != nil) {
[recorder stop];
[[TiMediaAudioSession sharedSession] stopAudioSession];
}
curState = RecordStopped;
[[NSNotificationCenter defaultCenter] removeObserver:self];
theProxy = [[[TiFilesystemFileProxy alloc] initWithFile:[file path]] retain];
RELEASE_TO_NIL_AUTORELEASE(recorder);
},
YES);
return [theProxy autorelease];
}
Expand All @@ -100,12 +102,13 @@ - (void)pause:(id)args
if (curState != RecordStarted) {
return;
}
TiThreadPerformOnMainThread(^{
if (recorder != nil) {
[recorder pause];
curState = RecordPaused;
}
},
TiThreadPerformOnMainThread(
^{
if (recorder != nil) {
[recorder pause];
curState = RecordPaused;
}
},
YES);
}

Expand All @@ -114,12 +117,13 @@ - (void)resume:(id)args
if (curState != RecordPaused) {
return;
}
TiThreadPerformOnMainThread(^{
if (recorder != nil) {
[recorder record];
curState = RecordStarted;
}
},
TiThreadPerformOnMainThread(
^{
if (recorder != nil) {
[recorder record];
curState = RecordStarted;
}
},
YES);
}

Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiMediaVideoPlayerProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ - (void)setOverlayView:(id)proxy
- (void)setBackgroundView:(id)proxy
{
DEPRECATED_REPLACED(@"Media.VideoPlayer.backgroundView", @"7.0.0", @"Media.VideoPlayer.overlayView")
[self setOverlayView:proxy];
[self setOverlayView:proxy];
}

- (NSNumber *)playing
Expand Down
36 changes: 18 additions & 18 deletions iphone/Classes/TiNetworkHTTPClientProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -395,53 +395,53 @@ - (void)request:(APSHTTPRequest *)request onRedirect:(APSHTTPResponse *)response
- (void)setOnload:(id)callback
{
ENSURE_SINGLE_ARG_OR_NIL(callback, KrollCallback)
[self replaceValue:callback
forKey:@"onload"
notification:NO];
[self replaceValue:callback
forKey:@"onload"
notification:NO];
hasOnload = (callback == nil) ? NO : YES;
}
- (void)setOnerror:(id)callback
{
ENSURE_SINGLE_ARG_OR_NIL(callback, KrollCallback)
[self replaceValue:callback
forKey:@"onerror"
notification:NO];
[self replaceValue:callback
forKey:@"onerror"
notification:NO];
hasOnerror = (callback == nil) ? NO : YES;
;
}
- (void)setOnreadystatechange:(id)callback
{
ENSURE_SINGLE_ARG_OR_NIL(callback, KrollCallback)
[self replaceValue:callback
forKey:@"onreadystatechange"
notification:NO];
[self replaceValue:callback
forKey:@"onreadystatechange"
notification:NO];
hasOnreadystatechange = (callback == nil) ? NO : YES;
;
}
- (void)setOndatastream:(id)callback
{
ENSURE_SINGLE_ARG_OR_NIL(callback, KrollCallback)
[self replaceValue:callback
forKey:@"ondatastream"
notification:NO];
[self replaceValue:callback
forKey:@"ondatastream"
notification:NO];
hasOndatastream = (callback == nil) ? NO : YES;
;
}
- (void)setOnsendstream:(id)callback
{
ENSURE_SINGLE_ARG_OR_NIL(callback, KrollCallback)
[self replaceValue:callback
forKey:@"onsendstream"
notification:NO];
[self replaceValue:callback
forKey:@"onsendstream"
notification:NO];
hasOnsendstream = (callback == nil) ? NO : YES;
;
}
- (void)setOnredirect:(id)callback
{
ENSURE_SINGLE_ARG_OR_NIL(callback, KrollCallback)
[self replaceValue:callback
forKey:@"onredirect"
notification:NO];
[self replaceValue:callback
forKey:@"onredirect"
notification:NO];
hasOnredirect = (callback == nil) ? NO : YES;
;
}
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiUIDashboardViewProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ - (void)setData:(id)data
{
for (TiViewProxy *proxy in data) {
ENSURE_TYPE(proxy, TiUIDashboardItemProxy)
[self rememberProxy:proxy];
[self rememberProxy:proxy];
}

[self replaceValue:data forKey:@"data" notification:NO];
Expand Down
14 changes: 7 additions & 7 deletions iphone/Classes/TiUIScrollableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,27 +180,27 @@ - (void)removeSubview:(nonnull UIView *)view
- (void)addSubview:(nonnull UIView *)view
{
WRAP_TI_VIEW(view)
[[self contentView] addSubview:wrapperView];
[[self contentView] addSubview:wrapperView];
}

- (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview
{
WRAP_TI_VIEW(view)
[[self contentView] insertSubview:wrapperView
aboveSubview:siblingSubview];
[[self contentView] insertSubview:wrapperView
aboveSubview:siblingSubview];
}

- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index
{
WRAP_TI_VIEW(view)
[[self contentView] insertSubview:wrapperView
atIndex:index];
[[self contentView] insertSubview:wrapperView
atIndex:index];
}
- (void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview
{
WRAP_TI_VIEW(view)
[[self contentView] insertSubview:wrapperView
belowSubview:siblingSubview];
[[self contentView] insertSubview:wrapperView
belowSubview:siblingSubview];
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiUITableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ - (void)setKeyboardDismissMode_:(id)value
- (void)setSeparatorInsets_:(id)arg
{
DEPRECATED_REPLACED(@"UI.TableView.separatorInsets", @"5.2.0", @"UI.TableView.tableSeparatorInsets")
[self setTableSeparatorInsets_:arg];
[self setTableSeparatorInsets_:arg];
}

- (void)setTableSeparatorInsets_:(id)arg
Expand Down
6 changes: 3 additions & 3 deletions iphone/Classes/UIModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ - (NSString *)TEXT_STYLE_LARGE_TITLE
- (void)setOverrideUserInterfaceStyle:(id)args
{
ENSURE_SINGLE_ARG(args, NSNumber)
[self replaceValue:args
forKey:@"overrideUserInterfaceStyle"
notification:NO];
[self replaceValue:args
forKey:@"overrideUserInterfaceStyle"
notification:NO];
int style = [TiUtils intValue:args def:UIUserInterfaceStyleUnspecified];
TiApp.app.window.overrideUserInterfaceStyle = style;
}
Expand Down
4 changes: 2 additions & 2 deletions iphone/Classes/WatchSessionModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ - (void)transferUserInfo:(id)value
}
ENSURE_SINGLE_ARG(value, NSDictionary)

[[self watchSession] transferUserInfo:value];
[[self watchSession] transferUserInfo:value];
}

// sent in background
Expand Down Expand Up @@ -280,7 +280,7 @@ - (void)transferCurrentComplication:(id)value
}
ENSURE_SINGLE_ARG(value, NSDictionary)

[[self watchSession] transferCurrentComplicationUserInfo:value];
[[self watchSession] transferCurrentComplicationUserInfo:value];
}

- (void)cancelAllUserInfoTransfers:(id)value
Expand Down
8 changes: 4 additions & 4 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/SBJSON.m
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,10 @@ - (BOOL)scanHexQuad:(unichar *)x error:(NSError **)error
int d = (uc >= '0' && uc <= '9')
? uc - '0'
: (uc >= 'a' && uc <= 'f')
? (uc - 'a' + 10)
: (uc >= 'A' && uc <= 'F')
? (uc - 'A' + 10)
: -1;
? (uc - 'a' + 10)
: (uc >= 'A' && uc <= 'F')
? (uc - 'A' + 10)
: -1;
if (d == -1) {
if (error)
*error = err(EUNICODE, @"Missing hex digit in quad");
Expand Down
Loading

0 comments on commit ca859a4

Please sign in to comment.