Skip to content

Commit

Permalink
Merge branch '8_2_X' into TIMOB-27434-8_2_X
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshchdhry committed Oct 3, 2019
2 parents 2606381 + 44074a8 commit b9ede74
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion iphone/Classes/TiUIApplicationShortcutsProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ - (UIApplicationShortcutIcon *)findIcon:(id)value
return [UIApplicationShortcutIcon iconWithTemplateImageName:[self urlInAssetCatalog:value]];
}

#ifdef IS_SDK_IOS_13
#if IS_SDK_IOS_13
if ([value isKindOfClass:[TiBlob class]] && [TiUtils isIOSVersionOrGreater:@"13.0"]) {
TiBlob *blob = (TiBlob *)value;
if (blob.type == TiBlobTypeSystemImage) {
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiUIiOSApplicationShortcutsProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ - (UIApplicationShortcutIcon *)findIcon:(id)value
return [UIApplicationShortcutIcon iconWithTemplateImageName:[self urlInAssetCatalog:value]];
}

#ifdef IS_SDK_IOS_13
#if IS_SDK_IOS_13
if ([value isKindOfClass:[TiBlob class]] && [TiUtils isIOSVersionOrGreater:@"13.0"]) {
TiBlob *blob = (TiBlob *)value;
if (blob.type == TiBlobTypeSystemImage) {
Expand Down
15 changes: 12 additions & 3 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,12 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
[launchOptions setObject:[url absoluteString] forKey:@"url"];
[launchOptions removeObjectForKey:UIApplicationLaunchOptionsSourceApplicationKey];

[launchOptions setObject:[options objectForKey:UIApplicationOpenURLOptionsSourceApplicationKey] ?: [NSNull null] forKey:@"source"];
id source = [options objectForKey:UIApplicationOpenURLOptionsSourceApplicationKey];
if (source != nil) {
[launchOptions setObject:source forKey:@"source"];
} else {
[launchOptions removeObjectForKey:@"source"];
}

if (appBooted) {
[[NSNotificationCenter defaultCenter] postNotificationName:kTiApplicationLaunchedFromURL object:self userInfo:launchOptions];
Expand All @@ -453,7 +458,11 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceAppl
[launchOptions setObject:[url absoluteString] forKey:@"url"];
[launchOptions removeObjectForKey:UIApplicationLaunchOptionsSourceApplicationKey];

[launchOptions setObject:sourceApplication ?: [NSNull null] forKey:@"source"];
if (sourceApplication != nil) {
[launchOptions setObject:sourceApplication forKey:@"source"];
} else {
[launchOptions removeObjectForKey:@"source"];
}

if (appBooted) {
[[NSNotificationCenter defaultCenter] postNotificationName:kTiApplicationLaunchedFromURL object:self userInfo:launchOptions];
Expand Down Expand Up @@ -1376,7 +1385,7 @@ + (NSDictionary *)dictionaryWithUserNotification:(UNNotification *)notification
[event setObject:NULL_IF_NIL(notification.request.content.userInfo) forKey:@"userInfo"];
[event setObject:NULL_IF_NIL(notification.request.content.categoryIdentifier) forKey:@"category"];
[event setObject:NULL_IF_NIL(notification.request.content.threadIdentifier) forKey:@"threadIdentifier"];
[event setObject:NULL_IF_NIL(notification.request.identifier) forKey:@"identifier"];
[event setObject:NULL_IF_NIL(identifier) forKey:@"identifier"];

// iOS 10+ does have "soundName" but "sound" which is a native object. But if we find
// a sound in the APS dictionary, we can provide that one for parity
Expand Down
12 changes: 12 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/Modules/TiUIWindowProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,23 @@ - (void)updateBarImage
if (theImage != nil) {
UIImage *resizableImage = [theImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0) resizingMode:UIImageResizingModeStretch];
ourNB.shadowImage = resizableImage;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if ([TiUtils isIOSVersionOrGreater:@"13.0"]) {
ourNB.standardAppearance.shadowImage = resizableImage;
ourNB.scrollEdgeAppearance.shadowImage = resizableImage;
}
#endif
} else {
BOOL clipValue = [TiUtils boolValue:[self valueForUndefinedKey:@"hideShadow"] def:NO];
if (clipValue) {
//Set an empty Image.
ourNB.shadowImage = [[[UIImage alloc] init] autorelease];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if ([TiUtils isIOSVersionOrGreater:@"13.0"]) {
ourNB.standardAppearance.shadowColor = nil;
ourNB.scrollEdgeAppearance.shadowColor = nil;
}
#endif
} else {
ourNB.shadowImage = nil;
}
Expand Down

0 comments on commit b9ede74

Please sign in to comment.