diff --git a/iphone/CoreApi/CoreApi.xcodeproj/project.pbxproj b/iphone/CoreApi/CoreApi.xcodeproj/project.pbxproj index 85c83a62e9..8aaba69751 100644 --- a/iphone/CoreApi/CoreApi.xcodeproj/project.pbxproj +++ b/iphone/CoreApi/CoreApi.xcodeproj/project.pbxproj @@ -86,6 +86,8 @@ 9974CA2A23DF1968003FE824 /* ElevationProfileData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9974CA2823DF1968003FE824 /* ElevationProfileData.mm */; }; 9974CA2D23DF197B003FE824 /* ElevationProfileData+Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 9974CA2B23DF197B003FE824 /* ElevationProfileData+Core.h */; }; AC6A585728057EF6003EABAF /* StringUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = AC6A585628057CC1003EABAF /* StringUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED0B1FF42CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.h in Headers */ = {isa = PBXBuildFile; fileRef = ED0B1FF22CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED0B1FF52CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED0B1FF32CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.mm */; }; EDC4E3512C5D222D009286A2 /* RecentlyDeletedCategory.mm in Sources */ = {isa = PBXBuildFile; fileRef = EDC4E34E2C5D222D009286A2 /* RecentlyDeletedCategory.mm */; }; EDC4E3522C5D222D009286A2 /* RecentlyDeletedCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC4E34F2C5D222D009286A2 /* RecentlyDeletedCategory.h */; settings = {ATTRIBUTES = (Public, ); }; }; EDC4E3532C5D222D009286A2 /* RecentlyDeletedCategory+Core.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC4E3502C5D222D009286A2 /* RecentlyDeletedCategory+Core.h */; }; @@ -178,6 +180,8 @@ 9974CA2823DF1968003FE824 /* ElevationProfileData.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ElevationProfileData.mm; sourceTree = ""; }; 9974CA2B23DF197B003FE824 /* ElevationProfileData+Core.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ElevationProfileData+Core.h"; sourceTree = ""; }; AC6A585628057CC1003EABAF /* StringUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringUtils.h; sourceTree = ""; }; + ED0B1FF22CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeepLinkInAppFeatureHighlightData.h; sourceTree = ""; }; + ED0B1FF32CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DeepLinkInAppFeatureHighlightData.mm; sourceTree = ""; }; EDC4E34E2C5D222D009286A2 /* RecentlyDeletedCategory.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RecentlyDeletedCategory.mm; sourceTree = ""; }; EDC4E34F2C5D222D009286A2 /* RecentlyDeletedCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentlyDeletedCategory.h; sourceTree = ""; }; EDC4E3502C5D222D009286A2 /* RecentlyDeletedCategory+Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RecentlyDeletedCategory+Core.h"; sourceTree = ""; }; @@ -392,6 +396,8 @@ 9957FAD9237ACB1100855F48 /* DeepLinkSearchData.h */, 9957FACC237AB01400855F48 /* DeepLinkParser.h */, 9957FACD237AB01400855F48 /* DeepLinkParser.mm */, + ED0B1FF22CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.h */, + ED0B1FF32CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.mm */, ); path = DeepLink; sourceTree = ""; @@ -479,6 +485,7 @@ 47942D9C237D927800DEFAE3 /* PlacePageBookmarkData.h in Headers */, EDC4E3522C5D222D009286A2 /* RecentlyDeletedCategory.h in Headers */, 47942D72237CC40B00DEFAE3 /* OpeningHours.h in Headers */, + ED0B1FF42CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.h in Headers */, 47942D6B237CC3D600DEFAE3 /* PlacePageData.h in Headers */, 47D609DC234FE625008ECC47 /* MWMBookmarksObserver.h in Headers */, 471AB98D23AB925D00F56D49 /* MWMMapSearchResult.h in Headers */, @@ -558,6 +565,7 @@ buildActionMask = 2147483647; files = ( 9957FADC237ACB1100855F48 /* DeepLinkSearchData.mm in Sources */, + ED0B1FF52CAAE3FF006E31A4 /* DeepLinkInAppFeatureHighlightData.mm in Sources */, 9957FACF237AB01400855F48 /* DeepLinkParser.mm in Sources */, 47F4F1FA23A3336C0022FD56 /* MWMMapNodeAttributes.mm in Sources */, 47942D88237CCA8800DEFAE3 /* PlacePagePreviewData.mm in Sources */, diff --git a/iphone/CoreApi/CoreApi/CoreApi-swift.h b/iphone/CoreApi/CoreApi/CoreApi-swift.h index 3f4b7ce8aa..063bc71a51 100644 --- a/iphone/CoreApi/CoreApi/CoreApi-swift.h +++ b/iphone/CoreApi/CoreApi/CoreApi-swift.h @@ -7,6 +7,7 @@ FOUNDATION_EXPORT const unsigned char CoreApiVersionString[]; #import #import #import +#import #import #import #import diff --git a/iphone/CoreApi/CoreApi/DeepLink/DeepLinkInAppFeatureHighlightData.h b/iphone/CoreApi/CoreApi/DeepLink/DeepLinkInAppFeatureHighlightData.h new file mode 100644 index 0000000000..e33d47a2fa --- /dev/null +++ b/iphone/CoreApi/CoreApi/DeepLink/DeepLinkInAppFeatureHighlightData.h @@ -0,0 +1,21 @@ +#import +#import "DeepLinkParser.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, InAppFeatureHighlightType) { + InAppFeatureHighlightTypeNone, + InAppFeatureHighlightTypeTrackRecorder, + InAppFeatureHighlightTypeICloud, +}; + +@interface DeepLinkInAppFeatureHighlightData : NSObject + +@property(nonatomic, readonly) DeeplinkUrlType urlType; +@property(nonatomic, readonly) InAppFeatureHighlightType feature; + +- (instancetype)init:(DeeplinkUrlType)urlType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iphone/CoreApi/CoreApi/DeepLink/DeepLinkInAppFeatureHighlightData.mm b/iphone/CoreApi/CoreApi/DeepLink/DeepLinkInAppFeatureHighlightData.mm new file mode 100644 index 0000000000..70e3afd9ca --- /dev/null +++ b/iphone/CoreApi/CoreApi/DeepLink/DeepLinkInAppFeatureHighlightData.mm @@ -0,0 +1,26 @@ +#import "DeepLinkInAppFeatureHighlightData.h" +#import + +static inline InAppFeatureHighlightType FeatureTypeFrom(url_scheme::InAppFeatureHighlightRequest::InAppFeatureType type) +{ + using namespace url_scheme; + switch (type) + { + case InAppFeatureHighlightRequest::InAppFeatureType::None: return InAppFeatureHighlightTypeNone; + case InAppFeatureHighlightRequest::InAppFeatureType::TrackRecorder: return InAppFeatureHighlightTypeTrackRecorder; + case InAppFeatureHighlightRequest::InAppFeatureType::iCloud: return InAppFeatureHighlightTypeICloud; + } +} + +@implementation DeepLinkInAppFeatureHighlightData + +- (instancetype)init:(DeeplinkUrlType)urlType { + self = [super init]; + if (self) { + _urlType = urlType; + _feature = FeatureTypeFrom(GetFramework().GetInAppFeatureHighlightRequest().m_feature); + } + return self; +} + +@end