├── Classes ├── .gitignore ├── JpKrayTiELCImagePickerModuleAssets.h ├── JpKrayTiELCImagePickerModuleAssets.m ├── ELCAssetCell.h ├── JpKrayTiELCImagePickerModule.h ├── ELCAsset.h ├── ELCImagePickerController.h ├── ELCAssetTablePicker.h ├── ELCAlbumPickerController.h ├── ELCAssetCell.m ├── ELCImagePickerController.m ├── ELCAsset.m ├── JpKrayTiELCImagePickerModule.m ├── ELCAssetTablePicker.m └── ELCAlbumPickerController.m ├── LICENSE ├── assets ├── Overlay.png ├── Overlay@2x.png └── README ├── hooks ├── README ├── uninstall.py ├── install.py ├── add.py └── remove.py ├── JpKrayTiELCImagePicker_Prefix.pch ├── .gitignore ├── timodule.xml ├── manifest ├── titanium.xcconfig ├── module.xcconfig ├── documentation └── index.md ├── example └── app.js ├── README └── tielcimagepicker.xcodeproj └── project.pbxproj /Classes/.gitignore: -------------------------------------------------------------------------------- 1 | JpKrayTiELCImagePicker.h 2 | JpKrayTiELCImagePicker.m 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | TODO: place your license here and we'll include it in the module distribution 2 | -------------------------------------------------------------------------------- /assets/Overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amano/TiELCImagePicker/HEAD/assets/Overlay.png -------------------------------------------------------------------------------- /assets/Overlay@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amano/TiELCImagePicker/HEAD/assets/Overlay@2x.png -------------------------------------------------------------------------------- /hooks/README: -------------------------------------------------------------------------------- 1 | These files are not yet supported as of 1.4.0 but will be in a near future release. 2 | -------------------------------------------------------------------------------- /JpKrayTiELCImagePicker_Prefix.pch: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __OBJC__ 3 | #import 4 | #endif 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | bin 3 | build 4 | *.zip 5 | tielcimagepicker.xcodeproj/project.xcworkspace 6 | tielcimagepicker.xcodeproj/xcuserdata 7 | -------------------------------------------------------------------------------- /Classes/JpKrayTiELCImagePickerModuleAssets.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a generated file. Do not edit or your changes will be lost 3 | */ 4 | 5 | @interface JpKrayTiELCImagePickerModuleAssets : NSObject 6 | { 7 | } 8 | - (NSData*) moduleAsset; 9 | @end 10 | -------------------------------------------------------------------------------- /timodule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/README: -------------------------------------------------------------------------------- 1 | Place your assets like PNG files in this directory and they will be packaged with your module. 2 | 3 | If you create a file named jp.kray.ti.ELCImagePicker.js in this directory, it will be 4 | compiled and used as your module. This allows you to run pure Javascript 5 | modules that are pre-compiled. 6 | 7 | -------------------------------------------------------------------------------- /hooks/uninstall.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This is the module uninstall hook that will be 4 | # called when your module is uninstalled 5 | # 6 | import os, sys 7 | 8 | def main(args,argc): 9 | 10 | # TODO: write your uninstall hook here (optional) 11 | 12 | # exit 13 | sys.exit(0) 14 | 15 | 16 | if __name__ == '__main__': 17 | main(sys.argv,len(sys.argv)) 18 | 19 | -------------------------------------------------------------------------------- /Classes/JpKrayTiELCImagePickerModuleAssets.m: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a generated file. Do not edit or your changes will be lost 3 | */ 4 | #import "JpKrayTiELCImagePickerModuleAssets.h" 5 | 6 | extern NSData * dataWithHexString (NSString * hexString); 7 | 8 | @implementation JpKrayTiELCImagePickerModuleAssets 9 | 10 | - (NSData*) moduleAsset 11 | { 12 | return nil; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /hooks/install.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This is the module install hook that will be 4 | # called when your module is first installed 5 | # 6 | import os, sys 7 | 8 | def main(args,argc): 9 | 10 | # TODO: write your install hook here (optional) 11 | 12 | # exit 13 | sys.exit(0) 14 | 15 | 16 | 17 | if __name__ == '__main__': 18 | main(sys.argv,len(sys.argv)) 19 | 20 | -------------------------------------------------------------------------------- /manifest: -------------------------------------------------------------------------------- 1 | # 2 | # this is your module manifest and used by Titanium 3 | # during compilation, packaging, distribution, etc. 4 | # 5 | version: 0.1 6 | description: Titanium ELCImagePickerController 7 | author: Mitsuhiro Amano 8 | license: MIT 9 | copyright: Copyright (c) 2010 by KRAY Inc. 10 | 11 | 12 | # these should not be edited 13 | name: TiELCImagePicker 14 | moduleid: jp.kray.ti.ELCImagePicker 15 | guid: 57aae9d7-78a0-451f-83b6-d74d39160235 16 | platform: iphone 17 | minsdk: 1.6.2 18 | -------------------------------------------------------------------------------- /Classes/ELCAssetCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssetCell.h 3 | // 4 | // Created by Matt Tuzzolo on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface ELCAssetCell : UITableViewCell 12 | { 13 | NSArray *rowAssets; 14 | CGFloat height; 15 | } 16 | 17 | -(id)initWithAssets:(NSArray*)_assets reuseIdentifier:(NSString*)_identifier; 18 | -(void)setAssets:(NSArray*)_assets; 19 | 20 | @property (nonatomic,retain) NSArray *rowAssets; 21 | @property (nonatomic, assign) CGFloat height; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/JpKrayTiELCImagePickerModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Your Copyright Here 3 | * 4 | * Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. 5 | * and licensed under the Apache Public License (version 2) 6 | */ 7 | #import "TiModule.h" 8 | #import "KrollCallback.h" 9 | #import "ELCAlbumPickerController.h" 10 | 11 | @interface JpKrayTiELCImagePickerModule : TiModule { 12 | KrollCallback *pickerSuccessCallback; 13 | KrollCallback *pickerErrorCallback; 14 | KrollCallback *pickerCancelCallback; 15 | ELCAlbumPickerController *_albumController; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /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 = 2.1.3.v20120927181611 8 | 9 | 10 | // 11 | // THESE SHOULD BE OK GENERALLY AS-IS 12 | // 13 | TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION) 14 | TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include" 15 | TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore" 16 | HEADER_SEARCH_PATHS= $(TITANIUM_BASE_SDK) $(TITANIUM_BASE_SDK2) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Classes/ELCAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // Asset.h 3 | // 4 | // Created by Matt Tuzzolo on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #define kDefaultHeight 75 12 | 13 | @interface ELCAsset : UIView { 14 | ALAsset *asset; 15 | UIImageView *overlayView; 16 | BOOL selected; 17 | id parent; 18 | CGFloat height; 19 | } 20 | 21 | @property (nonatomic, retain) ALAsset *asset; 22 | @property (nonatomic, assign) id parent; 23 | @property (nonatomic, assign) CGFloat height; 24 | 25 | -(id)initWithAsset:(ALAsset*)_asset; 26 | -(id)initWithAsset:(ALAsset*)_asset withHeight:(CGFloat) inHeight; 27 | -(BOOL)selected; 28 | 29 | @end -------------------------------------------------------------------------------- /Classes/ELCImagePickerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ELCImagePickerController.h 3 | // ELCImagePickerDemo 4 | // 5 | // Created by Collin Ruffenach on 9/9/10. 6 | // Copyright 2010 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ELCImagePickerController : UINavigationController { 12 | 13 | id delegate; 14 | } 15 | 16 | @property (nonatomic, assign) id delegate; 17 | 18 | -(void)selectedAssets:(NSArray*)_assets; 19 | -(void)cancelImagePicker; 20 | 21 | @end 22 | 23 | @protocol ELCImagePickerControllerDelegate 24 | 25 | - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info; 26 | - (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker; 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /hooks/add.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This is the module project add hook that will be 4 | # called when your module is added to a project 5 | # 6 | import os, sys 7 | 8 | def dequote(s): 9 | if s[0:1] == '"': 10 | return s[1:-1] 11 | return s 12 | 13 | def main(args,argc): 14 | # You will get the following command line arguments 15 | # in the following order: 16 | # 17 | # project_dir = the full path to the project root directory 18 | # project_type = the type of project (desktop, mobile, ipad) 19 | # project_name = the name of the project 20 | # 21 | project_dir = dequote(os.path.expanduser(args[1])) 22 | project_type = dequote(args[2]) 23 | project_name = dequote(args[3]) 24 | 25 | # TODO: write your add hook here (optional) 26 | 27 | 28 | # exit 29 | sys.exit(0) 30 | 31 | 32 | 33 | if __name__ == '__main__': 34 | main(sys.argv,len(sys.argv)) 35 | 36 | -------------------------------------------------------------------------------- /hooks/remove.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This is the module project remove hook that will be 4 | # called when your module is remove from a project 5 | # 6 | import os, sys 7 | 8 | def dequote(s): 9 | if s[0:1] == '"': 10 | return s[1:-1] 11 | return s 12 | 13 | def main(args,argc): 14 | # You will get the following command line arguments 15 | # in the following order: 16 | # 17 | # project_dir = the full path to the project root directory 18 | # project_type = the type of project (desktop, mobile, ipad) 19 | # project_name = the name of the project 20 | # 21 | project_dir = dequote(os.path.expanduser(args[1])) 22 | project_type = dequote(args[2]) 23 | project_name = dequote(args[3]) 24 | 25 | # TODO: write your remove hook here (optional) 26 | 27 | # exit 28 | sys.exit(0) 29 | 30 | 31 | 32 | if __name__ == '__main__': 33 | main(sys.argv,len(sys.argv)) 34 | 35 | -------------------------------------------------------------------------------- /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 | // http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/400-Build_Configurations/build_configs.html 8 | // 9 | 10 | // 11 | // How to add a Framework (example) 12 | // 13 | // OTHER_LDFLAGS=$(inherited) -framework Foo 14 | // 15 | // Adding a framework for a specific version(s) of iPhone: 16 | // 17 | // OTHER_LDFLAGS[sdk=iphoneos4*]=$(inherited) -framework Foo 18 | // OTHER_LDFLAGS[sdk=iphonesimulator4*]=$(inherited) -framework Foo 19 | // 20 | // 21 | // How to add a compiler define: 22 | // 23 | // OTHER_CFLAGS=$(inherited) -DFOO=1 24 | // 25 | // 26 | // IMPORTANT NOTE: always use $(inherited) in your overrides 27 | // 28 | OTHER_LDFLAGS=$(inherited) -framework AssetsLibrary -all_load% 29 | -------------------------------------------------------------------------------- /documentation/index.md: -------------------------------------------------------------------------------- 1 | # tielcimagepicker Module 2 | 3 | ## Description 4 | 5 | TODO: Enter your module description here 6 | 7 | ## Accessing the tielcimagepicker Module 8 | 9 | To access this module from JavaScript, you would do the following: 10 | 11 | var tielcimagepicker = require("jp.kray.ti.ELCImagePicker"); 12 | 13 | The tielcimagepicker variable is a reference to the Module object. 14 | 15 | ## Reference 16 | 17 | TODO: If your module has an API, you should document 18 | the reference here. 19 | 20 | ### ___PROJECTNAMEASIDENTIFIER__.function 21 | 22 | TODO: This is an example of a module function. 23 | 24 | ### ___PROJECTNAMEASIDENTIFIER__.property 25 | 26 | TODO: This is an example of a module property. 27 | 28 | ## Usage 29 | 30 | TODO: Enter your usage example here 31 | 32 | ## Author 33 | 34 | TODO: Enter your author name, email and other contact 35 | details you want to share here. 36 | 37 | ## License 38 | 39 | TODO: Enter your license/legal information here. 40 | -------------------------------------------------------------------------------- /Classes/ELCAssetTablePicker.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssetTablePicker.h 3 | // 4 | // Created by Matt Tuzzolo on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface ELCAssetTablePicker : UITableViewController 12 | { 13 | ALAssetsGroup *assetGroup; 14 | 15 | NSMutableArray *elcAssets; 16 | int selectedAssets; 17 | 18 | id parent; 19 | 20 | NSOperationQueue *queue; 21 | CGFloat cellHeight; 22 | NSString *titleForSelection; 23 | } 24 | 25 | @property (nonatomic, assign) id parent; 26 | @property (nonatomic, assign) ALAssetsGroup *assetGroup; 27 | @property (nonatomic, retain) NSMutableArray *elcAssets; 28 | @property (nonatomic, retain) IBOutlet UILabel *selectedAssetsLabel; 29 | @property (nonatomic, assign) CGFloat cellHeight; 30 | @property (nonatomic, retain) NSString *titleForSelection; 31 | 32 | -(int)totalSelectedAssets; 33 | -(void)preparePhotos; 34 | 35 | -(void)doneAction:(id)sender; 36 | 37 | @end -------------------------------------------------------------------------------- /Classes/ELCAlbumPickerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlbumPickerController.h 3 | // 4 | // Created by Matt Tuzzolo on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | typedef enum ELCAlbumPickerFilter { 12 | kELCAlbumAllAssets = 0, 13 | kELCAlbumAllPhotos, 14 | kELCAlbumAllVideos 15 | } ELCAlbumPickerFilter; 16 | 17 | @interface ELCAlbumPickerController : UITableViewController { 18 | 19 | NSMutableArray *assetGroups; 20 | NSOperationQueue *queue; 21 | id parent; 22 | ELCAlbumPickerFilter assetFilter; 23 | CGFloat cellHeight; 24 | NSString *titleForSelection; 25 | ALAssetsLibrary *library_; 26 | } 27 | 28 | @property (nonatomic, assign) id parent; 29 | @property (nonatomic, retain) NSMutableArray *assetGroups; 30 | @property (nonatomic, assign) ELCAlbumPickerFilter assetFilter; 31 | @property (nonatomic, assign) CGFloat cellHeight; 32 | @property (nonatomic, retain) NSString *titleForSelection; 33 | 34 | -(void)selectedAssets:(NSArray*)_assets; 35 | 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /example/app.js: -------------------------------------------------------------------------------- 1 | // This is a test harness for your module 2 | // You should do something interesting in this harness 3 | // to test out the module and to provide instructions 4 | // to users on how to use it by example. 5 | 6 | 7 | // open a single window 8 | var window = Ti.UI.createWindow({ 9 | backgroundColor:'white' 10 | }); 11 | 12 | var view1 = Ti.UI.createView(); 13 | 14 | var button1 = Ti.UI.createButton({ 15 | title: 'ImagePicker', 16 | height: 32, 17 | width: 120, 18 | top: 30 19 | }); 20 | 21 | view1.add(button1); 22 | window.add(view1); 23 | window.open(); 24 | 25 | // TODO: write your module tests here 26 | var tielcimagepicker = require('jp.kray.ti.ELCImagePicker'); 27 | Ti.API.info("module is => " + tielcimagepicker); 28 | 29 | var imageViews = []; 30 | button1.addEventListener('click', function() { 31 | for(var i=0; i= 10) { 70 | // 71 | // UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Maximum Reached" message:@"" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Ok", nil]; 72 | // [alert show]; 73 | // [alert release]; 74 | // 75 | // [(ELCAssetTablePicker*)self.parent doneAction:nil]; 76 | // } 77 | } 78 | 79 | -(BOOL)selected { 80 | 81 | return !overlayView.hidden; 82 | } 83 | 84 | -(void)setSelected:(BOOL)_selected { 85 | 86 | [overlayView setHidden:!_selected]; 87 | } 88 | 89 | - (void)dealloc 90 | { 91 | self.asset = nil; 92 | [overlayView release]; 93 | [super dealloc]; 94 | } 95 | 96 | @end 97 | 98 | -------------------------------------------------------------------------------- /Classes/JpKrayTiELCImagePickerModule.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Your Copyright Here 3 | * 4 | * Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. 5 | * and licensed under the Apache Public License (version 2) 6 | */ 7 | #import "JpKrayTiELCImagePickerModule.h" 8 | #import "TiBase.h" 9 | #import "TiHost.h" 10 | #import "TiUtils.h" 11 | #import "TiApp.h" 12 | #import "TiBlob.h" 13 | #import "ELCAlbumPickerController.h" 14 | #import "ELCImagePickerController.h" 15 | 16 | @implementation JpKrayTiELCImagePickerModule 17 | 18 | #pragma mark Internal 19 | 20 | // this is generated for your module, please do not change it 21 | -(id)moduleGUID 22 | { 23 | return @"57aae9d7-78a0-451f-83b6-d74d39160235"; 24 | } 25 | 26 | // this is generated for your module, please do not change it 27 | -(NSString*)moduleId 28 | { 29 | return @"jp.kray.ti.ELCImagePicker"; 30 | } 31 | 32 | #pragma mark Lifecycle 33 | 34 | -(void)startup 35 | { 36 | // this method is called when the module is first loaded 37 | // you *must* call the superclass 38 | [super startup]; 39 | 40 | NSLog(@"[INFO] %@ loaded",self); 41 | } 42 | 43 | -(void)shutdown:(id)sender 44 | { 45 | // this method is called when the module is being unloaded 46 | // typically this is during shutdown. make sure you don't do too 47 | // much processing here or the app will be quit forceably 48 | 49 | // you *must* call the superclass 50 | [super shutdown:sender]; 51 | } 52 | 53 | #pragma mark Cleanup 54 | 55 | -(void)dealloc 56 | { 57 | // release any resources that have been retained by the module 58 | [super dealloc]; 59 | } 60 | 61 | #pragma mark Internal Memory Management 62 | 63 | -(void)didReceiveMemoryWarning:(NSNotification*)notification 64 | { 65 | // optionally release any resources that can be dynamically 66 | // reloaded once memory is available - such as caches 67 | [super didReceiveMemoryWarning:notification]; 68 | } 69 | 70 | #pragma mark Listener Notifications 71 | 72 | -(void)_listenerAdded:(NSString *)type count:(int)count 73 | { 74 | if (count == 1 && [type isEqualToString:@"my_event"]) 75 | { 76 | // the first (of potentially many) listener is being added 77 | // for event named 'my_event' 78 | } 79 | } 80 | 81 | -(void)_listenerRemoved:(NSString *)type count:(int)count 82 | { 83 | if (count == 0 && [type isEqualToString:@"my_event"]) 84 | { 85 | // the last listener called for event named 'my_event' has 86 | // been removed, we can optionally clean up any resources 87 | // since no body is listening at this point for that event 88 | } 89 | } 90 | 91 | - (void)loadImagePicker:(id)args { 92 | ENSURE_UI_THREAD(loadImagePicker,args); 93 | ENSURE_SINGLE_ARG_OR_NIL(args,NSDictionary); 94 | 95 | NSLog(@"Load ImagePicker\n"); 96 | 97 | if (args != nil) { 98 | // callbacks 99 | if ([args objectForKey:@"success"] != nil) { 100 | pickerSuccessCallback = [args objectForKey:@"success"]; 101 | ENSURE_TYPE_OR_NIL(pickerSuccessCallback,KrollCallback); 102 | [pickerSuccessCallback retain]; 103 | } 104 | 105 | if ([args objectForKey:@"cancel"] != nil) { 106 | pickerCancelCallback = [args objectForKey:@"cancel"]; 107 | ENSURE_TYPE_OR_NIL(pickerCancelCallback,KrollCallback); 108 | [pickerCancelCallback retain]; 109 | } 110 | } 111 | 112 | _albumController = [[ELCAlbumPickerController alloc] init]; 113 | ELCImagePickerController *elcPicker = [[ELCImagePickerController alloc] initWithRootViewController:_albumController]; 114 | [_albumController setParent:elcPicker]; 115 | _albumController.assetFilter = kELCAlbumAllAssets; 116 | _albumController.cellHeight = 75; 117 | _albumController.titleForSelection = NSLocalizedString(@"Pick Something", @"Title for picking items"); 118 | [elcPicker setDelegate:self]; 119 | 120 | TiApp *tiApp = [TiApp app]; 121 | [tiApp showModalController:elcPicker animated:YES]; 122 | 123 | [elcPicker release]; 124 | } 125 | 126 | #pragma mark ELCImagePickerControllerDelegate Methods 127 | 128 | - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info { 129 | NSLog(@"success didFinish:\n"); 130 | 131 | if (pickerSuccessCallback != nil) { 132 | id listener = [[pickerSuccessCallback retain] autorelease]; 133 | 134 | NSMutableArray *images = [NSMutableArray array]; 135 | for (NSDictionary *dict in info) { 136 | UIImage *image = [dict objectForKey:UIImagePickerControllerOriginalImage]; 137 | TiBlob *blob = [[[TiBlob alloc] initWithImage:image] autorelease]; 138 | [images addObject:blob]; 139 | } 140 | 141 | NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; 142 | [dictionary setObject:images forKey:@"images"]; 143 | [self _fireEventToListener:@"success" withObject:dictionary listener:listener thisObject:nil]; 144 | } 145 | 146 | [picker dismissModalViewControllerAnimated:YES]; 147 | } 148 | 149 | - (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker { 150 | NSLog(@"cancel didCancel:\n"); 151 | 152 | if (pickerSuccessCallback != nil) { 153 | id listener = [[pickerSuccessCallback retain] autorelease]; 154 | NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; 155 | [self _fireEventToListener:@"success" withObject:dictionary listener:listener thisObject:nil]; 156 | } 157 | 158 | [picker dismissModalViewControllerAnimated:YES]; 159 | } 160 | 161 | @end 162 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Appcelerator Titanium iPhone Module Project 2 | =========================================== 3 | 4 | This is a skeleton Titanium Mobile iPhone module project. Modules can be 5 | used to extend the functionality of Titanium by providing additional native 6 | code that is compiled into your application at build time and can expose certain 7 | APIs into JavaScript. 8 | 9 | MODULE NAMING 10 | -------------- 11 | 12 | Choose a unique module id for your module. This ID usually follows a namespace 13 | convention using DNS notation. For example, com.appcelerator.module.test. This 14 | ID can only be used once by all public modules in Titanium. 15 | 16 | 17 | COMPONENTS 18 | ----------- 19 | 20 | Components that are exposed by your module must follow a special naming convention. 21 | A component (widget, proxy, etc) must be named with the pattern: 22 | 23 | TiProxy 24 | 25 | For example, if you component was called Foo, your proxy would be named: 26 | 27 | TiMyfirstFooProxy 28 | 29 | For view proxies or widgets, you must create both a view proxy and a view implementation. 30 | If you widget was named proxy, you would create the following files: 31 | 32 | TiMyfirstFooProxy.h 33 | TiMyfirstFooProxy.m 34 | TiMyfirstFoo.h 35 | TiMyfirstFoo.m 36 | 37 | The view implementation is named the same except it does contain the suffix `Proxy`. 38 | 39 | View implementations extend the Titanium base class `TiUIView`. View Proxies extend the 40 | Titanium base class `TiUIViewProxy` or `TiUIWidgetProxy`. 41 | 42 | For proxies that are simply native objects that can be returned to JavaScript, you can 43 | simply extend `TiProxy` and no view implementation is required. 44 | 45 | 46 | GET STARTED 47 | ------------ 48 | 49 | 1. Edit manifest with the appropriate details about your module. 50 | 2. Edit LICENSE to add your license details. 51 | 3. Place any assets (such as PNG files) that are required in the assets folder. 52 | 4. Edit the titanium.xcconfig and make sure you're building for the right Titanium version. 53 | 5. Code and build. 54 | 55 | BUILD TIME COMPILER CONFIG 56 | -------------------------- 57 | 58 | You can edit the file `module.xcconfig` to include any build time settings that should be 59 | set during application compilation that your module requires. This file will automatically get `#include` in the main application project. 60 | 61 | For more information about this file, please see the Apple documentation at: 62 | 63 | 64 | 65 | 66 | DOCUMENTATION FOR YOUR MODULE 67 | ----------------------------- 68 | 69 | You should provide at least minimal documentation for your module in `documentation` folder using the Markdown syntax. 70 | 71 | For more information on the Markdown syntax, refer to this documentation at: 72 | 73 | 74 | 75 | 76 | TEST HARNESS EXAMPLE FOR YOUR MODULE 77 | ------------------------------------ 78 | 79 | The `example` directory contains a skeleton application test harness that can be 80 | used for testing and providing an example of usage to the users of your module. 81 | 82 | 83 | INSTALL YOUR MODULE 84 | -------------------- 85 | 86 | 1. Run `build.py` which creates your distribution 87 | 2. cd to `/Library/Application Support/Titanium` 88 | 3. copy this zip file into the folder of your Titanium SDK 89 | 90 | REGISTER YOUR MODULE 91 | --------------------- 92 | 93 | Register your module with your application by editing `tiapp.xml` and adding your module. 94 | Example: 95 | 96 | 97 | jp.kray.ti.ELCImagePicker 98 | 99 | 100 | When you run your project, the compiler will know automatically compile in your module 101 | dependencies and copy appropriate image assets into the application. 102 | 103 | USING YOUR MODULE IN CODE 104 | ------------------------- 105 | 106 | To use your module in code, you will need to require it. 107 | 108 | For example, 109 | 110 | var my_module = require('jp.kray.ti.ELCImagePicker'); 111 | my_module.foo(); 112 | 113 | WRITING PURE JS NATIVE MODULES 114 | ------------------------------ 115 | 116 | You can write a pure JavaScript "natively compiled" module. This is nice if you 117 | want to distribute a JS module pre-compiled. 118 | 119 | To create a module, create a file named jp.kray.ti.ELCImagePicker.js under the assets folder. 120 | This file must be in the Common JS format. For example: 121 | 122 | exports.echo = function(s) 123 | { 124 | return s; 125 | }; 126 | 127 | Any functions and properties that are exported will be made available as part of your 128 | module. All other code inside your JS will be private to your module. 129 | 130 | For pure JS module, you don't need to modify any of the Objective-C module code. You 131 | can leave it as-is and build. 132 | 133 | TESTING YOUR MODULE 134 | ------------------- 135 | 136 | Run the `titanium.py` script to test your module or test from within XCode. 137 | To test with the script, execute: 138 | 139 | titanium run --dir=YOURMODULEDIR 140 | 141 | 142 | This will execute the app.js in the example folder as a Titanium application. 143 | 144 | 145 | DISTRIBUTING YOUR MODULE 146 | ------------------------- 147 | 148 | Currently, you will need to manually distribution your module distribution zip file directly. However, in the near future, we will make module distribution and sharing built-in to Titanium Developer and in the Titanium Marketplace! 149 | 150 | 151 | Cheers! 152 | -------------------------------------------------------------------------------- /Classes/ELCAssetTablePicker.m: -------------------------------------------------------------------------------- 1 | // 2 | // AssetTablePicker.m 3 | // 4 | // Created by Matt Tuzzolo on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import "ELCAssetTablePicker.h" 9 | #import "ELCAssetCell.h" 10 | #import "ELCAsset.h" 11 | #import "ELCAlbumPickerController.h" 12 | 13 | @interface ELCAssetTablePicker () 14 | - (NSUInteger) maxNumberOfCellsPerRow; 15 | @end 16 | 17 | @implementation ELCAssetTablePicker 18 | 19 | @synthesize parent; 20 | @synthesize selectedAssetsLabel; 21 | @synthesize assetGroup, elcAssets; 22 | @synthesize cellHeight; 23 | @synthesize titleForSelection; 24 | 25 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 26 | { 27 | // Return YES for supported orientations 28 | return YES; 29 | } 30 | 31 | -(void)viewDidLoad { 32 | 33 | if (self.cellHeight == 0) 34 | { 35 | self.cellHeight = kDefaultHeight; 36 | } 37 | 38 | [self.tableView setSeparatorColor:[UIColor clearColor]]; 39 | [self.tableView setAllowsSelection:NO]; 40 | 41 | NSMutableArray *tempArray = [[NSMutableArray alloc] init]; 42 | self.elcAssets = tempArray; 43 | [tempArray release]; 44 | 45 | UIBarButtonItem *doneButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneAction:)] autorelease]; 46 | [self.navigationItem setRightBarButtonItem:doneButtonItem]; 47 | [self.navigationItem setTitle:NSLocalizedString(@"Loading...", @"Title bar text for loading albums")]; 48 | 49 | [self performSelectorInBackground:@selector(preparePhotos) withObject:nil]; 50 | 51 | // Show partial while full list loads 52 | [self.tableView performSelector:@selector(reloadData) withObject:nil afterDelay:.5]; 53 | } 54 | 55 | -(void)preparePhotos { 56 | 57 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 58 | 59 | 60 | //NSLog(@"enumerating photos"); 61 | [self.assetGroup enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) 62 | { 63 | if(result == nil) 64 | { 65 | return; 66 | } 67 | 68 | ELCAsset *elcAsset = [[[ELCAsset alloc] initWithAsset:result withHeight:self.cellHeight] autorelease]; 69 | [elcAsset setParent:self]; 70 | [self.elcAssets addObject:elcAsset]; 71 | }]; 72 | //NSLog(@"done enumerating photos"); 73 | 74 | [self.tableView reloadData]; 75 | if (self.titleForSelection == nil) 76 | { 77 | self.titleForSelection = NSLocalizedString(@"Pick Photos", @"Title for selecting photos"); 78 | } 79 | 80 | [self.navigationItem setTitle:self.titleForSelection]; 81 | 82 | [pool release]; 83 | 84 | } 85 | 86 | - (void) doneAction:(id)sender { 87 | 88 | NSMutableArray *selectedAssetsImages = [[[NSMutableArray alloc] init] autorelease]; 89 | 90 | for(ELCAsset *elcAsset in self.elcAssets) 91 | { 92 | if([elcAsset selected]) { 93 | 94 | [selectedAssetsImages addObject:[elcAsset asset]]; 95 | } 96 | } 97 | 98 | [(ELCAlbumPickerController*)self.parent selectedAssets:selectedAssetsImages]; 99 | } 100 | 101 | #pragma mark UITableViewDataSource Delegate Methods 102 | 103 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 104 | // Return the number of sections. 105 | return 1; 106 | } 107 | 108 | 109 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 110 | return ceil([self.assetGroup numberOfAssets] / (float) [self maxNumberOfCellsPerRow]); 111 | } 112 | 113 | - (NSUInteger) maxNumberOfCellsPerRow 114 | { 115 | return floor(self.tableView.frame.size.width / self.cellHeight); 116 | } 117 | 118 | -(NSArray*)assetsForIndexPath:(NSIndexPath*)_indexPath { 119 | 120 | NSUInteger maxPerRow = [self maxNumberOfCellsPerRow]; 121 | 122 | int index = (_indexPath.row*maxPerRow); 123 | int maxIndex = (_indexPath.row*maxPerRow+(maxPerRow - 1)); 124 | int minIndex = maxIndex - maxPerRow + 1; 125 | 126 | // NSLog(@"Getting assets for %d to %d with array count %d", index, maxIndex, [assets count]); 127 | 128 | for (int temp = maxIndex; temp >= minIndex; temp--) 129 | { 130 | if (temp < [self.elcAssets count]) 131 | { 132 | NSMutableArray *array = [[NSMutableArray alloc] init]; 133 | for (int i = index; i <= temp; i++) 134 | { 135 | [array addObject:[self.elcAssets objectAtIndex:i]]; 136 | } 137 | 138 | return [array autorelease]; 139 | } 140 | } 141 | 142 | return nil; 143 | } 144 | 145 | // Customize the appearance of table view cells. 146 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 147 | 148 | static NSString *CellIdentifier = @"Cell"; 149 | 150 | ELCAssetCell *cell = (ELCAssetCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 151 | 152 | if (cell == nil) 153 | { 154 | cell = [[[ELCAssetCell alloc] initWithAssets:[self assetsForIndexPath:indexPath] reuseIdentifier:CellIdentifier] autorelease]; 155 | } 156 | else 157 | { 158 | [cell setAssets:[self assetsForIndexPath:indexPath]]; 159 | } 160 | 161 | cell.height = self.cellHeight; 162 | 163 | return cell; 164 | } 165 | 166 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 167 | 168 | return self.cellHeight + 4; 169 | } 170 | 171 | - (int)totalSelectedAssets { 172 | 173 | int count = 0; 174 | 175 | for(ELCAsset *asset in self.elcAssets) 176 | { 177 | if([asset selected]) 178 | { 179 | count++; 180 | } 181 | } 182 | 183 | return count; 184 | } 185 | 186 | - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 187 | { 188 | [self.tableView reloadData]; 189 | } 190 | 191 | 192 | - (void)dealloc 193 | { 194 | self.titleForSelection = nil; 195 | [elcAssets release]; 196 | [selectedAssetsLabel release]; 197 | [super dealloc]; 198 | } 199 | 200 | @end 201 | -------------------------------------------------------------------------------- /Classes/ELCAlbumPickerController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlbumPickerController.m 3 | // 4 | // Created by Matt Tuzzolo on 2/15/11. 5 | // Copyright 2011 ELC Technologies. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "ELCAlbumPickerController.h" 10 | #import "ELCImagePickerController.h" 11 | #import "ELCAssetTablePicker.h" 12 | #import "ELCAsset.h" 13 | 14 | @interface ELCAlbumPickerController () 15 | - (ALAssetsFilter *) filter; 16 | @end 17 | 18 | 19 | @implementation ELCAlbumPickerController 20 | 21 | @synthesize parent, assetGroups; 22 | @synthesize assetFilter; 23 | @synthesize cellHeight; 24 | @synthesize titleForSelection; 25 | 26 | #pragma mark - 27 | #pragma mark View lifecycle 28 | 29 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 30 | { 31 | // Return YES for supported orientations 32 | return YES; 33 | } 34 | 35 | - (void)viewDidLoad { 36 | [super viewDidLoad]; 37 | 38 | [self.navigationItem setTitle:NSLocalizedString(@"Loading...", @"Title bar text for loading albums")]; 39 | 40 | UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self.parent action:@selector(cancelImagePicker)]; 41 | [self.navigationItem setRightBarButtonItem:cancelButton]; 42 | [cancelButton release]; 43 | 44 | NSMutableArray *tempArray = [[NSMutableArray alloc] init]; 45 | self.assetGroups = tempArray; 46 | [tempArray release]; 47 | 48 | // Load Albums into assetGroups 49 | dispatch_async(dispatch_get_main_queue(), ^ 50 | { 51 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 52 | 53 | // Group enumerator Block 54 | ALAssetsLibraryGroupsEnumerationResultsBlock assetGroupEnumerator = ^(ALAssetsGroup *group, BOOL *stop) 55 | { 56 | if (group == nil) 57 | { 58 | return; 59 | } 60 | 61 | [group setAssetsFilter:[self filter]]; 62 | if ([group numberOfAssets]) 63 | { 64 | [self.assetGroups addObject:group]; 65 | } 66 | 67 | // Reload albums 68 | [self performSelectorOnMainThread:@selector(reloadTableView) withObject:nil waitUntilDone:YES]; 69 | }; 70 | 71 | // Group Enumerator Failure Block 72 | ALAssetsLibraryAccessFailureBlock assetGroupEnumberatorFailure = ^(NSError *error) { 73 | 74 | UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Album Error", @"Title for error when enumerating albums") message:[error description] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; 75 | [alert show]; 76 | [alert release]; 77 | 78 | //NSLog(@"A problem occured %@", [error description]); 79 | }; 80 | 81 | // Enumerate Albums 82 | library_ = [[ALAssetsLibrary alloc] init]; 83 | [library_ enumerateGroupsWithTypes:ALAssetsGroupAll 84 | usingBlock:assetGroupEnumerator 85 | failureBlock:assetGroupEnumberatorFailure]; 86 | 87 | 88 | [pool release]; 89 | }); 90 | } 91 | 92 | -(void)reloadTableView { 93 | 94 | [self.tableView reloadData]; 95 | [self.navigationItem setTitle:NSLocalizedString(@"Select an Album", @"Text for title bar when selecting an album")]; 96 | } 97 | 98 | -(void)selectedAssets:(NSArray*)_assets { 99 | 100 | [(ELCImagePickerController*)parent selectedAssets:_assets]; 101 | } 102 | 103 | #pragma mark - 104 | #pragma mark Table view data source 105 | 106 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 107 | // Return the number of sections. 108 | return 1; 109 | } 110 | 111 | 112 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 113 | // Return the number of rows in the section. 114 | return [assetGroups count]; 115 | } 116 | 117 | 118 | // Customize the appearance of table view cells. 119 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 120 | 121 | static NSString *CellIdentifier = @"Cell"; 122 | 123 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 124 | if (cell == nil) { 125 | cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 126 | } 127 | 128 | // Get count 129 | ALAssetsGroup *g = (ALAssetsGroup*)[assetGroups objectAtIndex:indexPath.row]; 130 | [g setAssetsFilter:[self filter]]; 131 | NSInteger gCount = [g numberOfAssets]; 132 | 133 | cell.textLabel.text = [NSString stringWithFormat:@"%@ (%d)",[g valueForProperty:ALAssetsGroupPropertyName], gCount]; 134 | [cell.imageView setImage:[UIImage imageWithCGImage:[(ALAssetsGroup*)[assetGroups objectAtIndex:indexPath.row] posterImage]]]; 135 | [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; 136 | 137 | return cell; 138 | } 139 | 140 | #pragma mark - 141 | #pragma mark Table view delegate 142 | 143 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 144 | 145 | ELCAssetTablePicker *picker = [[ELCAssetTablePicker alloc] init]; 146 | picker.parent = self; 147 | picker.titleForSelection = self.titleForSelection; 148 | if (self.cellHeight == 0) 149 | { 150 | self.cellHeight = kDefaultHeight; 151 | } 152 | picker.cellHeight = self.cellHeight; 153 | 154 | // Move me 155 | picker.assetGroup = [assetGroups objectAtIndex:indexPath.row]; 156 | [picker.assetGroup setAssetsFilter:[self filter]]; 157 | 158 | [self.navigationController pushViewController:picker animated:YES]; 159 | [picker release]; 160 | } 161 | 162 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 163 | 164 | return 57; 165 | } 166 | 167 | #pragma mark - 168 | #pragma mark Memory management 169 | 170 | - (void)didReceiveMemoryWarning { 171 | // Releases the view if it doesn't have a superview. 172 | [super didReceiveMemoryWarning]; 173 | 174 | // Relinquish ownership any cached data, images, etc that aren't in use. 175 | } 176 | 177 | - (void)viewDidUnload { 178 | // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. 179 | // For example: self.myOutlet = nil; 180 | } 181 | 182 | 183 | - (void)dealloc 184 | { 185 | self.titleForSelection = nil; 186 | [assetGroups release]; 187 | [super dealloc]; 188 | } 189 | 190 | - (ALAssetsFilter *) filter 191 | { 192 | switch (self.assetFilter) 193 | { 194 | case kELCAlbumAllAssets: 195 | default: 196 | { 197 | return [ALAssetsFilter allAssets]; 198 | } 199 | 200 | case kELCAlbumAllPhotos: 201 | { 202 | return [ALAssetsFilter allPhotos]; 203 | } 204 | 205 | case kELCAlbumAllVideos: 206 | { 207 | return [ALAssetsFilter allVideos]; 208 | } 209 | } 210 | } 211 | 212 | @end 213 | 214 | -------------------------------------------------------------------------------- /tielcimagepicker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 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 /* JpKrayTiELCImagePickerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DD6CF71134B3F500162E58 /* JpKrayTiELCImagePickerModule.h */; }; 26 | 24DD6CFA1134B3F500162E58 /* JpKrayTiELCImagePickerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* JpKrayTiELCImagePickerModule.m */; }; 27 | 24DE9E1111C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DE9E0F11C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.h */; }; 28 | 24DE9E1211C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DE9E1011C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.m */; }; 29 | AA747D9F0F9514B9006C5449 /* JpKrayTiELCImagePicker_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* JpKrayTiELCImagePicker_Prefix.pch */; }; 30 | AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; }; 31 | E790A7E213A4ACC20031B787 /* ELCAlbumPickerController.h in Headers */ = {isa = PBXBuildFile; fileRef = E790A7D813A4ACC20031B787 /* ELCAlbumPickerController.h */; }; 32 | E790A7E313A4ACC20031B787 /* ELCAlbumPickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E790A7D913A4ACC20031B787 /* ELCAlbumPickerController.m */; }; 33 | E790A7E413A4ACC20031B787 /* ELCAsset.h in Headers */ = {isa = PBXBuildFile; fileRef = E790A7DA13A4ACC20031B787 /* ELCAsset.h */; }; 34 | E790A7E513A4ACC20031B787 /* ELCAsset.m in Sources */ = {isa = PBXBuildFile; fileRef = E790A7DB13A4ACC20031B787 /* ELCAsset.m */; }; 35 | E790A7E613A4ACC20031B787 /* ELCAssetCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E790A7DC13A4ACC20031B787 /* ELCAssetCell.h */; }; 36 | E790A7E713A4ACC20031B787 /* ELCAssetCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E790A7DD13A4ACC20031B787 /* ELCAssetCell.m */; }; 37 | E790A7E813A4ACC20031B787 /* ELCAssetTablePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = E790A7DE13A4ACC20031B787 /* ELCAssetTablePicker.h */; }; 38 | E790A7E913A4ACC20031B787 /* ELCAssetTablePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = E790A7DF13A4ACC20031B787 /* ELCAssetTablePicker.m */; }; 39 | E790A7EA13A4ACC20031B787 /* ELCImagePickerController.h in Headers */ = {isa = PBXBuildFile; fileRef = E790A7E013A4ACC20031B787 /* ELCImagePickerController.h */; }; 40 | E790A7EB13A4ACC20031B787 /* ELCImagePickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E790A7E113A4ACC20031B787 /* ELCImagePickerController.m */; }; 41 | E7B857F713A4A4FC00959E7E /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7B857F613A4A4FC00959E7E /* AssetsLibrary.framework */; }; 42 | /* End PBXBuildFile section */ 43 | 44 | /* Begin PBXContainerItemProxy section */ 45 | 24416B8411C4CA280047AFDD /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; 48 | proxyType = 1; 49 | remoteGlobalIDString = D2AAC07D0554694100DB518D; 50 | remoteInfo = tielcimagepicker; 51 | }; 52 | /* End PBXContainerItemProxy section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | 24DD6CF71134B3F500162E58 /* JpKrayTiELCImagePickerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JpKrayTiELCImagePickerModule.h; path = Classes/JpKrayTiELCImagePickerModule.h; sourceTree = ""; }; 56 | 24DD6CF81134B3F500162E58 /* JpKrayTiELCImagePickerModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JpKrayTiELCImagePickerModule.m; path = Classes/JpKrayTiELCImagePickerModule.m; sourceTree = ""; }; 57 | 24DD6D1B1134B66800162E58 /* titanium.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = titanium.xcconfig; sourceTree = ""; }; 58 | 24DE9E0F11C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JpKrayTiELCImagePickerModuleAssets.h; path = Classes/JpKrayTiELCImagePickerModuleAssets.h; sourceTree = ""; }; 59 | 24DE9E1011C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JpKrayTiELCImagePickerModuleAssets.m; path = Classes/JpKrayTiELCImagePickerModuleAssets.m; sourceTree = ""; }; 60 | AA747D9E0F9514B9006C5449 /* JpKrayTiELCImagePicker_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JpKrayTiELCImagePicker_Prefix.pch; sourceTree = SOURCE_ROOT; }; 61 | AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 62 | D2AAC07E0554694100DB518D /* libJpKrayTiELCImagePicker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJpKrayTiELCImagePicker.a; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | E790A7D813A4ACC20031B787 /* ELCAlbumPickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ELCAlbumPickerController.h; path = Classes/ELCAlbumPickerController.h; sourceTree = ""; }; 64 | E790A7D913A4ACC20031B787 /* ELCAlbumPickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ELCAlbumPickerController.m; path = Classes/ELCAlbumPickerController.m; sourceTree = ""; }; 65 | E790A7DA13A4ACC20031B787 /* ELCAsset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ELCAsset.h; path = Classes/ELCAsset.h; sourceTree = ""; }; 66 | E790A7DB13A4ACC20031B787 /* ELCAsset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ELCAsset.m; path = Classes/ELCAsset.m; sourceTree = ""; }; 67 | E790A7DC13A4ACC20031B787 /* ELCAssetCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ELCAssetCell.h; path = Classes/ELCAssetCell.h; sourceTree = ""; }; 68 | E790A7DD13A4ACC20031B787 /* ELCAssetCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ELCAssetCell.m; path = Classes/ELCAssetCell.m; sourceTree = ""; }; 69 | E790A7DE13A4ACC20031B787 /* ELCAssetTablePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ELCAssetTablePicker.h; path = Classes/ELCAssetTablePicker.h; sourceTree = ""; }; 70 | E790A7DF13A4ACC20031B787 /* ELCAssetTablePicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ELCAssetTablePicker.m; path = Classes/ELCAssetTablePicker.m; sourceTree = ""; }; 71 | E790A7E013A4ACC20031B787 /* ELCImagePickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ELCImagePickerController.h; path = Classes/ELCImagePickerController.h; sourceTree = ""; }; 72 | E790A7E113A4ACC20031B787 /* ELCImagePickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ELCImagePickerController.m; path = Classes/ELCImagePickerController.m; sourceTree = ""; }; 73 | E7B857F613A4A4FC00959E7E /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | D2AAC07C0554694100DB518D /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | E7B857F713A4A4FC00959E7E /* AssetsLibrary.framework in Frameworks */, 82 | AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | /* End PBXFrameworksBuildPhase section */ 87 | 88 | /* Begin PBXGroup section */ 89 | 034768DFFF38A50411DB9C8B /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | D2AAC07E0554694100DB518D /* libJpKrayTiELCImagePicker.a */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | 0867D691FE84028FC02AAC07 /* tielcimagepicker */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 08FB77AEFE84172EC02AAC07 /* Classes */, 101 | 32C88DFF0371C24200C91783 /* Other Sources */, 102 | 0867D69AFE84028FC02AAC07 /* Frameworks */, 103 | 034768DFFF38A50411DB9C8B /* Products */, 104 | ); 105 | name = tielcimagepicker; 106 | sourceTree = ""; 107 | }; 108 | 0867D69AFE84028FC02AAC07 /* Frameworks */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | E7B857F613A4A4FC00959E7E /* AssetsLibrary.framework */, 112 | AACBBE490F95108600F1A2B1 /* Foundation.framework */, 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | 08FB77AEFE84172EC02AAC07 /* Classes */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | E7B857F813A4A52E00959E7E /* ELCImagePicker */, 121 | 24DE9E0F11C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.h */, 122 | 24DE9E1011C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.m */, 123 | 24DD6CF71134B3F500162E58 /* JpKrayTiELCImagePickerModule.h */, 124 | 24DD6CF81134B3F500162E58 /* JpKrayTiELCImagePickerModule.m */, 125 | ); 126 | name = Classes; 127 | sourceTree = ""; 128 | }; 129 | 32C88DFF0371C24200C91783 /* Other Sources */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | AA747D9E0F9514B9006C5449 /* JpKrayTiELCImagePicker_Prefix.pch */, 133 | 24DD6D1B1134B66800162E58 /* titanium.xcconfig */, 134 | ); 135 | name = "Other Sources"; 136 | sourceTree = ""; 137 | }; 138 | E7B857F813A4A52E00959E7E /* ELCImagePicker */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | E790A7D813A4ACC20031B787 /* ELCAlbumPickerController.h */, 142 | E790A7D913A4ACC20031B787 /* ELCAlbumPickerController.m */, 143 | E790A7DA13A4ACC20031B787 /* ELCAsset.h */, 144 | E790A7DB13A4ACC20031B787 /* ELCAsset.m */, 145 | E790A7DC13A4ACC20031B787 /* ELCAssetCell.h */, 146 | E790A7DD13A4ACC20031B787 /* ELCAssetCell.m */, 147 | E790A7DE13A4ACC20031B787 /* ELCAssetTablePicker.h */, 148 | E790A7DF13A4ACC20031B787 /* ELCAssetTablePicker.m */, 149 | E790A7E013A4ACC20031B787 /* ELCImagePickerController.h */, 150 | E790A7E113A4ACC20031B787 /* ELCImagePickerController.m */, 151 | ); 152 | name = ELCImagePicker; 153 | sourceTree = ""; 154 | }; 155 | /* End PBXGroup section */ 156 | 157 | /* Begin PBXHeadersBuildPhase section */ 158 | D2AAC07A0554694100DB518D /* Headers */ = { 159 | isa = PBXHeadersBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | AA747D9F0F9514B9006C5449 /* JpKrayTiELCImagePicker_Prefix.pch in Headers */, 163 | 24DD6CF91134B3F500162E58 /* JpKrayTiELCImagePickerModule.h in Headers */, 164 | 24DE9E1111C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.h in Headers */, 165 | E790A7E213A4ACC20031B787 /* ELCAlbumPickerController.h in Headers */, 166 | E790A7E413A4ACC20031B787 /* ELCAsset.h in Headers */, 167 | E790A7E613A4ACC20031B787 /* ELCAssetCell.h in Headers */, 168 | E790A7E813A4ACC20031B787 /* ELCAssetTablePicker.h in Headers */, 169 | E790A7EA13A4ACC20031B787 /* ELCImagePickerController.h in Headers */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXHeadersBuildPhase section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | D2AAC07D0554694100DB518D /* tielcimagepicker */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "tielcimagepicker" */; 179 | buildPhases = ( 180 | D2AAC07A0554694100DB518D /* Headers */, 181 | D2AAC07B0554694100DB518D /* Sources */, 182 | D2AAC07C0554694100DB518D /* Frameworks */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = tielcimagepicker; 189 | productName = tielcimagepicker; 190 | productReference = D2AAC07E0554694100DB518D /* libJpKrayTiELCImagePicker.a */; 191 | productType = "com.apple.product-type.library.static"; 192 | }; 193 | /* End PBXNativeTarget section */ 194 | 195 | /* Begin PBXProject section */ 196 | 0867D690FE84028FC02AAC07 /* Project object */ = { 197 | isa = PBXProject; 198 | buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "tielcimagepicker" */; 199 | compatibilityVersion = "Xcode 3.1"; 200 | developmentRegion = English; 201 | hasScannedForEncodings = 1; 202 | knownRegions = ( 203 | English, 204 | Japanese, 205 | French, 206 | German, 207 | ); 208 | mainGroup = 0867D691FE84028FC02AAC07 /* tielcimagepicker */; 209 | productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; 210 | projectDirPath = ""; 211 | projectRoot = ""; 212 | targets = ( 213 | D2AAC07D0554694100DB518D /* tielcimagepicker */, 214 | 24416B8111C4CA220047AFDD /* Build & Test */, 215 | ); 216 | }; 217 | /* End PBXProject section */ 218 | 219 | /* Begin PBXShellScriptBuildPhase section */ 220 | 24416B8011C4CA220047AFDD /* ShellScript */ = { 221 | isa = PBXShellScriptBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | inputPaths = ( 226 | ); 227 | outputPaths = ( 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | shellPath = /bin/sh; 231 | shellScript = "# shell script goes here\n\npython \"${TITANIUM_SDK}/titanium.py\" run --dir=\"${PROJECT_DIR}\"\nexit $?\n"; 232 | }; 233 | /* End PBXShellScriptBuildPhase section */ 234 | 235 | /* Begin PBXSourcesBuildPhase section */ 236 | D2AAC07B0554694100DB518D /* Sources */ = { 237 | isa = PBXSourcesBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | 24DD6CFA1134B3F500162E58 /* JpKrayTiELCImagePickerModule.m in Sources */, 241 | 24DE9E1211C5FE74003F90F6 /* JpKrayTiELCImagePickerModuleAssets.m in Sources */, 242 | E790A7E313A4ACC20031B787 /* ELCAlbumPickerController.m in Sources */, 243 | E790A7E513A4ACC20031B787 /* ELCAsset.m in Sources */, 244 | E790A7E713A4ACC20031B787 /* ELCAssetCell.m in Sources */, 245 | E790A7E913A4ACC20031B787 /* ELCAssetTablePicker.m in Sources */, 246 | E790A7EB13A4ACC20031B787 /* ELCImagePickerController.m in Sources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXSourcesBuildPhase section */ 251 | 252 | /* Begin PBXTargetDependency section */ 253 | 24416B8511C4CA280047AFDD /* PBXTargetDependency */ = { 254 | isa = PBXTargetDependency; 255 | target = D2AAC07D0554694100DB518D /* tielcimagepicker */; 256 | targetProxy = 24416B8411C4CA280047AFDD /* PBXContainerItemProxy */; 257 | }; 258 | /* End PBXTargetDependency section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | 1DEB921F08733DC00010E9CD /* Debug */ = { 262 | isa = XCBuildConfiguration; 263 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 264 | buildSettings = { 265 | ALWAYS_SEARCH_USER_PATHS = NO; 266 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 267 | COPY_PHASE_STRIP = NO; 268 | DSTROOT = /tmp/JpKrayTiELCImagePicker.dst; 269 | GCC_DYNAMIC_NO_PIC = NO; 270 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 271 | GCC_MODEL_TUNING = G5; 272 | GCC_OPTIMIZATION_LEVEL = 0; 273 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 274 | GCC_PREFIX_HEADER = JpKrayTiELCImagePicker_Prefix.pch; 275 | INSTALL_PATH = /usr/local/lib; 276 | PRODUCT_NAME = JpKrayTiELCImagePicker; 277 | }; 278 | name = Debug; 279 | }; 280 | 1DEB922008733DC00010E9CD /* Release */ = { 281 | isa = XCBuildConfiguration; 282 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 286 | DSTROOT = /tmp/JpKrayTiELCImagePicker.dst; 287 | GCC_MODEL_TUNING = G5; 288 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 289 | GCC_PREFIX_HEADER = JpKrayTiELCImagePicker_Prefix.pch; 290 | INSTALL_PATH = /usr/local/lib; 291 | PRODUCT_NAME = JpKrayTiELCImagePicker; 292 | }; 293 | name = Release; 294 | }; 295 | 1DEB922308733DC00010E9CD /* Debug */ = { 296 | isa = XCBuildConfiguration; 297 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 298 | buildSettings = { 299 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 300 | GCC_C_LANGUAGE_STANDARD = c99; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 303 | GCC_WARN_UNUSED_VARIABLE = YES; 304 | OTHER_LDFLAGS = ""; 305 | PREBINDING = NO; 306 | SDKROOT = iphoneos; 307 | }; 308 | name = Debug; 309 | }; 310 | 1DEB922408733DC00010E9CD /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 313 | buildSettings = { 314 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 315 | GCC_C_LANGUAGE_STANDARD = c99; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 317 | GCC_WARN_UNUSED_VARIABLE = YES; 318 | OTHER_LDFLAGS = ""; 319 | PREBINDING = NO; 320 | SDKROOT = iphoneos; 321 | }; 322 | name = Release; 323 | }; 324 | 24416B8211C4CA220047AFDD /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 327 | buildSettings = { 328 | COPY_PHASE_STRIP = NO; 329 | GCC_DYNAMIC_NO_PIC = NO; 330 | GCC_OPTIMIZATION_LEVEL = 0; 331 | PRODUCT_NAME = "Build & test"; 332 | }; 333 | name = Debug; 334 | }; 335 | 24416B8311C4CA220047AFDD /* Release */ = { 336 | isa = XCBuildConfiguration; 337 | baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; 338 | buildSettings = { 339 | COPY_PHASE_STRIP = YES; 340 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 341 | GCC_ENABLE_FIX_AND_CONTINUE = NO; 342 | PRODUCT_NAME = "Build & test"; 343 | ZERO_LINK = NO; 344 | }; 345 | name = Release; 346 | }; 347 | /* End XCBuildConfiguration section */ 348 | 349 | /* Begin XCConfigurationList section */ 350 | 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "tielcimagepicker" */ = { 351 | isa = XCConfigurationList; 352 | buildConfigurations = ( 353 | 1DEB921F08733DC00010E9CD /* Debug */, 354 | 1DEB922008733DC00010E9CD /* Release */, 355 | ); 356 | defaultConfigurationIsVisible = 0; 357 | defaultConfigurationName = Release; 358 | }; 359 | 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "tielcimagepicker" */ = { 360 | isa = XCConfigurationList; 361 | buildConfigurations = ( 362 | 1DEB922308733DC00010E9CD /* Debug */, 363 | 1DEB922408733DC00010E9CD /* Release */, 364 | ); 365 | defaultConfigurationIsVisible = 0; 366 | defaultConfigurationName = Release; 367 | }; 368 | 24416B8A11C4CA520047AFDD /* Build configuration list for PBXAggregateTarget "Build & Test" */ = { 369 | isa = XCConfigurationList; 370 | buildConfigurations = ( 371 | 24416B8211C4CA220047AFDD /* Debug */, 372 | 24416B8311C4CA220047AFDD /* Release */, 373 | ); 374 | defaultConfigurationIsVisible = 0; 375 | defaultConfigurationName = Release; 376 | }; 377 | /* End XCConfigurationList section */ 378 | }; 379 | rootObject = 0867D690FE84028FC02AAC07 /* Project object */; 380 | } 381 | --------------------------------------------------------------------------------