├── .gitignore ├── Classes ├── TiContextmenuModule.h ├── TiContextmenuModule.m ├── TiContextmenuModuleAssets.h ├── TiContextmenuModuleAssets.m ├── TiUIBarButtonProxy+ContextMenu.h ├── TiUIBarButtonProxy+ContextMenu.m ├── TiUIButtonProxy+ContextMenu.h ├── TiUIButtonProxy+ContextMenu.m ├── TiUIListView+ContextMenu.h ├── TiUIListView+ContextMenu.m ├── TiUITableView+ContextMenu.h ├── TiUITableView+ContextMenu.m ├── TiViewProxy+ContextMenu.h └── TiViewProxy+ContextMenu.m ├── LICENSE ├── README.md ├── Resources └── README.md ├── TiContextmenu_Prefix.pch ├── example.gif ├── example └── app.js ├── manifest ├── module.xcconfig ├── platform └── README.md ├── timodule.xml ├── titanium-context-menu.xcodeproj └── project.pbxproj └── titanium.xcconfig /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | tmp 3 | bin 4 | build 5 | 6 | */*/modules 7 | */*/modules* 8 | .apt_generated 9 | build.properties 10 | .svn 11 | *.pyc 12 | *~.nib/ 13 | *.pbxuser 14 | *.perspective 15 | *.perspectivev3 16 | *.xcworkspace/ 17 | xcuserdata 18 | *.xcuserstate 19 | *.xcuserdata* 20 | 21 | /metadata.json 22 | /dist 23 | /metadata.json 24 | -------------------------------------------------------------------------------- /Classes/TiContextmenuModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * titanium-context-menu 3 | * 4 | * Created by Your Name 5 | * Copyright (c) 2019 Your Company. All rights reserved. 6 | */ 7 | 8 | #import "TiModule.h" 9 | #import 10 | 11 | API_AVAILABLE(ios(13.0)) 12 | typedef void (^TiActionHandler)(__kindof UIAction *action, NSUInteger index); 13 | 14 | @interface TiContextmenuModule : TiModule 15 | 16 | - (NSNumber *)MENU_ELEMENT_SIZE_AUTOMATIC; 17 | 18 | - (NSNumber *)MENU_ELEMENT_SIZE_SMALL; 19 | 20 | - (NSNumber *)MENU_ELEMENT_SIZE_MEDIUM; 21 | 22 | - (NSNumber *)MENU_ELEMENT_SIZE_LARGE; 23 | 24 | + (void)injectMenuForButton:(id)button andProxy:(TiProxy *)proxy; 25 | 26 | + (UIMenu *)menuFromJavaScriptArray:(NSArray *> *)actions andProxy:(TiProxy *)proxy title:(NSString *)title handler:(TiActionHandler)handler; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Classes/TiContextmenuModule.m: -------------------------------------------------------------------------------- 1 | /** 2 | * titanium-context-menu 3 | * 4 | * Created by Your Name 5 | * Copyright (c) 2019 Your Company. All rights reserved. 6 | */ 7 | 8 | #import "TiContextmenuModule.h" 9 | #import "TiBase.h" 10 | #import "TiHost.h" 11 | #import "TiUtils.h" 12 | 13 | @implementation TiContextmenuModule 14 | 15 | #pragma mark Internal 16 | 17 | - (id)moduleGUID 18 | { 19 | return @"09c37883-d40d-4c84-90e6-ca64399f5c8a"; 20 | } 21 | 22 | - (NSString *)moduleId 23 | { 24 | return @"ti.contextmenu"; 25 | } 26 | 27 | - (NSNumber *)MENU_ELEMENT_SIZE_AUTOMATIC 28 | { 29 | if (@available(iOS 17.0, *)) { 30 | return @(UIMenuElementSizeAutomatic); 31 | } else { 32 | return @(-1); 33 | } 34 | } 35 | 36 | - (NSNumber *)MENU_ELEMENT_SIZE_SMALL 37 | { 38 | if (@available(iOS 16.0, *)) { 39 | return @(UIMenuElementSizeSmall); 40 | } else { 41 | return @(-1); 42 | } 43 | } 44 | 45 | - (NSNumber *)MENU_ELEMENT_SIZE_MEDIUM 46 | { 47 | if (@available(iOS 16.0, *)) { 48 | return @(UIMenuElementSizeMedium); 49 | } else { 50 | return @(-1); 51 | } 52 | } 53 | 54 | - (NSNumber *)MENU_ELEMENT_SIZE_LARGE 55 | { 56 | if (@available(iOS 16.0, *)) { 57 | return @(UIMenuElementSizeLarge); 58 | } else { 59 | return @(-1); 60 | } 61 | } 62 | 63 | + (void)injectMenuForButton:(id)button andProxy:(TiProxy *)proxy 64 | { 65 | NSArray *actions = proxy.allProperties[@"menu"]; 66 | 67 | if (@available(iOS 14.0, *)) { 68 | UIMenu *menu = [TiContextmenuModule menuFromJavaScriptArray:actions andProxy:proxy title:nil handler:^(__kindof UIAction * _Nonnull action, NSUInteger index) { 69 | [proxy fireEvent:@"menuclick" withObject:@{ @"index": @(index), @"identifier": action.identifier ?: NSNull.null }]; 70 | }]; 71 | 72 | if (@available(iOS 16.0, *)) { 73 | UIMenuElementSize elementSize = [TiUtils intValue:@"preferredElementSize" properties:proxy.allProperties def:UIMenuElementSizeLarge]; 74 | menu.preferredElementSize = elementSize; 75 | } 76 | 77 | if ([button isKindOfClass:[UIButton class]]) { 78 | [(UIButton *)button setMenu:menu]; 79 | [(UIButton *)button setShowsMenuAsPrimaryAction:YES]; 80 | } else if ([button isKindOfClass:[UIBarButtonItem class]]) { 81 | [(UIBarButtonItem *)button setMenu:menu]; 82 | } 83 | } 84 | } 85 | 86 | + (UIMenu *)menuFromJavaScriptArray:(NSArray *> *)actions andProxy:(TiProxy *)proxy title:(NSString *)title handler:(TiActionHandler)handler 87 | { 88 | NSMutableArray *nativeChildren = [NSMutableArray arrayWithCapacity:actions.count]; 89 | 90 | [actions enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger index, BOOL * _Nonnull stop) { 91 | NSString *title = obj[@"title"]; 92 | NSString *subtitle = obj[@"subtitle"]; 93 | UIImage *image = [TiUtils toImage:obj[@"image"] proxy:proxy]; 94 | NSString *identifier = obj[@"identifier"]; 95 | BOOL destructive = [TiUtils boolValue:obj[@"destructive"] def:NO]; 96 | BOOL enabled = [TiUtils boolValue:obj[@"enabled"] def:YES]; 97 | NSArray *> *menu = obj[@"menu"]; 98 | 99 | if (menu != nil) { 100 | UIMenu *nativeMenu = [TiContextmenuModule menuFromJavaScriptArray:menu andProxy:proxy title:title handler:handler]; 101 | 102 | if (@available(iOS 16.0, *)) { 103 | UIMenuElementSize elementSize = [TiUtils intValue:@"preferredElementSize" properties:obj def:UIMenuElementSizeLarge]; 104 | nativeMenu.preferredElementSize = elementSize; 105 | } 106 | 107 | [nativeChildren addObject:nativeMenu]; 108 | return; 109 | } 110 | 111 | UIAction *action = [UIAction actionWithTitle:title image:image identifier:identifier handler:^(__kindof UIAction * _Nonnull action) { 112 | handler(action, index); 113 | }]; 114 | 115 | if (@available(iOS 15.0, *)) { 116 | if (subtitle != nil) { 117 | action.subtitle = subtitle; 118 | } 119 | } 120 | 121 | if (destructive) { 122 | action.attributes = UIMenuElementAttributesDestructive; 123 | } 124 | 125 | if (!enabled) { 126 | action.attributes = UIMenuElementAttributesDisabled; 127 | } 128 | 129 | [nativeChildren addObject:action]; 130 | }]; 131 | 132 | if (title != nil) { 133 | return [UIMenu menuWithTitle:title children:nativeChildren]; 134 | } 135 | 136 | return [UIMenu menuWithChildren:nativeChildren]; 137 | } 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /Classes/TiContextmenuModuleAssets.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a generated file. Do not edit or your changes will be lost 3 | */ 4 | 5 | @interface TiContextmenuModuleAssets : NSObject { 6 | 7 | } 8 | 9 | - (NSData *)moduleAsset; 10 | - (NSData *)resolveModuleAsset:(NSString*)path; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Classes/TiContextmenuModuleAssets.m: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a generated file. Do not edit or your changes will be lost 3 | */ 4 | #import "TiContextmenuModuleAssets.h" 5 | 6 | extern NSData* filterDataInRange(NSData* thedata, NSRange range); 7 | 8 | @implementation TiContextmenuModuleAssets 9 | 10 | - (NSData *)moduleAsset 11 | { 12 | 13 | 14 | return nil; 15 | } 16 | 17 | - (NSData *)resolveModuleAsset:(NSString *)path 18 | { 19 | 20 | 21 | return nil; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/TiUIBarButtonProxy+ContextMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.h 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #define USE_TI_UIBUTTON 9 | 10 | #import 11 | #import "TiUINavBarButton.h" 12 | 13 | @interface TiUINavBarButton (ContextMenu) 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/TiUIBarButtonProxy+ContextMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.m 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #import "TiUIButtonProxy+ContextMenu.h" 9 | #import "TiContextmenuModule.h" 10 | #import "ImageLoader.h" 11 | #import "TiBlob.h" 12 | #import "TiButtonUtil.h" 13 | #import 14 | 15 | @implementation TiUINavBarButton (ContextMenu) 16 | 17 | #pragma mark Public API's 18 | 19 | // This is important: We have to override the init here, since there is no place 20 | // we could access the proxy except here. If you read this and know of a better place, 21 | // please go for it! 22 | // 23 | // Because of that, we basically copied parts of the TiUINavBarButton constructor, but only the image / title 24 | // handling. If you need more, please extend this code! 25 | - (id)initWithProxy:(TiUIButtonProxy *)proxy_ 26 | { 27 | self = [super init]; 28 | 29 | id image = [proxy_ valueForKey:@"image"]; 30 | id systemButton = [proxy_ valueForKey:@"systemButton"]; 31 | SEL selector = [proxy_ _hasListeners:@"click"] ? @selector(clicked:) : nil; // This is not missing, it's just not found by the static analyzer 32 | 33 | if (systemButton != nil) { 34 | UIBarButtonSystemItem type = [TiUtils intValue:systemButton]; 35 | UIView *button = [TiButtonUtil systemButtonWithType:(int)type]; 36 | if (button != nil) { 37 | if ([button isKindOfClass:[UIActivityIndicatorView class]]) { 38 | // we need to wrap our activity indicator view into a UIView that will delegate 39 | // to our proxy 40 | activityDelegate = [[TiUIView alloc] initWithFrame:button.frame]; 41 | [activityDelegate addSubview:button]; 42 | activityDelegate.proxy = (TiViewProxy *)proxy_; 43 | button = activityDelegate; 44 | } 45 | self = [super initWithCustomView:button]; 46 | self.target = self; 47 | self.action = selector; 48 | if ([button isKindOfClass:[UIControl class]]) { 49 | [(UIControl *)button addTarget:self action:selector forControlEvents:UIControlEventTouchUpInside]; 50 | } 51 | } else { 52 | self = [super initWithBarButtonSystemItem:type target:self action:selector]; 53 | } 54 | } else if (image != nil) { 55 | UIImage *nativeImage; 56 | // The image can be a raw image (e.g. for blobs / system icons) 57 | if ([image isKindOfClass:[TiBlob class]]) { 58 | nativeImage = [(TiBlob *)image image]; 59 | } else { 60 | NSURL *url = [TiUtils toURL:image proxy:proxy_]; 61 | nativeImage = [[ImageLoader sharedLoader] loadImmediateStretchableImage:url]; 62 | } 63 | self = [super initWithImage:nativeImage style:(UIBarButtonItemStyle)[self style:proxy_] target:self action:selector]; 64 | } else { 65 | self = [super initWithTitle:[self title:proxy_] style:(UIBarButtonItemStyle)[self style:proxy_] target:self action:selector]; 66 | self.tintColor = [proxy_ valueForKey:@"color"] ? [TiUtils colorValue:[proxy_ valueForKey:@"color"]].color : [TiUtils colorValue:[proxy_ valueForKey:@"tintColor"]].color; 67 | } 68 | 69 | proxy = proxy_; // Don't retain 70 | 71 | self.accessibilityLabel = [proxy_ valueForUndefinedKey:@"accessibilityLabel"]; 72 | self.accessibilityValue = [proxy_ valueForUndefinedKey:@"accessibilityValue"]; 73 | self.accessibilityHint = [proxy_ valueForUndefinedKey:@"accessibilityHint"]; 74 | self.accessibilityIdentifier = [TiUtils composeAccessibilityIdentifier:self]; 75 | 76 | self.width = [TiUtils floatValue:[proxy_ valueForKey:@"width"] def:0.0]; 77 | //A width of 0 is treated as Auto by the iPhone OS, so this is safe. 78 | // we need to listen manually to proxy change events if we want to be 79 | // able to change them dynamically 80 | proxy.modelDelegate = self; 81 | 82 | // Inject our menu 83 | [TiContextmenuModule injectMenuForButton:self andProxy:proxy]; 84 | 85 | return self; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Classes/TiUIButtonProxy+ContextMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.h 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #define USE_TI_UIBUTTON 9 | 10 | #import 11 | #import "TiUIButtonProxy.h" 12 | 13 | @interface TiUIButtonProxy (ContextMenu) 14 | 15 | - (void)setMenu:(_Nonnull id)args; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Classes/TiUIButtonProxy+ContextMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.m 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #import "TiUIButtonProxy+ContextMenu.h" 9 | #import "TiUIButton.h" 10 | #import "TiContextmenuModule.h" 11 | 12 | @implementation TiUIButtonProxy (ContextMenu) 13 | 14 | #pragma mark Public API's 15 | 16 | - (void)setMenu:(NSArray *)actions 17 | { 18 | [self replaceValue:actions forKey:@"menu" notification:NO]; 19 | UIButton *button = [(TiUIButton *)[self view] button]; 20 | [TiContextmenuModule injectMenuForButton:button andProxy:self]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/TiUIListView+ContextMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.h 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #define USE_TI_UILISTVIEW 9 | 10 | #import 11 | #import "TiUIListView.h" 12 | 13 | @interface TiUIListView (ContextMenu) 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/TiUIListView+ContextMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.m 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #import "TiUIListView+ContextMenu.h" 9 | #import "TiContextmenuModule.h" 10 | #import "TiUIListViewProxy.h" 11 | #import "TiUIListSectionProxy.h" 12 | #import "TiUIListItemProxy.h" 13 | 14 | @implementation TiUIListView (ContextMenu) 15 | 16 | #pragma mark UITableViewDelegate (extension) 17 | 18 | - (UIContextMenuConfiguration *)tableView:(UITableView *)tableView 19 | contextMenuConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath 20 | point:(CGPoint)point 21 | API_AVAILABLE(ios(13.0)) 22 | { 23 | TiUIListSectionProxy *section = [[(TiUIListViewProxy *)self.proxy sections] objectAtIndex:indexPath.section]; 24 | NSDictionary *item = [section itemAtIndex:indexPath.row]; 25 | NSDictionary *itemProperties = item[@"properties"]; 26 | NSArray *> *menu = itemProperties[@"menu"]; 27 | 28 | if (!itemProperties || !menu) { 29 | return nil; 30 | } 31 | 32 | return [UIContextMenuConfiguration configurationWithIdentifier:@"TiContentMenuConfiguration" 33 | previewProvider:nil 34 | actionProvider:^UIMenu * _Nullable(NSArray * _Nonnull suggestedActions) { 35 | if (@available(iOS 14.0, *)) { 36 | UIMenu *nativeMenu = [TiContextmenuModule menuFromJavaScriptArray:menu andProxy:self.proxy title:nil handler:^(__kindof UIAction *action, NSUInteger index) { 37 | [self.proxy fireEvent:@"menuclick" withObject:@{ 38 | @"itemIndex": @(indexPath.row), 39 | @"sectionIndex": @(indexPath.section), 40 | @"actionIndex": @(index), 41 | @"identifier": action.identifier 42 | }]; 43 | }]; 44 | 45 | if (@available(iOS 16.0, *)) { 46 | UIMenuElementSize elementSize = [TiUtils intValue:@"preferredElementSize" properties:itemProperties def:UIMenuElementSizeLarge]; 47 | nativeMenu.preferredElementSize = elementSize; 48 | } 49 | 50 | return nativeMenu; 51 | } else { 52 | return nil; 53 | } 54 | }]; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Classes/TiUITableView+ContextMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.h 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #define USE_TI_UITABLEVIEW 9 | 10 | #import 11 | #import "TiUITableView.h" 12 | 13 | @interface TiUITableView (ContextMenu) 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/TiUITableView+ContextMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.m 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #import "TiUITableView+ContextMenu.h" 9 | #import "TiContextmenuModule.h" 10 | #import "TiUITableViewProxy.h" 11 | 12 | @implementation TiUITableView (ContextMenu) 13 | 14 | #pragma mark UITableViewDelegate (extension) 15 | 16 | - (UIContextMenuConfiguration *)tableView:(UITableView *)tableView 17 | contextMenuConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath 18 | point:(CGPoint)point 19 | API_AVAILABLE(ios(13.0)) 20 | { 21 | #pragma clang diagnostic push 22 | #pragma clang diagnostic ignored "-Wundeclared-selector" 23 | TiUITableViewRowProxy *row = [self performSelector:@selector(rowForIndexPath:) withObject:indexPath]; 24 | #pragma clang diagnostic pop 25 | NSArray *> *menu = [row valueForKey:@"menu"]; 26 | 27 | if (!menu) { 28 | return nil; 29 | } 30 | 31 | return [UIContextMenuConfiguration configurationWithIdentifier:@"TiContentMenuConfiguration" 32 | previewProvider:nil 33 | actionProvider:^UIMenu * _Nullable(NSArray * _Nonnull suggestedActions) { 34 | if (@available(iOS 14.0, *)) { 35 | UIMenu *nativeMenu = [TiContextmenuModule menuFromJavaScriptArray:menu andProxy:self.proxy title:nil handler:^(__kindof UIAction *action, NSUInteger index) { 36 | [self.proxy fireEvent:@"menuclick" withObject:@{ 37 | @"itemIndex": @(indexPath.row), 38 | @"sectionIndex": @(indexPath.section), 39 | @"actionIndex": @(index), 40 | @"identifier": action.identifier 41 | }]; 42 | }]; 43 | 44 | if (@available(iOS 16.0, *)) { 45 | UIMenuElementSize elementSize = [TiUtils intValue:@"preferredElementSize" properties:row.allProperties def:UIMenuElementSizeLarge]; 46 | nativeMenu.preferredElementSize = elementSize; 47 | } 48 | 49 | return nativeMenu; 50 | } else { 51 | return nil; 52 | } 53 | }]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Classes/TiViewProxy+ContextMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.h 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 12 | @interface TiViewProxy (ContextMenu) 13 | #else 14 | @interface TiViewProxy (ContextMenu) 15 | #endif 16 | 17 | // NOTE: We need to prefix the properties to not clash with existing proxy properties like window- / button-title 18 | 19 | @property(nonatomic, retain) NSArray *> * _Nonnull __actions; 20 | 21 | @property(nonatomic, copy) NSString * _Nullable __title; 22 | 23 | @property(nonatomic, copy) NSString * _Nullable __identifier; 24 | 25 | - (void)addInteraction:(_Nonnull id)args; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Classes/TiViewProxy+ContextMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // TiViewProxy+ContextMenu.m 3 | // titanium-context-menu 4 | // 5 | // Created by Hans Knoechel on 07.09.19. 6 | // 7 | 8 | #import "TiViewProxy+ContextMenu.h" 9 | #import 10 | 11 | static void * kTiContextMenuPropertyKeyActions = &kTiContextMenuPropertyKeyActions; 12 | static void * kTiContextMenuPropertyKeyIdentifier = &kTiContextMenuPropertyKeyIdentifier; 13 | static void * kTiContextMenuPropertyKeyTitle = &kTiContextMenuPropertyKeyTitle; 14 | 15 | @implementation TiViewProxy (ContextMenu) 16 | 17 | @dynamic __actions, __title, __identifier; 18 | 19 | #pragma mark Public API's 20 | 21 | - (void)addInteraction:(id)interaction 22 | { 23 | ENSURE_SINGLE_ARG(interaction, NSDictionary); 24 | 25 | self.__actions = interaction[@"actions"]; 26 | self.__title = interaction[@"title"] ?: @""; 27 | self.__identifier = interaction[@"identifier"] ?: nil; 28 | 29 | if (@available(iOS 13.0, *)) { 30 | UIContextMenuInteraction *interaction = [[UIContextMenuInteraction alloc] initWithDelegate:self]; 31 | [self.view addInteraction:interaction]; 32 | } else { 33 | NSLog(@"[ERROR] Only call this method on iOS 13+"); 34 | } 35 | } 36 | 37 | #pragma mark Obj-C runtime hacks for category properties 38 | 39 | - (void)set__actions:(NSArray *> *)actions 40 | { 41 | objc_setAssociatedObject(self, kTiContextMenuPropertyKeyActions, actions, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 42 | } 43 | 44 | - (void)set__title:(NSString *)title 45 | { 46 | objc_setAssociatedObject(self, kTiContextMenuPropertyKeyTitle, title, OBJC_ASSOCIATION_COPY); 47 | } 48 | 49 | - (void)set__identifier:(NSString *)identifier 50 | { 51 | objc_setAssociatedObject(self, kTiContextMenuPropertyKeyIdentifier, identifier, OBJC_ASSOCIATION_COPY); 52 | } 53 | 54 | - (NSArray *> *)__actions 55 | { 56 | return objc_getAssociatedObject(self, kTiContextMenuPropertyKeyActions); 57 | } 58 | 59 | - (NSString *)__title 60 | { 61 | return objc_getAssociatedObject(self, kTiContextMenuPropertyKeyTitle); 62 | } 63 | 64 | - (NSString *)__identifier 65 | { 66 | return objc_getAssociatedObject(self, kTiContextMenuPropertyKeyIdentifier); 67 | } 68 | 69 | #pragma mark UIContextMenuInteractionDelegate 70 | 71 | - (nullable UIContextMenuConfiguration *)contextMenuInteraction:(nonnull UIContextMenuInteraction *)interaction 72 | configurationForMenuAtLocation:(CGPoint)location API_AVAILABLE(ios(13.0)) 73 | { 74 | return [UIContextMenuConfiguration configurationWithIdentifier:self.__identifier 75 | previewProvider:nil 76 | actionProvider:^UIMenu * _Nullable(NSArray * _Nonnull suggestedActions) { 77 | 78 | NSMutableArray *children = [NSMutableArray arrayWithCapacity:self.__actions.count]; 79 | 80 | [self.__actions enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 81 | NSString *title = obj[@"title"]; 82 | UIImage *image = [TiUtils toImage:obj[@"image"] proxy:self]; 83 | NSString *identifier = obj[@"identifier"]; 84 | BOOL destructive = [TiUtils boolValue:obj[@"destructive"] def:NO]; 85 | BOOL enabled = [TiUtils boolValue:obj[@"enabled"] def:YES]; 86 | 87 | UIAction *action = [UIAction actionWithTitle:title image:image identifier:identifier handler:^(__kindof UIAction * _Nonnull action) { 88 | [self fireEvent:@"interaction" withObject:@{ @"index": @(idx), @"identifier": action.identifier ?: NSNull.null }]; 89 | }]; 90 | 91 | if (destructive) { 92 | action.attributes = UIMenuElementAttributesDestructive; 93 | } 94 | 95 | if (!enabled) { 96 | action.attributes = UIMenuElementAttributesDisabled; 97 | } 98 | 99 | [children addObject:action]; 100 | }]; 101 | 102 | return [UIMenu menuWithTitle:self.__title children:children]; 103 | }]; 104 | } 105 | 106 | - (void)contextMenuInteraction:(UIContextMenuInteraction *)interaction willDisplayMenuForConfiguration:(UIContextMenuConfiguration *)configuration animator:(id)animator API_AVAILABLE(ios(13.0)) 107 | { 108 | [self fireEvent:@"preinteraction" withObject:@{}]; 109 | } 110 | 111 | - (void)contextMenuInteraction:(UIContextMenuInteraction *)interaction willEndForConfiguration:(UIContextMenuConfiguration *)configuration animator:(id)animator API_AVAILABLE(ios(13.0)) 112 | { 113 | [self fireEvent:@"postinteraction" withObject:@{}]; 114 | } 115 | 116 | @end 117 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Hans Knöchel 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Titanium iOS 14+ Context Menus 2 | 3 | Use the `UIPreviewInteraction` and `UIMenu` API in the Titanium SDK. 4 | 5 | 6 | 7 | ## Requirements 8 | 9 | - [x] Titanium SDK 9.2.0+ 10 | - [x] iOS 14+ 11 | 12 | ## How does it work? 13 | 14 | Simply include the `ti.contextmenu` module in your tiapp.xml and let the magic happen. 15 | 16 | ### UIPreviewInteraction 17 | 18 | Call the `addInteraction` method on any `Ti.UI.View` subclass (e.g. `Ti.UI.ImageView`). 19 | 20 | ### UIMenu 21 | 22 | Add the `menu` property to a `Ti.UI.Button`. Since version 2.1.0, the `menu` property also works for buttons in the 23 | navigation bar, e.g. `rightNavButton` or `leftNavButton`, but only if you have either a `title` or `image`. 24 | Since version 2.2.0, the menu also works for the `ListView` and `TableView` API. Since version 4.0.0, you can use nested menus as well. 25 | 26 | ## Full Example 27 | 28 | See the `example/app.js` for a full-featured example. 29 | 30 | ## License 31 | 32 | MIT 33 | 34 | ## Author 35 | 36 | Hans Knöchel 37 | -------------------------------------------------------------------------------- /Resources/README.md: -------------------------------------------------------------------------------- 1 | Files in this folder are copied directory into the compiled product directory 2 | when the iOS app is compiled: 3 | 4 | /build/iphone/build/Products//.app/ 5 | 6 | Place your module's iOS bundles and localization files in this folder. 7 | 8 | Files in this directory are copied directly on top of whatever files are already 9 | in the build directory, so please be careful that your files don't clobber 10 | essential project files or files from other modules. 11 | -------------------------------------------------------------------------------- /TiContextmenu_Prefix.pch: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __OBJC__ 3 | #import 4 | #import 5 | #endif 6 | 7 | #define USE_TI_UIIMAGEVIEW 8 | -------------------------------------------------------------------------------- /example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/titanium-context-menu/474885ac302fb37ff0b0b476229d870cf0f90e7f/example.gif -------------------------------------------------------------------------------- /example/app.js: -------------------------------------------------------------------------------- 1 | const win = Ti.UI.createWindow({ 2 | layout: 'vertical', 3 | title: 'Ti.ContextMenu' 4 | }); 5 | 6 | const nav = Ti.UI.createNavigationWindow({ 7 | window: win 8 | }); 9 | 10 | const label = Ti.UI.createLabel({ 11 | text: 'Long-press the image below:', 12 | top: 50 13 | }); 14 | 15 | const image = Ti.UI.createImageView({ 16 | top: 20, 17 | width: 200, 18 | height: 200, 19 | borderRadius: 10, 20 | image: 'logo-titanium.png' 21 | }); 22 | 23 | image.addEventListener('interaction', function(event) { 24 | alert(`Clicked menu item with identifier = ${event.identifier}`); 25 | }); 26 | 27 | image.addInteraction({ 28 | identifier: 'main_menu', 29 | actions: [{ 30 | identifier: 'edit', 31 | image: Ti.UI.iOS.systemImage('plus.circle'), 32 | title: 'Edit …' 33 | }, 34 | { 35 | identifier: 'delete', 36 | title: 'Delete', 37 | destructive: true 38 | }] 39 | }); 40 | 41 | const separator = Ti.UI.createView({ 42 | height: 1, 43 | backgroundColor: '#e0e0e0', 44 | top: 40, 45 | bottom: 40, 46 | width: 300 47 | }); 48 | 49 | const btn = Ti.UI.createButton({ 50 | title: 'Show button options', 51 | menu: [{ 52 | title: 'Action 1', 53 | identifier: '123' 54 | }, { 55 | title: 'Action 2', 56 | identifier: '456', 57 | destructive: true 58 | }, { 59 | title: 'Sub Menu', 60 | menu: [{ 61 | title: 'Sub Item 1', 62 | identifier: 'sub' 63 | }] 64 | }] 65 | }) 66 | 67 | btn.addEventListener('menuclick', event => { 68 | alert(`Clicked menu item with identifier = ${event.identifier}`); 69 | }); 70 | 71 | const btn2 = Ti.UI.createButton({ 72 | image: Ti.UI.createView({ 73 | width: 20, 74 | height: 20, 75 | backgroundColor: 'red' 76 | }).toImage(), 77 | menu: [{ 78 | title: 'Action 1', 79 | identifier: '123' 80 | }, { 81 | title: 'Action 2', 82 | identifier: '456', 83 | destructive: true, 84 | }, { 85 | title: 'Sub Menu', 86 | menu: [{ 87 | title: 'Sub Item 1', 88 | identifier: 'sub' 89 | }] 90 | }] 91 | }) 92 | 93 | btn2.addEventListener('menuclick', event => { 94 | alert(`Clicked menu item with identifier = ${event.identifier}`); 95 | }); 96 | 97 | var listView = Ti.UI.createListView({ 98 | bottom: 100, 99 | sections: [Ti.UI.createListSection({ 100 | items: generate10Items() 101 | })] 102 | }) 103 | 104 | listView.addEventListener('menuclick', event => { 105 | alert('Clicked at sectionIndex: ' + event.sectionIndex + ', itemIndex: ' + event.itemIndex + ', actionIndex: ' + event.actionIndex + ', identifier: ' + event.identifier); 106 | }); 107 | 108 | win.rightNavButton = btn2; 109 | win.add([label, image, separator, btn, listView]); 110 | nav.open(); 111 | 112 | function generate10Items() { 113 | const item = { 114 | properties: { 115 | itemId: 1, 116 | title: 'Hello world', 117 | menu: [{ 118 | title: 'Action 1', 119 | identifier: '123' 120 | }, { 121 | title: 'Action 2', 122 | identifier: '456', 123 | destructive: true 124 | }, { 125 | title: 'Sub Menu', 126 | menu: [{ 127 | title: 'Sub Item 1', 128 | identifier: 'sub1' 129 | }, { 130 | title: 'Sub Item 2', 131 | identifier: 'sub2', 132 | destructive: true 133 | }] 134 | }] 135 | } 136 | }; 137 | 138 | return [item, item, item, item, item, item, item, item, item, item] 139 | } 140 | -------------------------------------------------------------------------------- /manifest: -------------------------------------------------------------------------------- 1 | # 2 | # this is your module manifest and used by Titanium 3 | # during compilation, packaging, distribution, etc. 4 | # 5 | version: 4.0.0 6 | apiversion: 2 7 | architectures: arm64 x86_64 8 | description: titanium-context-menu 9 | author: Hans Knöchel 10 | license: MIT 11 | mac: true 12 | copyright: Copyright (c) 2019-present by Hans Knöchel 13 | 14 | # these should not be edited 15 | name: titanium-context-menu 16 | moduleid: ti.contextmenu 17 | guid: 09c37883-d40d-4c84-90e6-ca64399f5c8a 18 | platform: iphone 19 | minsdk: 11.0.0 20 | -------------------------------------------------------------------------------- /module.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // PLACE ANY BUILD DEFINITIONS IN THIS FILE AND THEY WILL BE 3 | // PICKED UP DURING THE APP BUILD FOR YOUR MODULE 4 | // 5 | // see the following webpage for instructions on the settings 6 | // for this file: 7 | // https://developer.apple.com/library/content/featuredarticles/XcodeConcepts/Concept-Build_Settings.html 8 | // 9 | 10 | // 11 | // How to manually add a Framework (example) 12 | // Note: Titanium SDK 6.2.2+ detects and links frameworks automatically 13 | // 14 | // OTHER_LDFLAGS=$(inherited) -framework Foo 15 | // 16 | // Adding a framework for a specific version(s) of iOS, e.g iOS 11: 17 | // 18 | // OTHER_LDFLAGS[sdk=iphoneos11*]=$(inherited) -framework Foo 19 | // OTHER_LDFLAGS[sdk=iphonesimulator11*]=$(inherited) -framework Foo 20 | // 21 | // 22 | // How to add a compiler define: 23 | // 24 | // OTHER_CFLAGS=$(inherited) -DFOO=1 25 | // 26 | // 27 | // IMPORTANT NOTE: always use $(inherited) in your overrides 28 | // 29 | -------------------------------------------------------------------------------- /platform/README.md: -------------------------------------------------------------------------------- 1 | Files in this folder are copied directory into the iOS build directory 2 | when the iOS app is compiled: 3 | 4 | /build/iphone 5 | 6 | You can place files such as asset catalog files, .framework files and storyboards in this 7 | directory. 8 | 9 | Files in this directory are copied directly on top of whatever files are already 10 | in the build directory, so please be careful that your files don't clobber 11 | essential project files or files from other modules. 12 | -------------------------------------------------------------------------------- /timodule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /titanium-context-menu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXAggregateTarget section */ 10 | 24416B8111C4CA220047AFDD /* Build & Test */ = { 11 | isa = PBXAggregateTarget; 12 | buildConfigurationList = 24416B8A11C4CA520047AFDD /* Build configuration list for PBXAggregateTarget "Build & Test" */; 13 | buildPhases = ( 14 | 24416B8011C4CA220047AFDD /* ShellScript */, 15 | ); 16 | dependencies = ( 17 | 24416B8511C4CA280047AFDD /* PBXTargetDependency */, 18 | ); 19 | name = "Build & Test"; 20 | productName = "Build & test"; 21 | }; 22 | /* End PBXAggregateTarget section */ 23 | 24 | /* Begin PBXBuildFile section */ 25 | 24DD6CF91134B3F500162E58 /* TiContextmenuModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DD6CF71134B3F500162E58 /* TiContextmenuModule.h */; }; 26 | 24DD6CFA1134B3F500162E58 /* TiContextmenuModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* TiContextmenuModule.m */; }; 27 | 24DE9E1111C5FE74003F90F6 /* TiContextmenuModuleAssets.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DE9E0F11C5FE74003F90F6 /* TiContextmenuModuleAssets.h */; }; 28 | 24DE9E1211C5FE74003F90F6 /* TiContextmenuModuleAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DE9E1011C5FE74003F90F6 /* TiContextmenuModuleAssets.m */; }; 29 | 3A23B01025791190006098E9 /* TiUIButtonProxy+ContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A23B00E25791190006098E9 /* TiUIButtonProxy+ContextMenu.h */; }; 30 | 3A23B01125791190006098E9 /* TiUIButtonProxy+ContextMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A23B00F25791190006098E9 /* TiUIButtonProxy+ContextMenu.m */; }; 31 | 3A4F67712323CF6D00D71233 /* TiViewProxy+ContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A4F676F2323CF6D00D71233 /* TiViewProxy+ContextMenu.h */; }; 32 | 3A4F67722323CF6D00D71233 /* TiViewProxy+ContextMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A4F67702323CF6D00D71233 /* TiViewProxy+ContextMenu.m */; }; 33 | 3A5D00482C43127300A95AE3 /* TiUITableView+ContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5D00462C43127300A95AE3 /* TiUITableView+ContextMenu.h */; }; 34 | 3A5D00492C43127300A95AE3 /* TiUITableView+ContextMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5D00472C43127300A95AE3 /* TiUITableView+ContextMenu.m */; }; 35 | 3A704DFF263DADA6006D4356 /* TiUIListView+ContextMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A704DFD263DADA6006D4356 /* TiUIListView+ContextMenu.m */; }; 36 | 3A704E00263DADA6006D4356 /* TiUIListView+ContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A704DFE263DADA6006D4356 /* TiUIListView+ContextMenu.h */; }; 37 | 3AE5307D263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AE5307B263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 38 | 3AE5307E263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AE5307C263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.h */; }; 39 | AA747D9F0F9514B9006C5449 /* TiContextmenu_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* TiContextmenu_Prefix.pch */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXContainerItemProxy section */ 43 | 24416B8411C4CA280047AFDD /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = D2AAC07D0554694100DB518D; 48 | remoteInfo = "titanium-context-menu"; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | 24DD6CF71134B3F500162E58 /* TiContextmenuModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TiContextmenuModule.h; path = Classes/TiContextmenuModule.h; sourceTree = ""; }; 54 | 24DD6CF81134B3F500162E58 /* TiContextmenuModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TiContextmenuModule.m; path = Classes/TiContextmenuModule.m; sourceTree = ""; }; 55 | 24DD6D1B1134B66800162E58 /* titanium.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = titanium.xcconfig; sourceTree = ""; }; 56 | 24DE9E0F11C5FE74003F90F6 /* TiContextmenuModuleAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TiContextmenuModuleAssets.h; path = Classes/TiContextmenuModuleAssets.h; sourceTree = ""; }; 57 | 24DE9E1011C5FE74003F90F6 /* TiContextmenuModuleAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TiContextmenuModuleAssets.m; path = Classes/TiContextmenuModuleAssets.m; sourceTree = ""; }; 58 | 3A23B00E25791190006098E9 /* TiUIButtonProxy+ContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TiUIButtonProxy+ContextMenu.h"; path = "Classes/TiUIButtonProxy+ContextMenu.h"; sourceTree = ""; }; 59 | 3A23B00F25791190006098E9 /* TiUIButtonProxy+ContextMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "TiUIButtonProxy+ContextMenu.m"; path = "Classes/TiUIButtonProxy+ContextMenu.m"; sourceTree = ""; }; 60 | 3A4F676F2323CF6D00D71233 /* TiViewProxy+ContextMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "TiViewProxy+ContextMenu.h"; path = "Classes/TiViewProxy+ContextMenu.h"; sourceTree = ""; }; 61 | 3A4F67702323CF6D00D71233 /* TiViewProxy+ContextMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "TiViewProxy+ContextMenu.m"; path = "Classes/TiViewProxy+ContextMenu.m"; sourceTree = ""; }; 62 | 3A5D00462C43127300A95AE3 /* TiUITableView+ContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TiUITableView+ContextMenu.h"; path = "Classes/TiUITableView+ContextMenu.h"; sourceTree = ""; }; 63 | 3A5D00472C43127300A95AE3 /* TiUITableView+ContextMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "TiUITableView+ContextMenu.m"; path = "Classes/TiUITableView+ContextMenu.m"; sourceTree = ""; }; 64 | 3A704DFD263DADA6006D4356 /* TiUIListView+ContextMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "TiUIListView+ContextMenu.m"; path = "Classes/TiUIListView+ContextMenu.m"; sourceTree = ""; }; 65 | 3A704DFE263DADA6006D4356 /* TiUIListView+ContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TiUIListView+ContextMenu.h"; path = "Classes/TiUIListView+ContextMenu.h"; sourceTree = ""; }; 66 | 3AE5307B263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "TiUIBarButtonProxy+ContextMenu.m"; path = "Classes/TiUIBarButtonProxy+ContextMenu.m"; sourceTree = ""; }; 67 | 3AE5307C263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TiUIBarButtonProxy+ContextMenu.h"; path = "Classes/TiUIBarButtonProxy+ContextMenu.h"; sourceTree = ""; }; 68 | AA747D9E0F9514B9006C5449 /* TiContextmenu_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TiContextmenu_Prefix.pch; sourceTree = SOURCE_ROOT; }; 69 | D2AAC07E0554694100DB518D /* libti.contextmenu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libti.contextmenu.a; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | D2AAC07C0554694100DB518D /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 034768DFFF38A50411DB9C8B /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | D2AAC07E0554694100DB518D /* libti.contextmenu.a */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | 0867D691FE84028FC02AAC07 /* titanium-context-menu */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 08FB77AEFE84172EC02AAC07 /* Classes */, 95 | 32C88DFF0371C24200C91783 /* Other Sources */, 96 | 0867D69AFE84028FC02AAC07 /* Frameworks */, 97 | 034768DFFF38A50411DB9C8B /* Products */, 98 | ); 99 | name = "titanium-context-menu"; 100 | sourceTree = ""; 101 | }; 102 | 0867D69AFE84028FC02AAC07 /* Frameworks */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 08FB77AEFE84172EC02AAC07 /* Classes */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 24DE9E0F11C5FE74003F90F6 /* TiContextmenuModuleAssets.h */, 113 | 24DE9E1011C5FE74003F90F6 /* TiContextmenuModuleAssets.m */, 114 | 24DD6CF71134B3F500162E58 /* TiContextmenuModule.h */, 115 | 24DD6CF81134B3F500162E58 /* TiContextmenuModule.m */, 116 | 3A23B01325791199006098E9 /* View */, 117 | 3A5D004A2C43127700A95AE3 /* TableView */, 118 | 3A704E03263DB60B006D4356 /* List View */, 119 | 3AE53081263BDC4300E50EA1 /* Navigation Bar Button */, 120 | 3A23B01225791194006098E9 /* Button */, 121 | ); 122 | name = Classes; 123 | sourceTree = ""; 124 | }; 125 | 32C88DFF0371C24200C91783 /* Other Sources */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | AA747D9E0F9514B9006C5449 /* TiContextmenu_Prefix.pch */, 129 | 24DD6D1B1134B66800162E58 /* titanium.xcconfig */, 130 | ); 131 | name = "Other Sources"; 132 | sourceTree = ""; 133 | }; 134 | 3A23B01225791194006098E9 /* Button */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 3A23B00E25791190006098E9 /* TiUIButtonProxy+ContextMenu.h */, 138 | 3A23B00F25791190006098E9 /* TiUIButtonProxy+ContextMenu.m */, 139 | ); 140 | name = Button; 141 | sourceTree = ""; 142 | }; 143 | 3A23B01325791199006098E9 /* View */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 3A4F676F2323CF6D00D71233 /* TiViewProxy+ContextMenu.h */, 147 | 3A4F67702323CF6D00D71233 /* TiViewProxy+ContextMenu.m */, 148 | ); 149 | name = View; 150 | sourceTree = ""; 151 | }; 152 | 3A5D004A2C43127700A95AE3 /* TableView */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 3A5D00462C43127300A95AE3 /* TiUITableView+ContextMenu.h */, 156 | 3A5D00472C43127300A95AE3 /* TiUITableView+ContextMenu.m */, 157 | ); 158 | name = TableView; 159 | sourceTree = ""; 160 | }; 161 | 3A704E03263DB60B006D4356 /* List View */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 3A704DFE263DADA6006D4356 /* TiUIListView+ContextMenu.h */, 165 | 3A704DFD263DADA6006D4356 /* TiUIListView+ContextMenu.m */, 166 | ); 167 | name = "List View"; 168 | sourceTree = ""; 169 | }; 170 | 3AE53081263BDC4300E50EA1 /* Navigation Bar Button */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 3AE5307C263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.h */, 174 | 3AE5307B263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.m */, 175 | ); 176 | name = "Navigation Bar Button"; 177 | sourceTree = ""; 178 | }; 179 | /* End PBXGroup section */ 180 | 181 | /* Begin PBXHeadersBuildPhase section */ 182 | D2AAC07A0554694100DB518D /* Headers */ = { 183 | isa = PBXHeadersBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | AA747D9F0F9514B9006C5449 /* TiContextmenu_Prefix.pch in Headers */, 187 | 3A704E00263DADA6006D4356 /* TiUIListView+ContextMenu.h in Headers */, 188 | 3A4F67712323CF6D00D71233 /* TiViewProxy+ContextMenu.h in Headers */, 189 | 24DD6CF91134B3F500162E58 /* TiContextmenuModule.h in Headers */, 190 | 3A5D00482C43127300A95AE3 /* TiUITableView+ContextMenu.h in Headers */, 191 | 24DE9E1111C5FE74003F90F6 /* TiContextmenuModuleAssets.h in Headers */, 192 | 3AE5307E263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.h in Headers */, 193 | 3A23B01025791190006098E9 /* TiUIButtonProxy+ContextMenu.h in Headers */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXHeadersBuildPhase section */ 198 | 199 | /* Begin PBXNativeTarget section */ 200 | D2AAC07D0554694100DB518D /* titanium-context-menu */ = { 201 | isa = PBXNativeTarget; 202 | buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "titanium-context-menu" */; 203 | buildPhases = ( 204 | D2AAC07A0554694100DB518D /* Headers */, 205 | D2AAC07B0554694100DB518D /* Sources */, 206 | D2AAC07C0554694100DB518D /* Frameworks */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | ); 212 | name = "titanium-context-menu"; 213 | productName = "titanium-context-menu"; 214 | productReference = D2AAC07E0554694100DB518D /* libti.contextmenu.a */; 215 | productType = "com.apple.product-type.library.static"; 216 | }; 217 | /* End PBXNativeTarget section */ 218 | 219 | /* Begin PBXProject section */ 220 | 0867D690FE84028FC02AAC07 /* Project object */ = { 221 | isa = PBXProject; 222 | attributes = { 223 | BuildIndependentTargetsInParallel = YES; 224 | LastUpgradeCheck = 1510; 225 | }; 226 | buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "titanium-context-menu" */; 227 | compatibilityVersion = "Xcode 9.3"; 228 | developmentRegion = en; 229 | hasScannedForEncodings = 1; 230 | knownRegions = ( 231 | Base, 232 | en, 233 | de, 234 | ja, 235 | fr, 236 | ); 237 | mainGroup = 0867D691FE84028FC02AAC07 /* titanium-context-menu */; 238 | productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; 239 | projectDirPath = ""; 240 | projectRoot = ""; 241 | targets = ( 242 | D2AAC07D0554694100DB518D /* titanium-context-menu */, 243 | 24416B8111C4CA220047AFDD /* Build & Test */, 244 | ); 245 | }; 246 | /* End PBXProject section */ 247 | 248 | /* Begin PBXShellScriptBuildPhase section */ 249 | 24416B8011C4CA220047AFDD /* ShellScript */ = { 250 | isa = PBXShellScriptBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | ); 254 | inputPaths = ( 255 | ); 256 | outputPaths = ( 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | shellPath = /bin/sh; 260 | shellScript = "# shell script goes here\n\nappc run --project-dir \"${PROJECT_DIR}\"\nexit $?\n"; 261 | }; 262 | /* End PBXShellScriptBuildPhase section */ 263 | 264 | /* Begin PBXSourcesBuildPhase section */ 265 | D2AAC07B0554694100DB518D /* Sources */ = { 266 | isa = PBXSourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | 3A4F67722323CF6D00D71233 /* TiViewProxy+ContextMenu.m in Sources */, 270 | 24DD6CFA1134B3F500162E58 /* TiContextmenuModule.m in Sources */, 271 | 3A5D00492C43127300A95AE3 /* TiUITableView+ContextMenu.m in Sources */, 272 | 3A704DFF263DADA6006D4356 /* TiUIListView+ContextMenu.m in Sources */, 273 | 3A23B01125791190006098E9 /* TiUIButtonProxy+ContextMenu.m in Sources */, 274 | 3AE5307D263BDC3E00E50EA1 /* TiUIBarButtonProxy+ContextMenu.m in Sources */, 275 | 24DE9E1211C5FE74003F90F6 /* TiContextmenuModuleAssets.m in Sources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXSourcesBuildPhase section */ 280 | 281 | /* Begin PBXTargetDependency section */ 282 | 24416B8511C4CA280047AFDD /* PBXTargetDependency */ = { 283 | isa = PBXTargetDependency; 284 | target = D2AAC07D0554694100DB518D /* titanium-context-menu */; 285 | targetProxy = 24416B8411C4CA280047AFDD /* PBXContainerItemProxy */; 286 | }; 287 | /* End PBXTargetDependency section */ 288 | 289 | /* Begin XCBuildConfiguration section */ 290 | 1DEB921F08733DC00010E9CD /* Debug */ = { 291 | isa = XCBuildConfiguration; 292 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 293 | buildSettings = { 294 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; 295 | CLANG_ANALYZER_NONNULL = NO; 296 | CLANG_ENABLE_MODULES = YES; 297 | CLANG_ENABLE_OBJC_ARC = YES; 298 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = NO; 299 | CLANG_WARN_STRICT_PROTOTYPES = NO; 300 | CODE_SIGN_IDENTITY = "iPhone Developer"; 301 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 302 | DSTROOT = /tmp/TiContextmenu.dst; 303 | GCC_C_LANGUAGE_STANDARD = c99; 304 | GCC_OPTIMIZATION_LEVEL = 0; 305 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 306 | GCC_PREFIX_HEADER = TiContextmenu_Prefix.pch; 307 | GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; 308 | GCC_TREAT_WARNINGS_AS_ERRORS = NO; 309 | GCC_VERSION = ""; 310 | GCC_WARN_ABOUT_RETURN_TYPE = NO; 311 | GCC_WARN_MISSING_PARENTHESES = NO; 312 | GCC_WARN_SHADOW = NO; 313 | GCC_WARN_STRICT_SELECTOR_MATCH = NO; 314 | GCC_WARN_UNUSED_FUNCTION = YES; 315 | GCC_WARN_UNUSED_PARAMETER = NO; 316 | GCC_WARN_UNUSED_VALUE = NO; 317 | GCC_WARN_UNUSED_VARIABLE = NO; 318 | INSTALL_PATH = /usr/local/lib; 319 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 320 | LIBRARY_SEARCH_PATHS = ""; 321 | OTHER_CFLAGS = ( 322 | "-DDEBUG", 323 | "-DTI_POST_1_2", 324 | ); 325 | OTHER_LDFLAGS = "-ObjC"; 326 | PRODUCT_NAME = ti.contextmenu; 327 | PROVISIONING_PROFILE = ""; 328 | "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; 329 | RUN_CLANG_STATIC_ANALYZER = NO; 330 | SDKROOT = iphoneos; 331 | USER_HEADER_SEARCH_PATHS = ""; 332 | WARNING_CFLAGS = "-Wno-arc-performSelector-leaks"; 333 | }; 334 | name = Debug; 335 | }; 336 | 1DEB922008733DC00010E9CD /* Release */ = { 337 | isa = XCBuildConfiguration; 338 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 339 | buildSettings = { 340 | ALWAYS_SEARCH_USER_PATHS = NO; 341 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; 342 | CLANG_ANALYZER_NONNULL = NO; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = NO; 346 | CLANG_WARN_STRICT_PROTOTYPES = NO; 347 | DEPLOYMENT_POSTPROCESSING = YES; 348 | DSTROOT = /tmp/TiContextmenu.dst; 349 | GCC_C_LANGUAGE_STANDARD = c99; 350 | GCC_MODEL_TUNING = G5; 351 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 352 | GCC_PREFIX_HEADER = TiContextmenu_Prefix.pch; 353 | GCC_PREPROCESSOR_DEFINITIONS = ( 354 | "TI_VERSION=$(TI_VERSION)", 355 | NDEBUG, 356 | ); 357 | GCC_TREAT_WARNINGS_AS_ERRORS = NO; 358 | GCC_VERSION = ""; 359 | GCC_WARN_ABOUT_RETURN_TYPE = NO; 360 | GCC_WARN_MISSING_PARENTHESES = NO; 361 | GCC_WARN_SHADOW = NO; 362 | GCC_WARN_STRICT_SELECTOR_MATCH = NO; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_PARAMETER = NO; 365 | GCC_WARN_UNUSED_VALUE = NO; 366 | GCC_WARN_UNUSED_VARIABLE = NO; 367 | INSTALL_PATH = /usr/local/lib; 368 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 369 | LIBRARY_SEARCH_PATHS = ""; 370 | OTHER_CFLAGS = "-DTI_POST_1_2"; 371 | OTHER_LDFLAGS = "-ObjC"; 372 | PRODUCT_NAME = ti.contextmenu; 373 | RUN_CLANG_STATIC_ANALYZER = NO; 374 | SDKROOT = iphoneos; 375 | USER_HEADER_SEARCH_PATHS = ""; 376 | WARNING_CFLAGS = "-Wno-arc-performSelector-leaks"; 377 | }; 378 | name = Release; 379 | }; 380 | 1DEB922308733DC00010E9CD /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 383 | buildSettings = { 384 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 385 | CLANG_CXX_LIBRARY = "compiler-default"; 386 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_COMMA = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | CODE_SIGN_IDENTITY = "iPhone Developer"; 405 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 406 | DSTROOT = /tmp/TiContextmenu.dst; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | ENABLE_TESTABILITY = YES; 409 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 410 | GCC_C_LANGUAGE_STANDARD = c99; 411 | GCC_NO_COMMON_BLOCKS = YES; 412 | GCC_OPTIMIZATION_LEVEL = 0; 413 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 414 | GCC_PREFIX_HEADER = TiContextmenu_Prefix.pch; 415 | GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; 416 | GCC_TREAT_WARNINGS_AS_ERRORS = NO; 417 | GCC_VERSION = ""; 418 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 419 | GCC_WARN_ABOUT_RETURN_TYPE = NO; 420 | GCC_WARN_MISSING_PARENTHESES = NO; 421 | GCC_WARN_SHADOW = NO; 422 | GCC_WARN_STRICT_SELECTOR_MATCH = NO; 423 | GCC_WARN_UNDECLARED_SELECTOR = YES; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 425 | GCC_WARN_UNUSED_FUNCTION = YES; 426 | GCC_WARN_UNUSED_PARAMETER = NO; 427 | GCC_WARN_UNUSED_VALUE = NO; 428 | GCC_WARN_UNUSED_VARIABLE = NO; 429 | INSTALL_PATH = /usr/local/lib; 430 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 431 | ONLY_ACTIVE_ARCH = YES; 432 | OTHER_CFLAGS = ( 433 | "-DDEBUG", 434 | "-DTI_POST_1_2", 435 | ); 436 | OTHER_LDFLAGS = "-ObjC"; 437 | PRODUCT_NAME = ti.contextmenu; 438 | PROVISIONING_PROFILE = ""; 439 | "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; 440 | RUN_CLANG_STATIC_ANALYZER = NO; 441 | SDKROOT = iphoneos; 442 | USER_HEADER_SEARCH_PATHS = ""; 443 | USE_HEADERMAP = NO; 444 | }; 445 | name = Debug; 446 | }; 447 | 1DEB922408733DC00010E9CD /* Release */ = { 448 | isa = XCBuildConfiguration; 449 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 450 | buildSettings = { 451 | ALWAYS_SEARCH_USER_PATHS = NO; 452 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 453 | CLANG_CXX_LIBRARY = "compiler-default"; 454 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 455 | CLANG_WARN_BOOL_CONVERSION = YES; 456 | CLANG_WARN_COMMA = YES; 457 | CLANG_WARN_CONSTANT_CONVERSION = YES; 458 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 459 | CLANG_WARN_EMPTY_BODY = YES; 460 | CLANG_WARN_ENUM_CONVERSION = YES; 461 | CLANG_WARN_INFINITE_RECURSION = YES; 462 | CLANG_WARN_INT_CONVERSION = YES; 463 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 464 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 465 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 466 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 467 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 468 | CLANG_WARN_STRICT_PROTOTYPES = YES; 469 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 470 | CLANG_WARN_UNREACHABLE_CODE = YES; 471 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 472 | DSTROOT = /tmp/TiContextmenu.dst; 473 | ENABLE_STRICT_OBJC_MSGSEND = YES; 474 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 475 | GCC_C_LANGUAGE_STANDARD = c99; 476 | GCC_MODEL_TUNING = G5; 477 | GCC_NO_COMMON_BLOCKS = YES; 478 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 479 | GCC_PREFIX_HEADER = TiContextmenu_Prefix.pch; 480 | GCC_PREPROCESSOR_DEFINITIONS = "TI_VERSION=$(TI_VERSION)"; 481 | GCC_TREAT_WARNINGS_AS_ERRORS = NO; 482 | GCC_VERSION = ""; 483 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 484 | GCC_WARN_ABOUT_RETURN_TYPE = NO; 485 | GCC_WARN_MISSING_PARENTHESES = NO; 486 | GCC_WARN_SHADOW = NO; 487 | GCC_WARN_STRICT_SELECTOR_MATCH = NO; 488 | GCC_WARN_UNDECLARED_SELECTOR = YES; 489 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 490 | GCC_WARN_UNUSED_FUNCTION = YES; 491 | GCC_WARN_UNUSED_PARAMETER = NO; 492 | GCC_WARN_UNUSED_VALUE = NO; 493 | GCC_WARN_UNUSED_VARIABLE = NO; 494 | INSTALL_PATH = /usr/local/lib; 495 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 496 | OTHER_CFLAGS = "-DTI_POST_1_2"; 497 | OTHER_LDFLAGS = "-ObjC"; 498 | PRODUCT_NAME = ti.contextmenu; 499 | RUN_CLANG_STATIC_ANALYZER = NO; 500 | SDKROOT = iphoneos; 501 | USER_HEADER_SEARCH_PATHS = ""; 502 | USE_HEADERMAP = NO; 503 | }; 504 | name = Release; 505 | }; 506 | 24416B8211C4CA220047AFDD /* Debug */ = { 507 | isa = XCBuildConfiguration; 508 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 509 | buildSettings = { 510 | CLANG_ENABLE_OBJC_WEAK = YES; 511 | COPY_PHASE_STRIP = NO; 512 | GCC_DYNAMIC_NO_PIC = NO; 513 | GCC_OPTIMIZATION_LEVEL = 0; 514 | PRODUCT_NAME = "Build & test"; 515 | }; 516 | name = Debug; 517 | }; 518 | 24416B8311C4CA220047AFDD /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 521 | buildSettings = { 522 | CLANG_ENABLE_OBJC_WEAK = YES; 523 | COPY_PHASE_STRIP = YES; 524 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 525 | PRODUCT_NAME = "Build & test"; 526 | ZERO_LINK = NO; 527 | }; 528 | name = Release; 529 | }; 530 | /* End XCBuildConfiguration section */ 531 | 532 | /* Begin XCConfigurationList section */ 533 | 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "titanium-context-menu" */ = { 534 | isa = XCConfigurationList; 535 | buildConfigurations = ( 536 | 1DEB921F08733DC00010E9CD /* Debug */, 537 | 1DEB922008733DC00010E9CD /* Release */, 538 | ); 539 | defaultConfigurationIsVisible = 0; 540 | defaultConfigurationName = Release; 541 | }; 542 | 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "titanium-context-menu" */ = { 543 | isa = XCConfigurationList; 544 | buildConfigurations = ( 545 | 1DEB922308733DC00010E9CD /* Debug */, 546 | 1DEB922408733DC00010E9CD /* Release */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | 24416B8A11C4CA520047AFDD /* Build configuration list for PBXAggregateTarget "Build & Test" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | 24416B8211C4CA220047AFDD /* Debug */, 555 | 24416B8311C4CA220047AFDD /* Release */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | /* End XCConfigurationList section */ 561 | }; 562 | rootObject = 0867D690FE84028FC02AAC07 /* Project object */; 563 | } 564 | -------------------------------------------------------------------------------- /titanium.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // CHANGE THESE VALUES TO REFLECT THE VERSION (AND LOCATION IF DIFFERENT) 4 | // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR 5 | // 6 | // 7 | TITANIUM_SDK_VERSION = 10.1.1.GA 8 | 9 | // 10 | // THESE SHOULD BE OK GENERALLY AS-IS 11 | // 12 | TITANIUM_SDK = /Users/$(USER)/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION) 13 | HEADER_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/include" 14 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks/**" 15 | --------------------------------------------------------------------------------