├── .gitignore ├── BoxBrowseSDK ├── BoxBrowseSDK.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── BoxBrowseSDK.xcscheme ├── BoxBrowseSDK.xcworkspace │ └── contents.xcworkspacedata ├── BoxBrowseSDK │ ├── BOXBrowseSDKConstants.h │ ├── BOXThumbnailCache.h │ ├── BOXThumbnailCache.m │ ├── BoxBrowseSDK.h │ ├── Categories │ │ ├── BOXItem+BOXBrowseSDKAdditions.h │ │ ├── BOXItem+BOXBrowseSDKAdditions.m │ │ ├── NSBundle+BOXBrowseSDKAdditions.h │ │ ├── NSBundle+BOXBrowseSDKAdditions.m │ │ ├── UIImage+BOXBrowseSDKAdditions.h │ │ └── UIImage+BOXBrowseSDKAdditions.m │ ├── Controllers │ │ ├── BOXCreateFolderViewController.h │ │ ├── BOXCreateFolderViewController.m │ │ ├── BOXFolderViewController.h │ │ ├── BOXFolderViewController.m │ │ ├── BOXItemsViewController.h │ │ ├── BOXItemsViewController.m │ │ ├── BOXSearchResultsViewController.h │ │ └── BOXSearchResultsViewController.m │ ├── DummyStrings.h │ ├── DummyStrings.m │ ├── Helpers │ │ ├── BOXBrowseSDKFileTypeHelper.h │ │ ├── BOXBrowseSDKFileTypeHelper.m │ │ ├── BOXBrowseSDKResourceLocator.h │ │ └── BOXBrowseSDKResourceLocator.m │ └── Views │ │ └── Cells │ │ ├── BOXItemCell.h │ │ └── BOXItemCell.m ├── BoxBrowseSDKFramework │ ├── BoxBrowseSDKFramework.h │ └── Info.plist ├── BoxBrowseSDKTests │ └── Info.plist ├── Resource │ ├── Info.plist │ └── icons.xcassets │ │ ├── Contents.json │ │ ├── audio.imageset │ │ ├── Contents.json │ │ └── audio.pdf │ │ ├── audio.pdf │ │ ├── boxnote.imageset │ │ ├── Contents.json │ │ └── boxnote.pdf │ │ ├── boxnote.pdf │ │ ├── code.imageset │ │ ├── Contents.json │ │ └── code.pdf │ │ ├── code.pdf │ │ ├── database.imageset │ │ ├── Contents.json │ │ └── database.pdf │ │ ├── database.pdf │ │ ├── document.imageset │ │ ├── Contents.json │ │ └── document.pdf │ │ ├── document.pdf │ │ ├── excel.imageset │ │ ├── Contents.json │ │ └── excel.pdf │ │ ├── excel.pdf │ │ ├── external_folder.imageset │ │ ├── Contents.json │ │ └── external_folder.pdf │ │ ├── external_folder.pdf │ │ ├── generic.imageset │ │ ├── Contents.json │ │ └── generic.pdf │ │ ├── generic.pdf │ │ ├── ic_box_browsesdk_photoshop.pdf │ │ ├── ic_box_browsesdk_presentation.pdf │ │ ├── illustrator.imageset │ │ ├── Contents.json │ │ └── illustrator.pdf │ │ ├── illustrator.pdf │ │ ├── image.imageset │ │ ├── Contents.json │ │ └── image.pdf │ │ ├── image.pdf │ │ ├── inDesign.imageset │ │ ├── Contents.json │ │ └── inDesign.pdf │ │ ├── inDesign.pdf │ │ ├── link.imageset │ │ ├── Contents.json │ │ └── link.pdf │ │ ├── link.pdf │ │ ├── lock.imageset │ │ ├── Contents.json │ │ └── lock.pdf │ │ ├── lock.pdf │ │ ├── pdf.imageset │ │ ├── Contents.json │ │ └── pdf.pdf │ │ ├── pdf.pdf │ │ ├── personal_folder.imageset │ │ ├── Contents.json │ │ └── personal_folder.pdf │ │ ├── personal_folder.pdf │ │ ├── photoshop.imageset │ │ ├── Contents.json │ │ └── ic_box_browsesdk_photoshop.pdf │ │ ├── powerpoint.imageset │ │ ├── Contents.json │ │ └── powerpoint.pdf │ │ ├── powerpoint.pdf │ │ ├── presentation.imageset │ │ ├── Contents.json │ │ └── ic_box_browsesdk_presentation.pdf │ │ ├── shared_folder.imageset │ │ ├── Contents.json │ │ └── shared_folder.pdf │ │ ├── shared_folder.pdf │ │ ├── sketch.imageset │ │ ├── Contents.json │ │ └── sketch.pdf │ │ ├── sketch.pdf │ │ ├── small_audio.imageset │ │ ├── Contents.json │ │ └── small_audio.pdf │ │ ├── small_audio.pdf │ │ ├── small_boxnote.imageset │ │ ├── Contents.json │ │ └── small_boxnote.pdf │ │ ├── small_boxnote.pdf │ │ ├── small_code.imageset │ │ ├── Contents.json │ │ └── small_code.pdf │ │ ├── small_code.pdf │ │ ├── small_database.imageset │ │ ├── Contents.json │ │ └── small_database.pdf │ │ ├── small_database.pdf │ │ ├── small_document.imageset │ │ ├── Contents.json │ │ └── small_document.pdf │ │ ├── small_document.pdf │ │ ├── small_excel.imageset │ │ ├── Contents.json │ │ └── small_excel.pdf │ │ ├── small_excel.pdf │ │ ├── small_external_folder.imageset │ │ ├── Contents.json │ │ └── small_external_folder.pdf │ │ ├── small_external_folder.pdf │ │ ├── small_generic.imageset │ │ ├── Contents.json │ │ └── small_generic.pdf │ │ ├── small_generic.pdf │ │ ├── small_illustrator.imageset │ │ ├── Contents.json │ │ └── small_illustrator.pdf │ │ ├── small_illustrator.pdf │ │ ├── small_image.imageset │ │ ├── Contents.json │ │ └── small_image.pdf │ │ ├── small_image.pdf │ │ ├── small_inDesign.imageset │ │ ├── Contents.json │ │ └── small_inDesign.pdf │ │ ├── small_inDesign.pdf │ │ ├── small_link.imageset │ │ ├── Contents.json │ │ └── small_link.pdf │ │ ├── small_link.pdf │ │ ├── small_lock.imageset │ │ ├── Contents.json │ │ └── small_lock.pdf │ │ ├── small_lock.pdf │ │ ├── small_pdf.imageset │ │ ├── Contents.json │ │ └── small_pdf.pdf │ │ ├── small_pdf.pdf │ │ ├── small_personal_folder.imageset │ │ ├── Contents.json │ │ └── small_personal_folder.pdf │ │ ├── small_personal_folder.pdf │ │ ├── small_powerpoint.imageset │ │ ├── Contents.json │ │ └── small_powerpoint.pdf │ │ ├── small_powerpoint.pdf │ │ ├── small_presentation.imageset │ │ ├── Contents.json │ │ └── small_presentation.pdf │ │ ├── small_shared_folder.imageset │ │ ├── Contents.json │ │ └── small_shared_folder.pdf │ │ ├── small_shared_folder.pdf │ │ ├── small_sketch.imageset │ │ ├── Contents.json │ │ └── small_sketch.pdf │ │ ├── small_sketch.pdf │ │ ├── small_spreadsheet.imageset │ │ ├── Contents.json │ │ └── small_spreadsheet.pdf │ │ ├── small_spreadsheet.pdf │ │ ├── small_text.imageset │ │ ├── Contents.json │ │ └── small_text.pdf │ │ ├── small_text.pdf │ │ ├── small_vector.imageset │ │ ├── Contents.json │ │ └── small_vector.pdf │ │ ├── small_vector.pdf │ │ ├── small_video.imageset │ │ ├── Contents.json │ │ └── small_video.pdf │ │ ├── small_video.pdf │ │ ├── small_zip.imageset │ │ ├── Contents.json │ │ └── small_zip.pdf │ │ ├── small_zip.pdf │ │ ├── spreadsheet.imageset │ │ ├── Contents.json │ │ └── spreadsheet.pdf │ │ ├── spreadsheet.pdf │ │ ├── text.imageset │ │ ├── Contents.json │ │ └── text.pdf │ │ ├── text.pdf │ │ ├── vector.imageset │ │ ├── Contents.json │ │ └── vector.pdf │ │ ├── vector.pdf │ │ ├── video.imageset │ │ ├── Contents.json │ │ └── video.pdf │ │ ├── video.pdf │ │ ├── word.imageset │ │ ├── Contents.json │ │ └── word.pdf │ │ ├── word.pdf │ │ ├── zip.imageset │ │ ├── Contents.json │ │ └── zip.pdf │ │ └── zip.pdf └── build-phases │ └── copy-products.sh ├── BoxBrowseSDKSampleApp ├── BoxBrowseSDKSampleApp.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── BoxBrowseSDKSampleApp.xcworkspace │ └── contents.xcworkspacedata ├── BoxBrowseSDKSampleApp │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── BoxBrowseSDKSampleAppTests │ ├── BoxBrowseSDKSampleAppTests.m │ └── Info.plist ├── Cartfile └── Makefile ├── CONTRIBUTING.md ├── Cartfile ├── ISSUE_TEMPLATE.md ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # osx noise 2 | .DS_Store 3 | profile 4 | 5 | # xcode noise 6 | build/* 7 | /build/* 8 | app/build/* 9 | *.mode1 10 | *.mode1v3 11 | *.mode2v3 12 | *.perspective 13 | *.perspectivev3 14 | *.pbxuser 15 | xcuserdata 16 | *.xccheckout 17 | *.xcscmblueprint 18 | DerivedData/ 19 | 20 | # Carthage 21 | /Carthage 22 | BoxBrowseSDK/Carthage/ 23 | BoxBrowseSDKSampleApp/Carthage 24 | Cartfile.resolved 25 | BoxBrowseSDKSampleApp/Cartfile.resolved 26 | 27 | # Box build artifacts 28 | buildArtifacts 29 | 30 | # Box localization files 31 | /output/* 32 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK.xcodeproj/xcshareddata/xcschemes/BoxBrowseSDK.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/BOXBrowseSDKConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXBrowseSDKConstants.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/20/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define BOX_BROWSE_SDK_IDENTIFIER @"box-browse-sdk" 12 | #define BOX_BROWSE_SDK_VERSION @"1.0.7" 13 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/BOXThumbnailCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXImageCache.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/31/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @import BoxContentSDK; 12 | 13 | @interface BOXThumbnailCache : NSObject 14 | 15 | + (instancetype)sharedInstanceForContentClient:(BOXContentClient *)contentClient; 16 | 17 | - (BOXFileThumbnailRequest *)fetchThumbnailForFile:(BOXFile *)file size:(BOXThumbnailSize)size completion:(BOXImageBlock)completion; 18 | 19 | - (BOOL)hasThumbnailInCacheForFile:(BOXFile *)file size:(BOXThumbnailSize)size; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/BOXThumbnailCache.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXImageCache.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/31/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXThumbnailCache.h" 10 | #import "UIImage+BOXBrowseSDKAdditions.h" 11 | #import "BOXBrowseSDKConstants.h" 12 | 13 | @interface BOXThumbnailCache () 14 | 15 | @property (nonatomic, readonly, strong) BOXContentClient *contentClient; 16 | @property (nonatomic, readonly, strong) NSCache *memoryCache; 17 | 18 | @end 19 | 20 | @implementation BOXThumbnailCache 21 | 22 | + (instancetype)sharedInstanceForContentClient:(BOXContentClient *)contentClient 23 | { 24 | if (contentClient == nil) { 25 | return nil; 26 | } 27 | 28 | static NSMapTable *instances; 29 | if (instances == nil) { 30 | instances = [[NSMapTable alloc] init]; 31 | } 32 | BOXThumbnailCache *instance = [instances objectForKey:contentClient]; 33 | if (instance == nil) { 34 | instance = [[self alloc] initWithContentClient:contentClient]; 35 | [instances setObject:instance forKey:contentClient]; 36 | } 37 | 38 | return instance; 39 | } 40 | 41 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 42 | { 43 | if (self = [super init]) { 44 | _contentClient = contentClient; 45 | _memoryCache = [[NSCache alloc] init]; 46 | } 47 | return self; 48 | } 49 | 50 | - (BOXFileThumbnailRequest *)fetchThumbnailForFile:(BOXFile *)file size:(BOXThumbnailSize)size completion:(BOXImageBlock)completion 51 | { 52 | NSString *key = [self cacheKeyForFile:file thumbnailSize:size]; 53 | __block UIImage *thumbnail = [self.memoryCache objectForKey:key]; 54 | if (thumbnail) { 55 | completion(thumbnail, nil); 56 | } else { 57 | BOXFileThumbnailRequest *request = [self.contentClient fileThumbnailRequestWithID:file.modelID size:size]; 58 | request.SDKIdentifier = BOX_BROWSE_SDK_IDENTIFIER; 59 | request.SDKVersion = BOX_BROWSE_SDK_VERSION; 60 | [request performRequestWithProgress:nil completion:^(UIImage *image, NSError *error) { 61 | if (image) { 62 | thumbnail = [image box_imageAtAppropriateScaleFactor]; 63 | [self.memoryCache setObject:thumbnail forKey:key]; 64 | } 65 | completion(image, error); 66 | }]; 67 | return request; 68 | } 69 | return nil; 70 | } 71 | 72 | - (BOOL)hasThumbnailInCacheForFile:(BOXFile *)file size:(BOXThumbnailSize)size 73 | { 74 | NSString *key = [self cacheKeyForFile:file thumbnailSize:size]; 75 | return [self.memoryCache objectForKey:key] != nil; 76 | } 77 | 78 | - (NSString *)cacheKeyForFile:(BOXFile *)file thumbnailSize:(BOXThumbnailSize)thumbnailSize 79 | { 80 | NSString *key = [NSString stringWithFormat:@"%@_%lu", file.SHA1, (unsigned long) thumbnailSize]; 81 | return key; 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/BoxBrowseSDK.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "BoxBrowseSDK.h" 4 | #import "BOXBrowseSDKConstants.h" 5 | #import "BOXThumbnailCache.h" 6 | #import "DummyStrings.h" 7 | #import "BOXItem+BOXBrowseSDKAdditions.h" 8 | #import "NSBundle+BOXBrowseSDKAdditions.h" 9 | #import "UIImage+BOXBrowseSDKAdditions.h" 10 | #import "BOXCreateFolderViewController.h" 11 | #import "BOXFolderViewController.h" 12 | #import "BOXItemsViewController.h" 13 | #import "BOXSearchResultsViewController.h" 14 | #import "BOXBrowseSDKFileTypeHelper.h" 15 | #import "BOXBrowseSDKResourceLocator.h" 16 | #import "BOXItemCell.h" 17 | 18 | FOUNDATION_EXPORT double BoxBrowseSDKVersionNumber; 19 | FOUNDATION_EXPORT const unsigned char BoxBrowseSDKVersionString[]; 20 | 21 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Categories/BOXItem+BOXBrowseSDKAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXItem+BOXBrowseSDKAdditions.h 3 | // BoxBrowseSDK 4 | // 5 | // Created on 1/28/16. 6 | // Copyright © 2016 BOX. All rights reserved. 7 | // 8 | 9 | @import BoxContentSDK; 10 | 11 | @interface BOXItem (BOXBrowseSDKAdditions) 12 | 13 | 14 | /** 15 | * Returns the date to use for comparing when items were modified. 16 | * BOXFiles will use contentModifiedDate, BOXFolder and BOXBookmark will use modifiedDate. 17 | * 18 | * @return The date to use for comparing when items were modified. 19 | */ 20 | - (NSDate *)effectiveUpdateDate; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Categories/BOXItem+BOXBrowseSDKAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXItem+BOXBrowseSDKAdditions.m 3 | // BoxBrowseSDK 4 | // 5 | // Created on 1/28/16. 6 | // Copyright © 2016 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXItem+BOXBrowseSDKAdditions.h" 10 | 11 | @implementation BOXItem (BOXBrowseSDKAdditions) 12 | 13 | - (NSDate *)effectiveUpdateDate 14 | { 15 | return self.isFile ? self.contentModifiedDate : self.modifiedDate; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Categories/NSBundle+BOXBrowseSDKAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+BOXBrowseSDKAdditions.h 3 | // Pods 4 | // 5 | // Created by Andrew Dempsey on 12/29/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (BOXBrowseSDKAdditions) 12 | 13 | + (NSBundle *)boxBrowseSDKResourcesBundle; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Categories/NSBundle+BOXBrowseSDKAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+BOXBrowseSDKAdditions.m 3 | // Pods 4 | // 5 | // Created by Andrew Dempsey on 12/29/15. 6 | // 7 | // 8 | 9 | #import "NSBundle+BOXBrowseSDKAdditions.h" 10 | #import "BOXBrowseSDKResourceLocator.h" 11 | 12 | @implementation NSBundle (BOXBrowseSDKAdditions) 13 | 14 | + (NSBundle *)boxBrowseSDKResourcesBundle 15 | { 16 | return [NSBundle bundleForClass:[BOXBrowseSDKResourceLocator class]]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Categories/UIImage+BOXBrowseSDKAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+BOXBrowseSDKAdditions.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/30/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @class BOXItem; 14 | 15 | @interface UIImage (BOXBrowseSDKAdditions) 16 | 17 | /** 18 | * Returns an item's corresponding default icon 19 | * 20 | * @return An icon corresponding to the item's file type 21 | */ 22 | + (UIImage *)box_iconForItem:(BOXItem *)item; 23 | 24 | /** 25 | * Returns an item's corresponding default icon (smaller size) 26 | * 27 | * @return An icon corresponding to the item's file type 28 | */ 29 | + (UIImage *)box_smallIconForItem:(BOXItem *)item; 30 | 31 | 32 | /** 33 | * Returns an image with the appropriate scale factor given the device. 34 | * 35 | * @return An image with the appropriate scale. 36 | */ 37 | - (UIImage *)box_imageAtAppropriateScaleFactor; 38 | 39 | /** 40 | * Returns a default icon for a given corresponding filename with extension 41 | * 42 | @param fileName Name of the file requiring an icon 43 | 44 | @return An icon corresponding to the item's file type 45 | */ 46 | + (UIImage *)box_iconForFileName:(NSString *)fileName; 47 | 48 | /** 49 | * Returns a default icon for a generic file. If you have a BoxItem 50 | * use box_iconForItem:item to get the correct icon for the item. 51 | * 52 | * @return A default file icon 53 | */ 54 | + (UIImage *)box_genericFileIcon; 55 | 56 | /** 57 | * Returns a default icon for a generic folder. If you have a BoxItem 58 | * use box_iconForItem:item to get the correct icon for the item. 59 | * 60 | * @return A default folder icon 61 | */ 62 | + (UIImage *)box_genericFolderIcon; 63 | 64 | /** 65 | * Returns a default icon for a shared (aka collaborated) folder. If you have a BoxItem 66 | * use box_iconForItem:item to get the correct icon for the item. 67 | * 68 | * @return A default folder icon 69 | */ 70 | + (UIImage *)box_sharedFolderIcon; 71 | 72 | /** 73 | * Returns a default icon for an external folder. If you have a BoxItem 74 | * use box_iconForItem:item to get the correct icon for the item. 75 | * 76 | * @return A default folder icon 77 | */ 78 | + (UIImage *)box_externalFolderIcon; 79 | 80 | /** 81 | * Returns a default icon for a generic file (smaller size). If you have a BoxItem 82 | * use box_iconForItem:item to get the correct icon for the item. 83 | * 84 | * @return A default file icon 85 | */ 86 | + (UIImage *)box_smallGenericFileIcon; 87 | 88 | /** 89 | * Returns a default icon for a generic folder (smaller size). If you have a BOXItem 90 | * use box_iconForItem:item to get the correct icon for the item. 91 | * 92 | * @return A default folder icon 93 | */ 94 | + (UIImage *)box_smallGenericFolderIcon; 95 | 96 | /** 97 | * Returns a default icon for a shared (aka collaborated) folder (smaller size). If you have a BoxItem 98 | * use box_iconForItem:item to get the correct icon for the item. 99 | * 100 | * @return A default folder icon 101 | */ 102 | + (UIImage *)box_smallSharedFolderIcon; 103 | 104 | /** 105 | * Returns a default icon for an external folder (smaller size). If you have a BoxItem 106 | * use box_iconForItem:item to get the correct icon for the item. 107 | * 108 | * @return A default folder icon 109 | */ 110 | + (UIImage *)box_smallExternalFolderIcon; 111 | 112 | @end 113 | 114 | NS_ASSUME_NONNULL_END 115 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Categories/UIImage+BOXBrowseSDKAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+BOXBrowseSDKAdditions.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/30/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import BoxContentSDK; 10 | 11 | #import "UIImage+BOXBrowseSDKAdditions.h" 12 | #import "NSBundle+BOXBrowseSDKAdditions.h" 13 | #import "BOXBrowseSDKFileTypeHelper.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @implementation UIImage (BOXBrowseSDKAdditions) 18 | 19 | #pragma mark - Public Methods 20 | 21 | + (UIImage *)box_iconForItem:(BOXItem *)item 22 | { 23 | UIImage *icon = nil; 24 | 25 | if (item.isFolder) { 26 | BOXFolder *folder = (BOXFolder *)item; 27 | if (folder.isExternallyOwned == BOXAPIBooleanYES) { 28 | icon = [UIImage box_iconWithName:@"external_folder"]; 29 | 30 | } else if (folder.hasCollaborations == BOXAPIBooleanYES) { 31 | icon = [UIImage box_iconWithName:@"shared_folder"]; 32 | 33 | } else { 34 | icon = [UIImage box_iconWithName:@"personal_folder"]; 35 | 36 | } 37 | } else if (item.isFile) { 38 | icon = [UIImage box_iconForFileName:item.name]; 39 | 40 | } else if (item.isBookmark) { 41 | icon = [UIImage box_iconWithName:@"link"]; 42 | 43 | } 44 | 45 | BOXAssert(icon != nil, @"No icon for item %@.", item); 46 | return icon; 47 | } 48 | 49 | + (UIImage *)box_smallIconForItem:(BOXItem *)item 50 | { 51 | NSString *name = nil; 52 | 53 | if (item.isFolder) { 54 | BOXFolder *folder = (BOXFolder *)item; 55 | if (folder.isExternallyOwned == BOXAPIBooleanYES) { 56 | name = @"small_external_folder"; 57 | 58 | } else if (folder.hasCollaborations == BOXAPIBooleanYES) { 59 | name = @"small_shared_folder"; 60 | 61 | } else { 62 | name = @"small_personal_folder"; 63 | 64 | } 65 | } else if (item.isFile) { 66 | NSString *fileExtension = [item.name box_pathExtensionAccountingForMultipleExtensionsAndEmptyName].lowercaseString; 67 | NSString *iconName = [self iconNameForFileExtension:fileExtension]; 68 | 69 | name = [@"small_" stringByAppendingString:iconName]; 70 | 71 | } else if (item.isBookmark) { 72 | name = @"small_link"; 73 | } 74 | UIImage *icon = [UIImage box_iconWithName:name]; 75 | 76 | BOXAssert(icon != nil, @"No small icon for item %@.", item); 77 | return icon; 78 | } 79 | 80 | + (UIImage *)box_iconForFileName:(NSString *)fileName 81 | { 82 | NSString *fileExtension = [fileName box_pathExtensionAccountingForMultipleExtensionsAndEmptyName].lowercaseString; 83 | NSString *iconName = [self iconNameForFileExtension:fileExtension]; 84 | 85 | UIImage *image = [UIImage box_iconWithName:iconName]; 86 | 87 | if (image == nil) { 88 | image = [UIImage box_genericFileIcon]; 89 | } 90 | 91 | return image; 92 | } 93 | 94 | + (UIImage *)box_genericFileIcon 95 | { 96 | return [UIImage box_iconWithName:@"generic"]; 97 | } 98 | 99 | + (UIImage *)box_genericFolderIcon 100 | { 101 | return [UIImage box_iconWithName:@"personal_folder"]; 102 | } 103 | 104 | + (UIImage *)box_sharedFolderIcon 105 | { 106 | return [UIImage box_iconWithName:@"shared_folder"]; 107 | } 108 | 109 | + (UIImage *)box_externalFolderIcon 110 | { 111 | return [UIImage box_iconWithName:@"external_folder"]; 112 | } 113 | 114 | + (UIImage *)box_smallGenericFileIcon 115 | { 116 | return [UIImage box_iconWithName:@"small_generic"]; 117 | } 118 | 119 | + (UIImage *)box_smallGenericFolderIcon 120 | { 121 | return [UIImage box_iconWithName:@"small_personal_folder"]; 122 | } 123 | 124 | + (UIImage *)box_smallSharedFolderIcon 125 | { 126 | return [UIImage box_iconWithName:@"small_shared_folder"]; 127 | } 128 | 129 | + (UIImage *)box_smallExternalFolderIcon 130 | { 131 | return [UIImage box_iconWithName:@"small_external_folder"]; 132 | } 133 | 134 | - (UIImage *)box_imageAtAppropriateScaleFactor 135 | { 136 | UIImage *image = self; 137 | CGFloat scaleFactor = [UIScreen mainScreen].scale; 138 | if (scaleFactor != 1.0f) { 139 | image = [UIImage imageWithCGImage:image.CGImage scale:scaleFactor orientation:image.imageOrientation]; 140 | } 141 | 142 | return image; 143 | } 144 | 145 | #pragma mark - Private Methods 146 | 147 | + (nullable UIImage *)box_iconWithName:(NSString *)name 148 | { 149 | UIImage *icon = nil; 150 | NSBundle *browseSDKResourceBundle = [NSBundle boxBrowseSDKResourcesBundle]; 151 | 152 | @synchronized (browseSDKResourceBundle) { 153 | icon = [UIImage imageNamed:name 154 | inBundle:browseSDKResourceBundle 155 | compatibleWithTraitCollection:nil]; 156 | } 157 | 158 | return icon; 159 | } 160 | 161 | + (NSString *)iconNameForFileExtension:(NSString *)fileExtension 162 | { 163 | NSString *iconName = @"generic"; 164 | if ([[BOXBrowseSDKFileTypeHelper audioFileExtensions] containsObject:fileExtension]) { 165 | iconName = @"audio"; 166 | } 167 | else if ([[BOXBrowseSDKFileTypeHelper imageFileExtensions] containsObject:fileExtension]) { 168 | iconName = @"image"; 169 | } 170 | else if ([[BOXBrowseSDKFileTypeHelper videoFileExtensions] containsObject:fileExtension]) { 171 | iconName = @"video"; 172 | } 173 | else if ([[BOXBrowseSDKFileTypeHelper docFileExtensions] containsObject:fileExtension]) { 174 | iconName = @"document"; 175 | } 176 | else if ([[BOXBrowseSDKFileTypeHelper codeFileExtensions] containsObject:fileExtension]) { 177 | iconName = @"code"; 178 | } 179 | else if ([[BOXBrowseSDKFileTypeHelper textFileExtensions] containsObject:fileExtension]) { 180 | iconName = @"text"; 181 | } 182 | else if ([[BOXBrowseSDKFileTypeHelper presentationFileExtensions] containsObject:fileExtension]) { 183 | iconName = @"presentation"; 184 | } 185 | else if ([[BOXBrowseSDKFileTypeHelper sheetFileExtensions] containsObject:fileExtension]) { 186 | iconName = @"spreadsheet"; 187 | } 188 | else if ([[BOXBrowseSDKFileTypeHelper compressedFileExtensions] containsObject:fileExtension]) { 189 | iconName = @"zip"; 190 | } 191 | else if ([[BOXBrowseSDKFileTypeHelper vectorImageFileExtensions] containsObject:fileExtension]) { 192 | iconName = @"vector"; 193 | } 194 | else if ([[BOXBrowseSDKFileTypeHelper dbFileExtensions] containsObject:fileExtension]) { 195 | iconName = @"database"; 196 | } 197 | else if ([[BOXBrowseSDKFileTypeHelper iconFileExtensions] containsObject:fileExtension]) { 198 | iconName = @"icon"; 199 | } 200 | else if ([fileExtension isEqualToString:@"boxnote"]) { 201 | iconName = @"boxnote"; 202 | } 203 | else if ([fileExtension isEqualToString:@"ai"]) { 204 | iconName = @"illustrator"; 205 | } 206 | else if ([fileExtension isEqualToString:@"indd"]) { 207 | iconName = @"inDesign"; 208 | } 209 | else if ([fileExtension isEqualToString:@"pdf"]) { 210 | iconName = @"pdf"; 211 | } 212 | else if ([fileExtension isEqualToString:@"psd"]) { 213 | iconName = @"photoshop"; 214 | } 215 | else if ([fileExtension isEqualToString:@"sketch"]) { 216 | iconName = @"sketch"; 217 | } 218 | 219 | return iconName; 220 | } 221 | 222 | @end 223 | 224 | NS_ASSUME_NONNULL_END 225 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXCreateFolderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXCreateFolderViewController.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/1/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface BOXCreateFolderViewController : UIViewController 13 | 14 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 15 | parentFolderID:(NSString *)parentFolderID 16 | completion:(BOXFolderBlock)completion; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXCreateFolderViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXCreateFolderViewController.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/1/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXCreateFolderViewController.h" 10 | #import "UIImage+BOXBrowseSDKAdditions.h" 11 | #import "BOXBrowseSDKConstants.h" 12 | 13 | #define kTitleViewHeight 60.0 14 | #define kTextFieldOffsetX 64.0 15 | #define kTextFieldOffsetY 17.0 16 | 17 | @interface BOXCreateFolderViewController () 18 | 19 | @property (nonatomic, readonly, strong) BOXContentClient *contentClient; 20 | @property (nonatomic, readonly, strong) NSString *parentFolderID; 21 | @property (nonatomic, readonly, strong) BOXFolderBlock completion; 22 | 23 | @property (nonatomic, readwrite, strong) UIView *textFieldContainer; 24 | @property (nonatomic, readwrite, strong) UITextField *textField; 25 | @property (nonatomic, readwrite, strong) UIView *horizontalSeparator; 26 | @property (nonatomic, readwrite, strong) UILabel *helpLabel; 27 | @property (nonatomic, readwrite, assign) BOOL wasToolbarHiddenOnLoad; 28 | @property (nonatomic, readwrite, assign) BOOL wasNavigationBarTranslucentOnLoad; 29 | 30 | @end 31 | 32 | @implementation BOXCreateFolderViewController 33 | 34 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 35 | parentFolderID:(NSString *)parentFolderID 36 | completion:(BOXFolderBlock)completion 37 | { 38 | if (self = [super init]) { 39 | _contentClient = contentClient; 40 | _parentFolderID = parentFolderID; 41 | _completion = completion; 42 | } 43 | 44 | return self; 45 | } 46 | 47 | - (void)viewDidLoad { 48 | [super viewDidLoad]; 49 | 50 | self.view.backgroundColor = [UIColor colorWithWhite:245/255.0 alpha:1]; 51 | self.wasToolbarHiddenOnLoad = self.navigationController.toolbarHidden; 52 | self.navigationController.toolbarHidden = YES; 53 | 54 | self.title = NSLocalizedString(@"New Folder", @"Title: Title for the creation and naming of a new folder"); 55 | 56 | UIBarButtonItem *saveButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save", @"Title: Save action, often used on buttons") style:UIBarButtonItemStyleDone target:self action:@selector(saveButtonAction:)]; 57 | self.navigationItem.rightBarButtonItem = saveButtonItem; 58 | self.navigationItem.rightBarButtonItem.enabled = NO; 59 | 60 | self.textFieldContainer = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.bounds.size.width, kTitleViewHeight)]; 61 | self.textFieldContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth; 62 | self.textFieldContainer.backgroundColor = [UIColor whiteColor]; 63 | 64 | self.horizontalSeparator = [[UIView alloc] initWithFrame:CGRectMake(0.0, self.textFieldContainer.frame.size.height - 1, self.textFieldContainer.frame.size.width, 1)]; 65 | self.horizontalSeparator.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; 66 | self.horizontalSeparator.backgroundColor = [UIColor colorWithWhite:240/255.0 alpha:1]; 67 | 68 | self.helpLabel = [[UILabel alloc] init]; 69 | self.helpLabel.backgroundColor = [UIColor clearColor]; 70 | self.helpLabel.textColor = [UIColor colorWithWhite:180/255.0 alpha:1]; 71 | self.helpLabel.shadowColor = [UIColor colorWithWhite:1 alpha:1]; 72 | self.helpLabel.shadowOffset = CGSizeMake(0, 1); 73 | self.helpLabel.font = [UIFont systemFontOfSize:14]; 74 | self.helpLabel.text = NSLocalizedString(@"Please name your new folder.", @"Helping text displayed when creating a new folder"); 75 | self.helpLabel.numberOfLines = 0; 76 | CGSize labelSize = [self.helpLabel sizeThatFits:CGSizeMake(self.view.bounds.size.width, 200)]; 77 | self.helpLabel.frame = CGRectMake(0, kTitleViewHeight + 3, self.view.bounds.size.width, labelSize.height); 78 | self.helpLabel.textAlignment = NSTextAlignmentCenter; 79 | self.helpLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth; 80 | [self.view addSubview:self.helpLabel]; 81 | 82 | self.textField = [[UITextField alloc] initWithFrame:CGRectMake(kTextFieldOffsetX, kTextFieldOffsetY, self.textFieldContainer.frame.size.width - kTextFieldOffsetX, self.textFieldContainer.frame.size.height - 2 * kTextFieldOffsetY - 2)]; 83 | self.textField.delegate = self; 84 | self.textField.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; 85 | self.textField.font = [UIFont boldSystemFontOfSize:20]; 86 | self.textField.minimumFontSize = 13; 87 | self.textField.adjustsFontSizeToFitWidth = YES; 88 | self.textField.textColor = [UIColor colorWithWhite:40/255.0 alpha:1]; 89 | self.textField.backgroundColor = [UIColor clearColor]; 90 | self.textField.autocorrectionType = UITextAutocorrectionTypeDefault; 91 | self.textField.autocapitalizationType = UITextAutocapitalizationTypeWords; 92 | self.textField.clearButtonMode = UITextFieldViewModeWhileEditing; 93 | self.textField.returnKeyType = UIReturnKeyDone; 94 | 95 | NSString *placeholder = NSLocalizedString(@"Folder Name", @"placeholder : the title of the folder about to be created"); 96 | NSAttributedString *attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName:[UIColor colorWithWhite:200/255.0 alpha:1]}]; 97 | self.textField.attributedPlaceholder = attributedPlaceholder; 98 | 99 | [self.textFieldContainer addSubview:self.textField]; 100 | 101 | UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake(9.0, 9.0, 40, 40)]; 102 | icon.image = [UIImage box_genericFolderIcon]; 103 | icon.contentMode = UIViewContentModeCenter; 104 | [self.textFieldContainer addSubview:icon]; 105 | 106 | [self.view addSubview:self.textFieldContainer]; 107 | } 108 | 109 | - (void)viewWillAppear:(BOOL)animated 110 | { 111 | [super viewWillAppear:animated]; 112 | 113 | self.wasNavigationBarTranslucentOnLoad = self.navigationController.navigationBar.translucent; 114 | self.navigationController.navigationBar.translucent = NO; 115 | } 116 | 117 | - (void)viewDidAppear:(BOOL)animated 118 | { 119 | [super viewDidAppear:animated]; 120 | [self.textField becomeFirstResponder]; 121 | } 122 | 123 | - (void)viewWillDisappear:(BOOL)animated 124 | { 125 | [super viewWillDisappear:animated]; 126 | self.navigationController.toolbarHidden = self.wasToolbarHiddenOnLoad; 127 | self.navigationController.navigationBar.translucent = self.wasNavigationBarTranslucentOnLoad; 128 | } 129 | 130 | - (void)saveButtonAction:(id)sender 131 | { 132 | [self save]; 133 | } 134 | 135 | #pragma mark - UITextFieldDelegate 136 | 137 | - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string 138 | { 139 | NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:string]; 140 | self.navigationItem.rightBarButtonItem.enabled = newString.length > 0; 141 | return YES; 142 | } 143 | 144 | - (BOOL)textFieldShouldClear:(UITextField *)textField 145 | { 146 | self.navigationItem.rightBarButtonItem.enabled = NO; 147 | return YES; 148 | } 149 | 150 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 151 | { 152 | [self save]; 153 | return YES; 154 | } 155 | 156 | #pragma mark - Private 157 | 158 | - (void)save 159 | { 160 | if ([self.textField isEditing]) { 161 | // We want to resign first responder to pick up any autocorrect changes, however 162 | // we don't want to mess up the user's cursor position in case there was an error 163 | // in the rename and they want to conveniently adjust the name further. 164 | // So, we resign first responder thentextFieldrestore it and maintain the cursor position. 165 | UITextRange *currentRange = self.textField.selectedTextRange; 166 | [self.textField resignFirstResponder]; 167 | [self.textField becomeFirstResponder]; 168 | [self.textField setSelectedTextRange:currentRange]; 169 | } 170 | 171 | NSCharacterSet *whitespaceCharacterSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; 172 | NSString *folderName = [self.textField.text stringByTrimmingCharactersInSet:whitespaceCharacterSet]; 173 | BOXFolderCreateRequest *folderCreateRequest = [self.contentClient folderCreateRequestWithName:folderName parentFolderID:self.parentFolderID]; 174 | folderCreateRequest.SDKIdentifier = BOX_BROWSE_SDK_IDENTIFIER; 175 | folderCreateRequest.SDKVersion = BOX_BROWSE_SDK_VERSION; 176 | folderCreateRequest.requestAllFolderFields = YES; 177 | 178 | UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 179 | spinner.center = self.view.center; 180 | spinner.hidesWhenStopped = YES; 181 | [self.view addSubview:spinner]; 182 | [spinner startAnimating]; 183 | 184 | [folderCreateRequest performRequestWithCompletion:^(BOXFolder *folder, NSError *error) { 185 | [spinner stopAnimating]; 186 | if (error) { 187 | [self didFailToCreateFolderWithError:error]; 188 | } else { 189 | [self.navigationController popViewControllerAnimated:YES]; 190 | if (self.completion) { 191 | self.completion(folder, error); 192 | } 193 | } 194 | }]; 195 | } 196 | 197 | - (void)didFailToCreateFolderWithError:(NSError *)error 198 | { 199 | NSString *title = NSLocalizedString(@"Unable to Create Folder", @"Title: Title used when an error occurs while attempting to create a new folder."); 200 | NSString *message = NSLocalizedString(@"Unable to create folder. Please try again.", @"Alert View Description : The renaming failed."); 201 | 202 | if ([error.domain isEqualToString:BOXContentSDKErrorDomain]) { 203 | if (error.code == BOXContentSDKAPIErrorUnauthorized || error.code == BOXContentSDKAPIErrorForbidden) { 204 | message = NSLocalizedString(@"You do not have permission to create a folder in this location.", 205 | @"Messsage: message for alert view shown when creating folder failed since user did not have the permission"); 206 | } else if (error.code == BOXContentSDKAPIErrorConflict) { 207 | message = NSLocalizedString(@"A folder with the same name already exists.", 208 | @"Messsage: message for alert view shown when creating folder failed because a folder with the same name already exists"); 209 | } 210 | } 211 | 212 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title 213 | message:message 214 | preferredStyle:UIAlertControllerStyleAlert]; 215 | 216 | UIAlertAction *dismissAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Dismiss", @"Label: Allow the user to dismiss the current view or interface, often used on buttons to dismiss alerts") 217 | style:UIAlertActionStyleCancel 218 | handler:^(UIAlertAction *action) { 219 | [alertController dismissViewControllerAnimated:YES completion:nil]; 220 | }]; 221 | [alertController addAction:dismissAction]; 222 | [self presentViewController:alertController animated:YES completion:nil]; 223 | } 224 | 225 | @end 226 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXFolderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXBrowseTableViewController.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/25/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BOXItemsViewController.h" 11 | 12 | @protocol BOXFolderViewControllerDelegate; 13 | 14 | @interface BOXFolderViewController : BOXItemsViewController 15 | 16 | @property (nonatomic, readonly, strong) NSString *folderID; 17 | 18 | + (NSArray *)navigationStackViewControllersWithContentClient:(BOXContentClient *)contentClient 19 | startingFolder:(BOXFolder *)folder; 20 | 21 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 22 | folderID:(NSString *)folderID; 23 | 24 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 25 | folderMini:(BOXFolderMini *)folderMini; 26 | 27 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 28 | folder:(BOXFolder *)folder; 29 | 30 | @end 31 | 32 | @protocol BOXFolderViewControllerDelegate 33 | 34 | @optional 35 | 36 | /** 37 | * If the choose button is shown (see 'shouldShowChooseFolderButton'), this will be called when the user has tapped the button to 38 | * select the folder currently displayed. 39 | * 40 | * @param folderViewController The instance of BOXFolderViewController calling this method. 41 | * @param folder The Folder that the user was viewing when the Choose button was tapped. 42 | */ 43 | - (void)folderViewController:(BOXFolderViewController *)folderViewController didChooseFolder:(BOXFolder *)folder; 44 | 45 | /** 46 | * A folder was created. 47 | * 48 | * @param folderViewController The instance of BOXFolderViewController calling this method. 49 | * @param folder The created folder. 50 | */ 51 | - (void)folderViewController:(BOXFolderViewController *)folderViewController didCreateNewFolder:(BOXFolder *)folder; 52 | 53 | /** 54 | * A Box item was deleted. 55 | * 56 | * @param folderViewController The instance of BOXFolderViewController calling this method. 57 | * @param item The deleted item. 58 | */ 59 | - (void)folderViewController:(BOXFolderViewController *)folderViewController didDeleteItem:(BOXItem *)item; 60 | 61 | /** 62 | * Whether to expose a 'Delete' button for an item by swiping the cell. By default this is not exposed. Note that depending on permissions 63 | * the 'Delete' action may not be exposed even if YES is returned. 64 | * 65 | * @param folderViewController The instance of BOXFolderViewController calling this method. 66 | * @param item The deleted item to show/hide the delete button for. 67 | * @return YES to show the 'Delete' actiion, NO otherwise. 68 | */ 69 | - (BOOL)folderViewController:(BOXFolderViewController *)folderViewController shouldShowDeleteButtonForItem:(BOXItem *)item; 70 | 71 | /** 72 | * Whether to show a search bar to allow the user to search for content within the folder. 73 | * By default, a search bar is shown. 74 | * 75 | * @param folderViewController The instance of BOXFolderViewController calling this method. 76 | * @return YES to show a search bar, NO otherwise. 77 | */ 78 | - (BOOL)folderViewControllerShouldShowSearchBar:(BOXFolderViewController *)folderViewController; 79 | 80 | /** 81 | * Whether to show a button to 'Choose' the folder being displayed. This might be appropriate in 82 | * scenarios where you are asking the user to select a folder (e.g. a folder to upload to). 83 | * By default, this button is not displayed. 84 | * 85 | * @param folderViewController The instance of BOXFolderViewController calling this method. 86 | * @return YES to show a the button, NO otherwise. 87 | */ 88 | - (BOOL)folderViewControllerShouldShowChooseFolderButton:(BOXFolderViewController *)folderViewController; 89 | 90 | /** 91 | * Whether to show a button to allow the user to create a new folder within the folder displayed. 92 | * By default, this button is not displayed. 93 | * 94 | * @param folderViewController The instance of BOXFolderViewController calling this method. 95 | * @return YES to show a the button, NO otherwise. 96 | */ 97 | - (BOOL)folderViewControllerShouldShowCreateFolderButton:(BOXFolderViewController *)folderViewController; 98 | 99 | /** 100 | * A custom title for the Choose Folder button if the button is displayed. 101 | * By default, the title is "Choose". 102 | * 103 | * @param folderViewController The instance of BOXFolderViewController calling this method. 104 | * @return The string to be displayed for the button. 105 | */ 106 | - (NSString *)folderViewControllerChooseFolderButtonTitle:(BOXFolderViewController *)folderViewController; 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXItemsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXItemsViewControllerTableViewController.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/2/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @import BoxContentSDK; 12 | 13 | @protocol BOXItemsViewControllerDelegate; 14 | 15 | @interface BOXItemsViewController : UITableViewController 16 | 17 | @property (nonatomic, readwrite, weak) id delegate; 18 | 19 | @property (nonatomic, readonly, strong) BOXContentClient *contentClient; 20 | 21 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient; 22 | 23 | /** 24 | * Retrieve all items within the current folder 25 | * 26 | * @param completion Block to be executed after items are fetched, passing an array of the items and an 27 | * error object if applicable. If the BOXContentCacheClientProtocol is implemented, the completion block 28 | * will be executed twice, first passing results from the cache and then from Box; use the boolean fromCache 29 | * to differentiate between the two scenarios if necessary. 30 | */ 31 | - (void)fetchItemsWithCompletion:(void (^)(NSArray *items, BOOL fromCache, NSError *error))completion; 32 | 33 | - (BOXItem *)itemForRowAtIndexPath:(NSIndexPath *)indexPath; 34 | 35 | /** 36 | * Refresh the items shown. 37 | */ 38 | - (void)refresh; 39 | - (void)installRefreshControl; 40 | 41 | @end 42 | 43 | @protocol BOXItemsViewControllerDelegate 44 | 45 | @optional 46 | 47 | /** 48 | * By default, all items will be shown. Implement this to hide certain items. 49 | * For example, if you only want to show folders, than return false for any item where 50 | * item.isFolder is false. 51 | * 52 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 53 | * @param item The item to show or not show. 54 | * 55 | * @return YES to show the item, NO to exclude it. 56 | */ 57 | - (BOOL)itemsViewController:(BOXItemsViewController *)itemsViewController shouldShowItem:(BOXItem *)item; 58 | 59 | /** 60 | * By default, all items will be enabled to be selected by the user. 61 | * Implement to disable some items from being shown. 62 | * 63 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 64 | * @param item The item to enable or disable. 65 | * 66 | * @return YES to allow the item to be selected. NO otherwise. 67 | */ 68 | - (BOOL)itemsViewController:(BOXItemsViewController *)itemsViewController shouldEnableItem:(BOXItem *)item; 69 | 70 | /** 71 | * Override this method to enable or disable item sorting. This method sorts BOX folder item results for display. 72 | * By default, items will be sorted. 73 | * 74 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 75 | * 76 | * @return YES to enable sorting (enabled by default). The default sort applied is: 77 | * 1) Folders listed before files and weblinks 78 | * 2) By modified date descending 79 | * 3) Alpha-numeric ascending. 80 | * You can also implement itemsViewController:compareForSortingItem:toItem: for custom sorting. 81 | * 82 | * @return NO to disable sorting. 83 | */ 84 | - (BOOL)itemsViewControllerShouldSortItems:(BOXItemsViewController *)itemsViewController; 85 | 86 | /** 87 | * Implement this if you want to customize the sort order of items. By default items will be sorted with the following ordered rules: 88 | * - Folders come before files and weblinks. 89 | * - Most recently modified items come first. 90 | * - Alphabetical. 91 | * 92 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 93 | * @param itemA Item to compare. 94 | * @param itemB Item to compare. 95 | * 96 | * @return Return NSOrderedAscending to have itemA displayed before itemB. Return NSOrderedDescending to have itemB displayed before itemA. 97 | */ 98 | - (NSComparisonResult)itemsViewController:(BOXItemsViewController *)itemsViewController compareForSortingItem:(BOXItem *)itemA toItem:(BOXItem *)itemB; 99 | 100 | /** 101 | * The user tapped on a Folder from the list. 102 | * 103 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 104 | * @param folder The folder the user selected. 105 | * @param items The list of items that the tap occured from. The array will include the tapped item itself. 106 | */ 107 | - (void)itemsViewController:(BOXItemsViewController *)itemsViewController didTapFolder:(BOXFolder *)folder inItems:(NSArray *)items; 108 | 109 | /** 110 | * The user tapped on a File from the list. 111 | * 112 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 113 | * @param file The file the user selected. 114 | * @param items The list of items that the tap occured from. The array will include the tapped item itself. 115 | */ 116 | - (void)itemsViewController:(BOXItemsViewController *)itemsViewController didTapFile:(BOXFile *)file inItems:(NSArray *)items; 117 | 118 | /** 119 | * The user tapped on a Bookmark from the list. 120 | * 121 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 122 | * @param bookmark The bookmark the user selected. 123 | * @param items The list of items that the tap occured from. The array will include the tapped item itself. 124 | */ 125 | - (void)itemsViewController:(BOXItemsViewController *)itemsViewController didTapBookmark:(BOXBookmark *)bookmark inItems:(NSArray *)items; 126 | 127 | /** 128 | * 129 | * Close button was tapped. If not implemented, the navigation controller will be dismissed. 130 | * 131 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 132 | */ 133 | - (void)itemsViewControllerDidTapCloseButtton:(BOXItemsViewController *)itemsViewController; 134 | 135 | /** 136 | * Implement to control whether the user should be navigated to a folder. 137 | * 138 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 139 | * @param folder The folder that the user would be navigated to. 140 | * 141 | * @return YES to allow the navigation to proceed, false otherwise. 142 | */ 143 | - (BOOL)itemsViewController:(BOXItemsViewController *)itemsViewController willNavigateToFolder:(BOXFolder *)folder; 144 | 145 | /** 146 | * 147 | * Whether or not to show a 'Close' button in the navigation bar. By default, the button will be shown and 148 | * will dismiss the host UINavigationController when tapped. 149 | * 150 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 151 | * 152 | * @return YES to show the button, NO otherwise. 153 | */ 154 | - (BOOL)itemsViewControllerShouldShowCloseButton:(BOXItemsViewController *)itemsViewController; 155 | 156 | /** 157 | * A custom title for the Close button used to dismiss the view controller 158 | * By default, the title is "Close". 159 | * 160 | * @param itemsViewController The instance of BOXItemsViewController calling this method. 161 | * @return The string to be displayed for the button. 162 | */ 163 | - (NSString *)itemsViewControllerCloseButtonTitle:(BOXItemsViewController *)itemsViewController; 164 | 165 | @end 166 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXItemsViewController.m: -------------------------------------------------------------------------------- 1 | /// 2 | // BOXItemsViewControllerTableViewController.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/2/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXItemsViewController.h" 10 | #import "BOXItemCell.h" 11 | #import "BOXFolderViewController.h" 12 | #import "BOXItem+BOXBrowseSDKAdditions.h" 13 | 14 | @interface BOXItemsViewController () 15 | 16 | @property (nonatomic, readwrite, strong) NSArray *items; 17 | @property (nonatomic, readwrite, assign) BOOL authenticationAttempted; 18 | 19 | @end 20 | 21 | @implementation BOXItemsViewController 22 | 23 | - (instancetype)initWithContentClient:(BOXContentClient *)contentClient 24 | { 25 | if (self = [super init]) { 26 | _contentClient = contentClient; 27 | } 28 | return self; 29 | } 30 | 31 | - (void)fetchItemsWithCompletion:(void (^)(NSArray *items, BOOL fromCache, NSError *error))completion 32 | { 33 | BOXAbstract(); 34 | } 35 | 36 | - (void)viewDidLoad { 37 | [super viewDidLoad]; 38 | 39 | self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; // eliminate extra separators 40 | self.tableView.separatorColor = [UIColor colorWithWhite:244.0f/255.0f alpha:1.0f]; 41 | 42 | [self setupNavigationBar]; 43 | [self installRefreshControl]; 44 | } 45 | 46 | -(void)installRefreshControl 47 | { 48 | self.refreshControl = [[UIRefreshControl alloc] init]; 49 | [self.refreshControl addTarget:self action:@selector(refresh) forControlEvents:UIControlEventValueChanged]; 50 | } 51 | 52 | - (void)viewWillAppear:(BOOL)animated 53 | { 54 | [super viewWillAppear:animated]; 55 | // We only want to display the authentication screen if : 56 | // - the user is not using app users (the contentClient's accessTokenDelegate is nil) 57 | // - the user is not logged in (the contentClient's user is nil) 58 | // - we did not present the authentication screen already. 59 | if (self.contentClient.user == nil && self.contentClient.accessTokenDelegate == nil && self.authenticationAttempted == NO) { 60 | 61 | BOXAuthorizationViewController *authViewController = [[BOXAuthorizationViewController alloc] initWithSDKClient:self.contentClient completionBlock:^(BOXAuthorizationViewController *authorizationViewController, BOXUser *user, NSError *error) { 62 | [authorizationViewController dismissViewControllerAnimated:YES completion:^{ 63 | [self refresh]; 64 | }]; 65 | } cancelBlock:^(BOXAuthorizationViewController *authorizationViewController) { 66 | [authorizationViewController dismissViewControllerAnimated:YES completion:^{ 67 | [self dismissViewControllerAnimated:YES completion:nil]; 68 | }]; 69 | }]; 70 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:authViewController]; 71 | [self presentViewController:navigationController animated:YES completion:nil]; 72 | self.authenticationAttempted = YES; 73 | } else { 74 | [self refresh]; 75 | } 76 | 77 | } 78 | 79 | #pragma mark - Table view data source 80 | 81 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 82 | return 1; 83 | } 84 | 85 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 86 | return self.items.count; 87 | } 88 | 89 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 90 | return BOXItemCellHeight; 91 | } 92 | 93 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 94 | { 95 | BOXItem *item = [self.items objectAtIndex:indexPath.row]; 96 | 97 | BOXItemCell *cell = [tableView dequeueReusableCellWithIdentifier:@"box-item-cell"]; 98 | if (cell == nil) { 99 | cell = [[BOXItemCell alloc] initWithContentClient:self.contentClient style:UITableViewCellStyleSubtitle reuseIdentifier:@"box-item-cell"]; 100 | } 101 | 102 | cell.item = item; 103 | 104 | if ([self.delegate respondsToSelector:@selector(itemsViewController:shouldEnableItem:)]) { 105 | cell.enabled = [self.delegate itemsViewController:self shouldEnableItem:item]; 106 | } else { 107 | cell.enabled = YES; 108 | } 109 | 110 | return cell; 111 | } 112 | 113 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 114 | { 115 | // Folder 116 | BOXItem *item = [self itemForRowAtIndexPath:indexPath]; 117 | if (item.isFolder) { 118 | BOXFolder *folder = (BOXFolder *)item; 119 | if ([self.delegate respondsToSelector:@selector(itemsViewController:didTapFolder:inItems:)]) { 120 | [self.delegate itemsViewController:self didTapFolder:folder inItems:self.items]; 121 | } 122 | } 123 | 124 | // File 125 | else if (item.isFile) { 126 | BOXFile *file = (BOXFile *)item; 127 | if ([self.delegate respondsToSelector:@selector(itemsViewController:didTapFile:inItems:)]) { 128 | [self.delegate itemsViewController:self didTapFile:file inItems:self.items]; 129 | } 130 | } 131 | 132 | // Bookmark 133 | else if (item.isBookmark) { 134 | BOXBookmark *bookmark = (BOXBookmark *)item; 135 | if ([self.delegate respondsToSelector:@selector(itemsViewController:didTapBookmark:inItems:)]) { 136 | [self.delegate itemsViewController:self didTapBookmark:bookmark inItems:self.items]; 137 | } 138 | } 139 | } 140 | 141 | - (BOXItem *)itemForRowAtIndexPath:(NSIndexPath *)indexPath 142 | { 143 | if (self.items.count <= indexPath.row) { 144 | return nil; 145 | } 146 | 147 | return (BOXItem *)[self.items objectAtIndex:indexPath.row]; 148 | } 149 | 150 | #pragma mark - Navbar 151 | 152 | - (void)setupNavigationBar 153 | { 154 | // Close Button 155 | BOOL shouldShowCloseButton = YES; 156 | if ([self.delegate respondsToSelector:@selector(itemsViewControllerShouldShowCloseButton:)]) { 157 | shouldShowCloseButton = [self.delegate itemsViewControllerShouldShowCloseButton:self]; 158 | } 159 | 160 | if (shouldShowCloseButton) { 161 | 162 | NSString *closeButtonTitle = nil; 163 | if ([self.delegate respondsToSelector:@selector(itemsViewControllerCloseButtonTitle:)]) { 164 | closeButtonTitle = [self.delegate itemsViewControllerCloseButtonTitle:self]; 165 | } else { 166 | closeButtonTitle = NSLocalizedString(@"Close", @"Label: Close action, often used on buttons"); 167 | } 168 | 169 | UIBarButtonItem *closeBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:closeButtonTitle 170 | style:UIBarButtonItemStylePlain 171 | target:self 172 | action:@selector(closeButtonAction:)]; 173 | [closeBarButtonItem setTitlePositionAdjustment:UIOffsetMake(0.0, 1) 174 | forBarMetrics:UIBarMetricsDefault]; 175 | self.navigationItem.rightBarButtonItem = closeBarButtonItem; 176 | } 177 | } 178 | 179 | - (void)closeButtonAction:(id)sender 180 | { 181 | if ([self.delegate respondsToSelector:@selector(itemsViewControllerDidTapCloseButtton:)]) { 182 | [self.delegate itemsViewControllerDidTapCloseButtton:self]; 183 | } else { 184 | [[self navigationController] dismissViewControllerAnimated:YES completion:NULL]; 185 | } 186 | } 187 | 188 | #pragma mark - data 189 | 190 | - (void)refresh 191 | { 192 | [self fetchItemsWithCompletion:^(NSArray *items, BOOL fromCache, NSError *error) { 193 | if (items && !error) { 194 | items = [self filterItems:items]; 195 | BOOL shouldSort = YES; 196 | 197 | if ([self.delegate respondsToSelector:@selector(itemsViewControllerShouldSortItems:)]) { 198 | shouldSort = [self.delegate itemsViewControllerShouldSortItems:self]; 199 | } 200 | 201 | if (shouldSort) { 202 | items = [self sortItems:items]; 203 | } 204 | 205 | if ([self shouldReloadTableViewWithNewItems:items]) { 206 | self.items = items; 207 | [self.tableView reloadData]; 208 | } 209 | [self.refreshControl endRefreshing]; 210 | } 211 | }]; 212 | } 213 | 214 | - (BOOL)shouldReloadTableViewWithNewItems:(NSArray *)newItems 215 | { 216 | if (self.items.count != newItems.count) { 217 | return YES; 218 | } else { 219 | for (NSUInteger i = 0; i < self.items.count; i++) { 220 | BOXItem *originalItem = self.items[i]; 221 | BOXItem *newItem = newItems[i]; 222 | 223 | if (![originalItem.name isEqualToString:newItem.name]) { 224 | return YES; 225 | } 226 | 227 | if (originalItem.isFile) { 228 | if (!newItem.isFile) { 229 | return YES; 230 | } else { 231 | BOXFile *originalFile = (BOXFile *)originalItem; 232 | BOXFile *newFile = (BOXFile *)newItem; 233 | 234 | if (![originalFile.SHA1 isEqualToString:newFile.SHA1]) { 235 | return YES; 236 | } 237 | } 238 | } 239 | } 240 | } 241 | 242 | return NO; 243 | } 244 | 245 | - (NSArray *)sortItems:(NSArray *)items 246 | { 247 | NSArray *sortedItems = [items sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) 248 | { 249 | NSComparisonResult order = NSOrderedSame; 250 | BOXItem *itemA = (BOXItem*) obj1; 251 | BOXItem *itemB = (BOXItem*) obj2; 252 | 253 | if ([self.delegate respondsToSelector:@selector(itemsViewController:compareForSortingItem:toItem:)]) { 254 | order = [self.delegate itemsViewController:self compareForSortingItem:itemA toItem:itemB]; 255 | } else { 256 | // Folders come first 257 | if (itemA.isFolder && !itemB.isFolder) { 258 | order = NSOrderedAscending; 259 | } else if (!itemA.isFolder && itemB.isFolder) { 260 | order = NSOrderedDescending; 261 | 262 | // Then we go by date descending 263 | } else { 264 | order = [[itemB effectiveUpdateDate] compare:[itemA effectiveUpdateDate]]; 265 | } 266 | } 267 | 268 | // If still no order defined, do alphabetical 269 | if (order == NSOrderedSame) { 270 | order = [itemA.name compare:itemB.name options:NSCaseInsensitiveSearch]; 271 | } 272 | 273 | return order; 274 | }]; 275 | 276 | return sortedItems; 277 | } 278 | 279 | - (NSArray *)filterItems:(NSArray *)items 280 | { 281 | if ([self.delegate respondsToSelector:@selector(itemsViewController:shouldShowItem:)]) { 282 | NSArray *filteredArray = [items objectsAtIndexes:[items indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 283 | BOXItem *item = (BOXItem*) obj; 284 | return [self.delegate itemsViewController:self shouldShowItem:item]; 285 | }]]; 286 | return filteredArray; 287 | } else { 288 | return items; 289 | } 290 | } 291 | 292 | @end 293 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXSearchResultsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXSearchResultsViewController.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/3/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXItemsViewController.h" 10 | #import 11 | 12 | @interface BOXSearchResultsViewController : BOXItemsViewController 13 | 14 | - (void)performSearchForSearchString:(NSString *)searchString inFolderID:(NSString *)folderID; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Controllers/BOXSearchResultsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXSearchResultsViewController.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/3/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXSearchResultsViewController.h" 10 | #import "BOXFolderViewController.h" 11 | #import "BOXBrowseSDKConstants.h" 12 | 13 | @interface BOXSearchResultsViewController () 14 | 15 | @property (nonatomic, readwrite, strong) NSString *searchString; 16 | @property (nonatomic, readwrite, strong) NSString *folderID; 17 | @property (nonatomic, readwrite, strong) BOXSearchRequest *searchRequest; 18 | 19 | @end 20 | 21 | @implementation BOXSearchResultsViewController 22 | 23 | 24 | - (void)performSearchForSearchString:(NSString *)searchString inFolderID:(NSString *)folderID 25 | { 26 | self.searchString = searchString; 27 | self.folderID = folderID; 28 | [self refresh]; 29 | } 30 | 31 | -(void)installRefreshControl 32 | { 33 | // override to prevent the installation of the UIRefreshControl 34 | // which is causing IOS-16566 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [self.searchRequest cancel]; 40 | self.searchRequest = nil; 41 | } 42 | 43 | - (void)fetchItemsWithCompletion:(void (^)(NSArray *, BOOL fromCache, NSError *))completion 44 | { 45 | [self.searchRequest cancel]; 46 | 47 | self.searchRequest = [self.contentClient searchRequestWithQuery:self.searchString inRange:NSMakeRange(0, 1000)]; 48 | self.searchRequest.requestAllItemFields = YES; 49 | self.searchRequest.SDKIdentifier = BOX_BROWSE_SDK_IDENTIFIER; 50 | self.searchRequest.SDKVersion = BOX_BROWSE_SDK_VERSION; 51 | self.searchRequest.ancestorFolderIDs = @[self.folderID]; 52 | [self.searchRequest performRequestWithCompletion:^(NSArray *items, NSUInteger totalCount, NSRange range, NSError *error) { 53 | completion(items, NO, error); 54 | }]; 55 | } 56 | 57 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 58 | { 59 | [super tableView:tableView didSelectRowAtIndexPath:indexPath]; 60 | 61 | // Folder 62 | BOXItem *item = [self itemForRowAtIndexPath:indexPath]; 63 | if (item.isFolder) { 64 | BOXFolder *folder = (BOXFolder *)item; 65 | BOOL shouldNavigateToFolder = YES; 66 | if ([self.delegate respondsToSelector:@selector(itemsViewController:willNavigateToFolder:)]) { 67 | shouldNavigateToFolder = [self.delegate itemsViewController:self willNavigateToFolder:folder]; 68 | } 69 | if (shouldNavigateToFolder) { 70 | BOXFolderViewController *viewController = [[BOXFolderViewController alloc] initWithContentClient:self.contentClient folder:folder]; 71 | viewController.delegate = self.delegate; 72 | self.navigationItem.backBarButtonItem.title = folder.parentFolder.name; 73 | [self.presentingViewController.navigationController pushViewController:viewController animated:YES]; 74 | } 75 | } 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/DummyStrings.h: -------------------------------------------------------------------------------- 1 | // 2 | // DummyStrings.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/1/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DummyStrings : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/DummyStrings.m: -------------------------------------------------------------------------------- 1 | // 2 | // DummyStrings.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 4/1/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import "DummyStrings.h" 10 | 11 | @implementation DummyStrings 12 | 13 | - (void)nothing 14 | { 15 | NSLocalizedString(@"Creating folder. One moment please…", @"RenameViewController creating folder"); 16 | NSLocalizedString(@"A folder with the same name already exists.", 17 | @"Messsage: message for alert view shown when creating folder failed because a folder with the same name already exists"); 18 | NSLocalizedString(@"Dismiss", @"Label: Allow the user to dismiss the current view or interface, often used on buttons to dismiss alerts"); 19 | NSLocalizedString(@"Are you sure you want to change the file extension from “.%@” to “.%@”?", 20 | @"Rename action requesting confirmation on file extension change"); 21 | NSLocalizedString(@"Use .%@", @"Alert View button : Use new extension, eg:Use .txt"); 22 | NSLocalizedString(@"Keep .%@", @"Alert View button : Keep old extension, eg:Keep .txt"); 23 | NSLocalizedString(@"Warning", @"Title: Warning to alert the user that an issue has occurred"); 24 | 25 | NSLocalizedString(@"You do not have permission to rename this file.", 26 | @"Messsage: message shown alert view in when renaming file failed since user did not have the permission"); 27 | 28 | NSLocalizedString(@"Could Not Rename", @"Title: Title used when an error occurs while attempting to rename a file or folder."); 29 | NSLocalizedString(@"Dismiss", @"Label: Allow the user to dismiss the current view or interface, often used on buttons to dismiss alerts"); 30 | 31 | NSLocalizedString(@"Empty filename", @"Alert View Title : The file name is empty"); 32 | NSLocalizedString(@"Please enter a valid filename.", @"Alert View Description : The file name is empty"); 33 | 34 | NSLocalizedString(@"Please name your new folder.", @"Helping text displayed when creating a new folder"); 35 | NSLocalizedString(@"Please rename your folder.", @"Helping text displayed when renaming a folder"); 36 | NSLocalizedString(@"Please rename your file.", @"Helping text displayed when renaming a file"); 37 | 38 | NSLocalizedString(@"Folder Name", @"placeholder : the title of the folder about to be created"); 39 | NSLocalizedString(@"File Name", @"placeholder : the title of the file about to be renamed"); 40 | 41 | NSLocalizedString(@"Are you sure you want to delete this folder?", @"Confirmation title when deleting an item"); 42 | NSLocalizedString(@"Are you sure you want to delete this file?", @"Confirmation title when deleting an item"); 43 | } 44 | @end 45 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Helpers/BOXBrowseSDKFileTypeHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXBrowseSDKFileTypeHelper.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Clement Rousselle on 1/3/17. 6 | // Copyright © 2017 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BOXBrowseSDKFileTypeHelper : NSObject 12 | 13 | + (NSSet *)audioFileExtensions; 14 | + (NSSet *)imageFileExtensions; 15 | + (NSSet *)vectorImageFileExtensions; 16 | + (NSSet *)videoFileExtensions; 17 | + (NSSet *)docFileExtensions; 18 | + (NSSet *)codeFileExtensions; 19 | + (NSSet *)textFileExtensions; 20 | + (NSSet *)compressedFileExtensions; 21 | + (NSSet *)presentationFileExtensions; 22 | + (NSSet *)sheetFileExtensions; 23 | + (NSSet *)dbFileExtensions; 24 | + (NSSet *)iconFileExtensions; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Helpers/BOXBrowseSDKFileTypeHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXBrowseSDKFileTypeHelper.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Clement Rousselle on 1/3/17. 6 | // Copyright © 2017 BOX. All rights reserved. 7 | // 8 | 9 | #import "BOXBrowseSDKFileTypeHelper.h" 10 | 11 | @implementation BOXBrowseSDKFileTypeHelper 12 | 13 | + (NSSet *)audioFileExtensions 14 | { 15 | static NSSet *extensions = nil; 16 | 17 | if (extensions == nil) { 18 | extensions = [NSSet setWithObjects:@"aac", @"aiff", @"m3u", @"m4a", @"mid", @"mp3", @"wav", @"wpl", @"wma", @"amr", @"3gp", @"alac", @"flac", @"m4r", nil]; 19 | } 20 | 21 | return extensions; 22 | } 23 | 24 | + (NSSet *)imageFileExtensions 25 | { 26 | static NSSet *extensions = nil; 27 | 28 | if (extensions == nil) { 29 | extensions = [NSSet setWithObjects:@"bmp", @"dcm", @"gdraw", @"gif", @"jpeg", @"jpg", @"tiff", @"tif", @"png", @"heic", @"heif", nil]; 30 | } 31 | 32 | return extensions; 33 | } 34 | 35 | + (NSSet *)vectorImageFileExtensions 36 | { 37 | static NSSet *extensions = nil; 38 | 39 | if (extensions == nil) { 40 | extensions = [NSSet setWithObjects:@"eps", @"svg", nil]; 41 | } 42 | 43 | return extensions; 44 | } 45 | 46 | + (NSSet *)videoFileExtensions 47 | { 48 | static NSSet *extensions = nil; 49 | 50 | if (extensions == nil) { 51 | extensions = [NSSet setWithObjects:@"avi", @"flv", @"m4v", @"mov", @"mp4", @"mpeg", @"mpg", @"qt", @"wmv", @"mts", @"ogg", nil]; 52 | } 53 | 54 | return extensions; 55 | } 56 | 57 | + (NSSet *)docFileExtensions 58 | { 59 | static NSSet *extensions = nil; 60 | 61 | if (extensions == nil) { 62 | extensions = [NSSet setWithObjects:@"doc", @"docx", @"dot", @"dotx", @"gdoc", @"odt", @"ott", @"pages", @"rtf", @"rtfd", nil]; 63 | } 64 | 65 | return extensions; 66 | } 67 | 68 | + (NSSet *)codeFileExtensions 69 | { 70 | static NSSet *extensions = nil; 71 | 72 | if (extensions == nil) { 73 | extensions = [NSSet setWithObjects:@"aspx", @"h", @"c", @"c++", @"cpp", @"m", @"css", @"htm", @"html", @"java", @"js", @"php", @"scala", @"webba", @"xhtml", @"xml", nil]; 74 | } 75 | 76 | return extensions; 77 | } 78 | 79 | + (NSSet *)textFileExtensions 80 | { 81 | static NSSet *extensions = nil; 82 | 83 | if (extensions == nil) { 84 | extensions = [NSSet setWithObjects:@"markdown", @"md", @"mdown", @"txt", @"text", nil]; 85 | } 86 | 87 | return extensions; 88 | } 89 | 90 | + (NSSet *)compressedFileExtensions 91 | { 92 | static NSSet *extensions = nil; 93 | 94 | if (extensions == nil) { 95 | extensions = [NSSet setWithObjects:@"rar", @"zip", @"gz", @"tgz", nil]; 96 | } 97 | 98 | return extensions; 99 | } 100 | 101 | + (NSSet *)presentationFileExtensions 102 | { 103 | static NSSet *extensions = nil; 104 | 105 | if (extensions == nil) { 106 | extensions = [NSSet setWithObjects:@"gslide", @"gslides", @"key", @"keynote", @"opd", @"otp", @"pot", @"potx", @"ppt", @"pptx", nil]; 107 | } 108 | 109 | return extensions; 110 | } 111 | 112 | + (NSSet *)sheetFileExtensions 113 | { 114 | static NSSet *extensions = nil; 115 | 116 | if (extensions == nil) { 117 | extensions = [NSSet setWithObjects:@"csv", @"gsheet", @"numbers", @"ods", @"ots", @"xls", @"xlsx", @"xlt", @"xltx", nil]; 118 | } 119 | 120 | return extensions; 121 | } 122 | 123 | + (NSSet *)dbFileExtensions 124 | { 125 | static NSSet *extensions = nil; 126 | 127 | if (extensions == nil) { 128 | extensions = [NSSet setWithObjects:@"db", @"sql", @"sqlite", nil]; 129 | } 130 | return extensions; 131 | } 132 | 133 | + (NSSet *)iconFileExtensions 134 | { 135 | static NSSet *extensions = nil; 136 | 137 | if (extensions == nil) { 138 | extensions = [NSSet setWithObjects:@"ico", @"icns", nil]; 139 | } 140 | return extensions; 141 | } 142 | 143 | @end 144 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Helpers/BOXBrowseSDKResourceLocator.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXBrowseSDKResourceLocator.h 3 | // Pods 4 | // 5 | // Created by Andrew Dempsey on 12/29/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * In order for NSBundle+BOXBrowseSDKAdditions to find the right resource 13 | bundle for Box Browse SDK, we need to use NSBundle's -bundleForClass to 14 | reliably find the correct filepath to Browse SDK's resource bundle. Since 15 | iOS 8 and the inclusion of dynamic frameworks, the way that 3rd party resource 16 | bundles are structured within dynamic frameworks has changed. Using this dummy 17 | class is the recommended way by Apple to locate the correct resource bundle 18 | for a given dynamic framework or independent resource bundle. 19 | */ 20 | @interface BOXBrowseSDKResourceLocator : NSObject 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Helpers/BOXBrowseSDKResourceLocator.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXBrowseSDKResourceLocator.m 3 | // Pods 4 | // 5 | // Created by Andrew Dempsey on 12/29/15. 6 | // 7 | // 8 | 9 | #import "BOXBrowseSDKResourceLocator.h" 10 | 11 | @implementation BOXBrowseSDKResourceLocator 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Views/Cells/BOXItemCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // BOXItemCell.h 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/30/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class BOXItem; 13 | 14 | extern CGFloat const BOXItemCellHeight; 15 | 16 | @interface BOXItemCell : UITableViewCell 17 | 18 | - (id)initWithContentClient:(BOXContentClient *)contentClient 19 | style:(UITableViewCellStyle)style 20 | reuseIdentifier:(NSString *)reuseIdentifier; 21 | 22 | @property (nonatomic, readwrite, strong) BOXItem *item; 23 | @property (nonatomic, readwrite, assign) BOOL enabled; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDK/Views/Cells/BOXItemCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // BOXItemCell.m 3 | // BoxBrowseSDK 4 | // 5 | // Created by Rico Yao on 3/30/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import BoxContentSDK; 10 | @import Masonry; 11 | 12 | #import "BOXItemCell.h" 13 | #import 14 | #import "BOXThumbnailCache.h" 15 | #import "UIImage+BOXBrowseSDKAdditions.h" 16 | #import "BOXItem+BOXBrowseSDKAdditions.h" 17 | 18 | long long const BOX_BROWSE_SDK_KILOBYTE = 1024; 19 | long long const BOX_BROWSE_SDK_MEGABYTE = BOX_BROWSE_SDK_KILOBYTE * 1024; 20 | long long const BOX_BROWSE_SDK_GIGABYTE = BOX_BROWSE_SDK_MEGABYTE * 1024; 21 | long long const BOX_BROWSE_SDK_TERABYTE = BOX_BROWSE_SDK_GIGABYTE * 1024; 22 | 23 | CGFloat const BOXItemCellHeight = 60.0f; 24 | 25 | #define CELL_TITLE_LABEL_HEIGHT 20.0f 26 | #define CELL_SUBTITLE_LABEL_HEIGHT 17.0f 27 | 28 | #define CELL_ELEMENT_OFFSET 5.0f 29 | 30 | #define kDisabledAlphaValue 0.3f 31 | 32 | #define kTextLabelColorEnabled [UIColor colorWithWhite:86.0f/255.0f alpha:1.0] 33 | #define kTextLabelColorDisabled [UIColor colorWithWhite:86.0f/255.0f alpha:0.3] 34 | 35 | #define kDetailTextLabelColorEnabled [UIColor colorWithWhite:174.0f/255.0f alpha:1.0] 36 | #define kDetailTextLabelColorDisabled [UIColor colorWithWhite:174.0f/255.0f alpha:0.3] 37 | 38 | @interface BOXItemCell () 39 | 40 | @property (nonatomic, readonly, strong) BOXContentClient *contentClient; 41 | @property (nonatomic) BOXFileThumbnailRequest *thumbnailRequest; 42 | 43 | @property (nonatomic, readwrite, strong) UIImageView *thumbnailImageView; 44 | @property (nonatomic, readwrite, strong) UILabel *titleLabel; 45 | @property (nonatomic, readwrite, strong) UILabel *descriptionLabel; 46 | @end 47 | 48 | @implementation BOXItemCell 49 | 50 | - (id)initWithContentClient:(BOXContentClient *)contentClient 51 | style:(UITableViewCellStyle)style 52 | reuseIdentifier:(NSString *)reuseIdentifier 53 | { 54 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 55 | _contentClient = contentClient; 56 | 57 | [self addSubview:self.thumbnailImageView]; 58 | [self addSubview:self.titleLabel]; 59 | [self addSubview:self.descriptionLabel]; 60 | 61 | [self createConstraints]; 62 | } 63 | 64 | return self; 65 | } 66 | 67 | - (UIImageView *)thumbnailImageView 68 | { 69 | if (_thumbnailImageView == nil) { 70 | _thumbnailImageView = [UIImageView new]; 71 | _thumbnailImageView.contentMode = UIViewContentModeCenter; 72 | } 73 | return _thumbnailImageView; 74 | } 75 | 76 | - (UILabel *)titleLabel 77 | { 78 | if (_titleLabel == nil) { 79 | _titleLabel = [UILabel new]; 80 | _titleLabel.font = [UIFont systemFontOfSize:17.0f]; 81 | _titleLabel.textColor = kTextLabelColorEnabled; 82 | _titleLabel.textAlignment = NSTextAlignmentLeft; 83 | } 84 | return _titleLabel; 85 | } 86 | 87 | - (UILabel *)descriptionLabel 88 | { 89 | if (_descriptionLabel == nil) { 90 | _descriptionLabel = [UILabel new]; 91 | _descriptionLabel.font = [UIFont systemFontOfSize:13.0f]; 92 | _descriptionLabel.textColor = kDetailTextLabelColorEnabled; 93 | _descriptionLabel.textAlignment = NSTextAlignmentLeft; 94 | } 95 | return _descriptionLabel; 96 | } 97 | 98 | - (void)createConstraints 99 | { 100 | [self.thumbnailImageView mas_makeConstraints:^(MASConstraintMaker *make) { 101 | make.left.equalTo(self); 102 | make.top.equalTo(self).offset(CELL_ELEMENT_OFFSET); 103 | make.height.equalTo(self).offset(-2.0f * CELL_ELEMENT_OFFSET); 104 | make.width.equalTo(self.mas_height); 105 | }]; 106 | 107 | [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { 108 | make.left.equalTo(self.thumbnailImageView.mas_right).offset(2.0f * CELL_ELEMENT_OFFSET); 109 | make.right.equalTo(self); 110 | make.bottom.equalTo(self.mas_centerY); 111 | make.height.equalTo(@(CELL_TITLE_LABEL_HEIGHT)); 112 | }]; 113 | 114 | [self.descriptionLabel mas_makeConstraints:^(MASConstraintMaker *make) { 115 | make.left.right.equalTo(self.titleLabel); 116 | make.top.equalTo(self.mas_centerY); 117 | make.height.equalTo(@(CELL_SUBTITLE_LABEL_HEIGHT)); 118 | }]; 119 | } 120 | 121 | - (void)prepareForReuse 122 | { 123 | [super prepareForReuse]; 124 | 125 | [self.thumbnailRequest cancel]; 126 | self.thumbnailRequest = nil; 127 | _item = nil; 128 | } 129 | 130 | 131 | // Cell separators get inset without this. 132 | - (UIEdgeInsets)layoutMargins 133 | { 134 | return UIEdgeInsetsZero; 135 | } 136 | 137 | - (void)setItem:(BOXItem *)item 138 | { 139 | _item = item; 140 | 141 | // Name 142 | self.titleLabel.text = item.name; 143 | 144 | // Description 145 | NSString *description = nil; 146 | if (item.isBookmark) { 147 | description = ((BOXBookmark *) item).URL.absoluteString; 148 | } else { 149 | description = [NSString stringWithFormat:@"%@, %@", [self displaySizeForItem:item], [self displayDateForItem:item]]; 150 | } 151 | self.descriptionLabel.text = description; 152 | 153 | 154 | __weak BOXItemCell *me = self; 155 | void (^imageSetBlock)(UIImage *image, UIViewContentMode contentMode) = ^void(UIImage *image, UIViewContentMode contentMode) { 156 | me.thumbnailImageView.image = image; 157 | me.thumbnailImageView.contentMode = contentMode; 158 | }; 159 | 160 | 161 | // Icon / thumbnail 162 | if ([self shouldShowThumbnailForItem:self.item] && item.isFile) { 163 | __block BOXFile *file = (BOXFile *)item; 164 | __weak BOXItemCell *me = self; 165 | BOXThumbnailCache *thumbnailCache = [BOXThumbnailCache sharedInstanceForContentClient:self.contentClient]; 166 | BOXThumbnailSize thumbnailSize = BOXThumbnailSize128; 167 | 168 | if ([thumbnailCache hasThumbnailInCacheForFile:file size:thumbnailSize]) { 169 | self.thumbnailRequest = [thumbnailCache fetchThumbnailForFile:file size:BOXThumbnailSize128 completion:^(UIImage *image, NSError *error) { 170 | if ([me.item.modelID isEqualToString:file.modelID]) { 171 | dispatch_async(dispatch_get_main_queue(), ^{ 172 | imageSetBlock(image, UIViewContentModeScaleAspectFit); 173 | }); 174 | } 175 | }]; 176 | } else { 177 | imageSetBlock([UIImage box_iconForItem:item], UIViewContentModeCenter); 178 | 179 | self.thumbnailRequest = [thumbnailCache fetchThumbnailForFile:file size:BOXThumbnailSize128 completion:^(UIImage *image, NSError *error) { 180 | if (error == nil) { 181 | if ([me.item.modelID isEqualToString:file.modelID]) { 182 | imageSetBlock(image, UIViewContentModeScaleAspectFit); 183 | CATransition *transition = [CATransition animation]; 184 | transition.duration = 0.3f; 185 | transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 186 | transition.type = kCATransitionFade; 187 | [me.thumbnailImageView.layer addAnimation:transition forKey:nil]; 188 | } 189 | } 190 | }]; 191 | } 192 | } else { 193 | imageSetBlock([UIImage box_iconForItem:item], UIViewContentModeCenter); 194 | } 195 | } 196 | 197 | - (void)setEnabled:(BOOL)enabled 198 | { 199 | if (enabled) { 200 | self.userInteractionEnabled = YES; 201 | self.thumbnailImageView.alpha = 1.0f; 202 | self.titleLabel.textColor = kTextLabelColorEnabled; 203 | self.descriptionLabel.textColor = kDetailTextLabelColorEnabled; 204 | } else { 205 | self.userInteractionEnabled = NO; 206 | self.thumbnailImageView.alpha = kDisabledAlphaValue; 207 | self.titleLabel.textColor = kTextLabelColorDisabled; 208 | self.descriptionLabel.textColor = kDetailTextLabelColorDisabled; 209 | } 210 | } 211 | 212 | - (NSString *)displaySizeForItem:(BOXItem *)item 213 | { 214 | NSString * result_str = nil; 215 | long long fileSize = [item.size longLongValue]; 216 | 217 | if (fileSize >= BOX_BROWSE_SDK_TERABYTE) 218 | { 219 | double dSize = fileSize / (double)BOX_BROWSE_SDK_TERABYTE; 220 | result_str = [NSString stringWithFormat:NSLocalizedString(@"%1.1f TB", @"File size in terabytes (example: 1 TB)"), dSize]; 221 | } 222 | else if (fileSize >= BOX_BROWSE_SDK_GIGABYTE) 223 | { 224 | double dSize = fileSize / (double)BOX_BROWSE_SDK_GIGABYTE; 225 | result_str = [NSString stringWithFormat:NSLocalizedString(@"%1.1f GB", @"File size in gigabytes (example: 1 GB)"), dSize]; 226 | } 227 | else if (fileSize >= BOX_BROWSE_SDK_MEGABYTE) 228 | { 229 | double dSize = fileSize / (double)BOX_BROWSE_SDK_MEGABYTE; 230 | result_str = [NSString stringWithFormat:NSLocalizedString(@"%1.1f MB", @"File size in megabytes (example: 1 MB)"), dSize]; 231 | } 232 | else if (fileSize >= BOX_BROWSE_SDK_KILOBYTE) 233 | { 234 | double dSize = fileSize / (double)BOX_BROWSE_SDK_KILOBYTE; 235 | result_str = [NSString stringWithFormat:NSLocalizedString(@"%1.1f KB", @"File size in kilobytes (example: 1 KB)"), dSize]; 236 | } 237 | else if(fileSize > 0) 238 | { 239 | result_str = [NSString stringWithFormat:NSLocalizedString(@"%1.1f B", @"File size in bytes (example: 1 B)"), fileSize]; 240 | } 241 | else 242 | { 243 | result_str = [NSString stringWithFormat:NSLocalizedString(@"%1.1f B", @"File size in bytes (example: 1 B)"), 0]; 244 | } 245 | 246 | return result_str; 247 | } 248 | 249 | - (NSString *)displayDateForItem:(BOXItem *)item 250 | { 251 | NSString *dateString = [NSDateFormatter localizedStringFromDate:[item effectiveUpdateDate] 252 | dateStyle:NSDateFormatterShortStyle 253 | timeStyle:NSDateFormatterShortStyle]; 254 | return dateString; 255 | } 256 | 257 | - (NSString *)UTIFromFilePath:(NSString *)filePath 258 | { 259 | CFStringRef fileExtension = (__bridge CFStringRef) [filePath box_pathExtensionAccountingForMultipleExtensionsAndEmptyName]; 260 | CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension, NULL); 261 | NSString *strUTI = (__bridge_transfer NSString *)UTI; 262 | 263 | if(!strUTI) { 264 | return @"public.item"; 265 | } 266 | 267 | return strUTI; 268 | } 269 | 270 | - (BOOL)UTI:(NSString *)UTI ConformsToUTI:(NSString *)anotherUTI 271 | { 272 | CFStringRef UTIself = (__bridge CFStringRef) UTI; 273 | CFStringRef UTIother = (__bridge CFStringRef) anotherUTI; 274 | 275 | return UTTypeConformsTo(UTIself, UTIother); 276 | } 277 | 278 | - (BOOL)shouldShowThumbnailForItem:(BOXItem *)item 279 | { 280 | if (!item.isFile) { 281 | return NO; 282 | } else { 283 | return ([self UTI:[self UTIFromFilePath:item.name] ConformsToUTI:@"public.image"] || 284 | [[item.name pathExtension] caseInsensitiveCompare:@"dcm"] == NSOrderedSame); 285 | } 286 | } 287 | 288 | @end 289 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDKFramework/BoxBrowseSDKFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // BoxBrowseSDKFramework.h 3 | // BoxBrowseSDKFramework 4 | // 5 | // Created by Scott Liu on 2/10/17. 6 | // Copyright © 2017 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for BoxBrowseSDKFramework. 12 | FOUNDATION_EXPORT double BoxBrowseSDKFrameworkVersionNumber; 13 | 14 | //! Project version string for BoxBrowseSDKFramework. 15 | FOUNDATION_EXPORT const unsigned char BoxBrowseSDKFrameworkVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDKFramework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BoxBrowseSDK/BoxBrowseSDKTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | NSHumanReadableCopyright 24 | Copyright © 2015 BOX. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/audio.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "audio.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/audio.imageset/audio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/audio.imageset/audio.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/audio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/audio.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/boxnote.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "boxnote.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/boxnote.imageset/boxnote.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/boxnote.imageset/boxnote.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/boxnote.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/boxnote.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/code.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "code.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/code.imageset/code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/code.imageset/code.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/code.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/database.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "database.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/database.imageset/database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/database.imageset/database.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/database.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/document.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "document.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/document.imageset/document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/document.imageset/document.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/document.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/excel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "excel.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/excel.imageset/excel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/excel.imageset/excel.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/excel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/excel.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/external_folder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "external_folder.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/external_folder.imageset/external_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/external_folder.imageset/external_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/external_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/external_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/generic.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "generic.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/generic.imageset/generic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/generic.imageset/generic.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/generic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/generic.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/ic_box_browsesdk_photoshop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/ic_box_browsesdk_photoshop.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/ic_box_browsesdk_presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/ic_box_browsesdk_presentation.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/illustrator.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "illustrator.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/illustrator.imageset/illustrator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/illustrator.imageset/illustrator.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/illustrator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/illustrator.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/image.imageset/image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/image.imageset/image.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/image.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/inDesign.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "inDesign.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/inDesign.imageset/inDesign.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/inDesign.imageset/inDesign.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/inDesign.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/inDesign.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/link.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "link.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/link.imageset/link.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/link.imageset/link.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/link.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/link.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/lock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lock.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/lock.imageset/lock.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/lock.imageset/lock.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/lock.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/lock.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/pdf.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "pdf.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/pdf.imageset/pdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/pdf.imageset/pdf.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/pdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/pdf.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/personal_folder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "personal_folder.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/personal_folder.imageset/personal_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/personal_folder.imageset/personal_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/personal_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/personal_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/photoshop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_box_browsesdk_photoshop.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/photoshop.imageset/ic_box_browsesdk_photoshop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/photoshop.imageset/ic_box_browsesdk_photoshop.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/powerpoint.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "powerpoint.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/powerpoint.imageset/powerpoint.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/powerpoint.imageset/powerpoint.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/powerpoint.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/powerpoint.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/presentation.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_box_browsesdk_presentation.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/presentation.imageset/ic_box_browsesdk_presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/presentation.imageset/ic_box_browsesdk_presentation.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/shared_folder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "shared_folder.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/shared_folder.imageset/shared_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/shared_folder.imageset/shared_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/shared_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/shared_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/sketch.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sketch.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/sketch.imageset/sketch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/sketch.imageset/sketch.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/sketch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/sketch.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_audio.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_audio.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_audio.imageset/small_audio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_audio.imageset/small_audio.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_audio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_audio.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_boxnote.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_boxnote.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_boxnote.imageset/small_boxnote.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_boxnote.imageset/small_boxnote.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_boxnote.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_boxnote.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_code.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_code.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_code.imageset/small_code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_code.imageset/small_code.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_code.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_database.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_database.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_database.imageset/small_database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_database.imageset/small_database.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_database.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_database.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_document.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_document.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_document.imageset/small_document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_document.imageset/small_document.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_document.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_excel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_excel.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_excel.imageset/small_excel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_excel.imageset/small_excel.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_excel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_excel.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_external_folder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_external_folder.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_external_folder.imageset/small_external_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_external_folder.imageset/small_external_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_external_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_external_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_generic.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_generic.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_generic.imageset/small_generic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_generic.imageset/small_generic.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_generic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_generic.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_illustrator.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_illustrator.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_illustrator.imageset/small_illustrator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_illustrator.imageset/small_illustrator.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_illustrator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_illustrator.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_image.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_image.imageset/small_image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_image.imageset/small_image.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_image.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_inDesign.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_inDesign.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_inDesign.imageset/small_inDesign.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_inDesign.imageset/small_inDesign.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_inDesign.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_inDesign.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_link.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_link.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_link.imageset/small_link.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_link.imageset/small_link.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_link.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_link.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_lock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_lock.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_lock.imageset/small_lock.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_lock.imageset/small_lock.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_lock.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_lock.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_pdf.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_pdf.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_pdf.imageset/small_pdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_pdf.imageset/small_pdf.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_pdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_pdf.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_personal_folder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_personal_folder.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_personal_folder.imageset/small_personal_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_personal_folder.imageset/small_personal_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_personal_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_personal_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_powerpoint.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_powerpoint.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_powerpoint.imageset/small_powerpoint.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_powerpoint.imageset/small_powerpoint.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_powerpoint.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_powerpoint.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_presentation.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_presentation.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_presentation.imageset/small_presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_presentation.imageset/small_presentation.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_shared_folder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_shared_folder.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_shared_folder.imageset/small_shared_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_shared_folder.imageset/small_shared_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_shared_folder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_shared_folder.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_sketch.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_sketch.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_sketch.imageset/small_sketch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_sketch.imageset/small_sketch.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_sketch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_sketch.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_spreadsheet.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_spreadsheet.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_spreadsheet.imageset/small_spreadsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_spreadsheet.imageset/small_spreadsheet.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_spreadsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_spreadsheet.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_text.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_text.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_text.imageset/small_text.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_text.imageset/small_text.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_text.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_text.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_vector.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_vector.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_vector.imageset/small_vector.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_vector.imageset/small_vector.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_vector.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_vector.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_video.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_video.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_video.imageset/small_video.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_video.imageset/small_video.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_video.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_video.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_zip.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "small_zip.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_zip.imageset/small_zip.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_zip.imageset/small_zip.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/small_zip.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/small_zip.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/spreadsheet.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "spreadsheet.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/spreadsheet.imageset/spreadsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/spreadsheet.imageset/spreadsheet.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/spreadsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/spreadsheet.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/text.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "text.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/text.imageset/text.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/text.imageset/text.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/text.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/text.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/vector.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "vector.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/vector.imageset/vector.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/vector.imageset/vector.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/vector.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/vector.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/video.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "video.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/video.imageset/video.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/video.imageset/video.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/video.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/video.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/word.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "word.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/word.imageset/word.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/word.imageset/word.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/word.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/word.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/zip.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "zip.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/zip.imageset/zip.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/zip.imageset/zip.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/Resource/icons.xcassets/zip.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/box/box-ios-browse-sdk/HEAD/BoxBrowseSDK/Resource/icons.xcassets/zip.pdf -------------------------------------------------------------------------------- /BoxBrowseSDK/build-phases/copy-products.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is intended to copy products to the Carthage build directory, 4 | # only in the case that we're building directly from Xcode. Otherwise, we 5 | # just let Carthage do it. 6 | # We insist on input files to be defined, because this ensures correct build 7 | # order in the case of a parallel build. 8 | 9 | # Usage: Add copy-products.sh in an Xcode build phase, 10 | # and add all the files you want copied as Input Files. 11 | # The Carthage build directory will be something like: 12 | # $SRCROOT/Carthage/Build 13 | # Input files you likely want are: 14 | # $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).framework 15 | # $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).framework.dSYM 16 | 17 | if [ -z "$SCRIPT_INPUT_FILE_COUNT" ]; then 18 | echo "This script is supposed to be run in an Xcode build phase!" 19 | exit 1 20 | fi 21 | 22 | if [ "$#" -ne "1" ]; then 23 | echo "warning: Example usage: copy-products.sh \$SRCROOT/Carthage/Build" 24 | echo "error: Usage: copy-products.sh " 25 | exit 1 26 | fi 27 | 28 | if [ "$SCRIPT_INPUT_FILE_COUNT" -eq "0" ]; then 29 | echo "error: specify files to copy in the build phase Input Files" 30 | exit 1 31 | fi 32 | 33 | # Don't rsync if we're building with Carthage (it's not needed) 34 | if [ "$CARTHAGE" = "YES" ]; then 35 | echo "Skipping rsync during Carthage build." 36 | exit 0 37 | fi 38 | 39 | CARTHAGE_BUILD_DIR="$1" 40 | PLATFORM="iOS" 41 | 42 | # Only copy when the Carthage/Build directory is a symlink 43 | if [[ ! -L "$CARTHAGE_BUILD_DIR" || ! -d "$CARTHAGE_BUILD_DIR" ]]; then 44 | echo "warning: Skipping rsync because Carthage build location isn't a symlink to a directory." 45 | exit 0 46 | fi 47 | 48 | # Loop over Xcode Input Files and copy 49 | for i in $(seq 0 $(( $SCRIPT_INPUT_FILE_COUNT - 1 )) ); do 50 | VAR="SCRIPT_INPUT_FILE_$i" 51 | FILE="${!VAR}" 52 | if [ -e "$FILE" ]; then 53 | echo "Syncing $FILE" 54 | rsync --delete -av "$FILE" "$CARTHAGE_BUILD_DIR/$PLATFORM/" 55 | else 56 | echo "warning: File does not exist: $FILE" 57 | fi 58 | done 59 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 15146ED91AC20C71000BA380 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 15146ED81AC20C71000BA380 /* main.m */; }; 11 | 15146EDC1AC20C71000BA380 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 15146EDB1AC20C71000BA380 /* AppDelegate.m */; }; 12 | 15146EDF1AC20C71000BA380 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 15146EDE1AC20C71000BA380 /* ViewController.m */; }; 13 | 15146EE21AC20C71000BA380 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15146EE01AC20C71000BA380 /* Main.storyboard */; }; 14 | 15146EE41AC20C71000BA380 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 15146EE31AC20C71000BA380 /* Images.xcassets */; }; 15 | 15146EE71AC20C71000BA380 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 15146EE51AC20C71000BA380 /* LaunchScreen.xib */; }; 16 | 15146EF31AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 15146EF21AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.m */; }; 17 | 59DDA9721ECE514300512AF5 /* BoxBrowseSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59DDA9711ECE512D00512AF5 /* BoxBrowseSDK.framework */; }; 18 | 59DDA9731ECE514300512AF5 /* BoxBrowseSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 59DDA9711ECE512D00512AF5 /* BoxBrowseSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | A52B6FF52022446E0057F175 /* Masonry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5BB0F701EA56D860037CAF1 /* Masonry.framework */; }; 20 | A52B6FF62022446E0057F175 /* Masonry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C5BB0F701EA56D860037CAF1 /* Masonry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 21 | A52B6FF72022446E0057F175 /* MBProgressHUD.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59F265111E72195900B95BC1 /* MBProgressHUD.framework */; }; 22 | A52B6FF82022446E0057F175 /* MBProgressHUD.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 59F265111E72195900B95BC1 /* MBProgressHUD.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 23 | A53C4E951F7B060B009F1AB9 /* BoxContentSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A53C4E941F7B060B009F1AB9 /* BoxContentSDK.framework */; }; 24 | A53C4E961F7B060B009F1AB9 /* BoxContentSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A53C4E941F7B060B009F1AB9 /* BoxContentSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 15146EED1AC20C71000BA380 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 15146ECB1AC20C71000BA380 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 15146ED21AC20C71000BA380; 33 | remoteInfo = BoxBrowseSDKSampleApp; 34 | }; 35 | 59DDA96E1ECE512D00512AF5 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 59DDA9691ECE512D00512AF5 /* BoxBrowseSDK.xcodeproj */; 38 | proxyType = 2; 39 | remoteGlobalIDString = 15146EBB1AC20B78000BA380; 40 | remoteInfo = BoxBrowseSDKTests; 41 | }; 42 | 59DDA9701ECE512D00512AF5 /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = 59DDA9691ECE512D00512AF5 /* BoxBrowseSDK.xcodeproj */; 45 | proxyType = 2; 46 | remoteGlobalIDString = 591805E51E4E698B004E1B28; 47 | remoteInfo = BoxBrowseSDK; 48 | }; 49 | 59DDA9741ECE514300512AF5 /* PBXContainerItemProxy */ = { 50 | isa = PBXContainerItemProxy; 51 | containerPortal = 59DDA9691ECE512D00512AF5 /* BoxBrowseSDK.xcodeproj */; 52 | proxyType = 1; 53 | remoteGlobalIDString = 591805E41E4E698B004E1B28; 54 | remoteInfo = BoxBrowseSDK; 55 | }; 56 | /* End PBXContainerItemProxy section */ 57 | 58 | /* Begin PBXCopyFilesBuildPhase section */ 59 | 591E13D01EC64DEB008AFA5C /* Embed Frameworks */ = { 60 | isa = PBXCopyFilesBuildPhase; 61 | buildActionMask = 2147483647; 62 | dstPath = ""; 63 | dstSubfolderSpec = 10; 64 | files = ( 65 | A52B6FF82022446E0057F175 /* MBProgressHUD.framework in Embed Frameworks */, 66 | 59DDA9731ECE514300512AF5 /* BoxBrowseSDK.framework in Embed Frameworks */, 67 | A53C4E961F7B060B009F1AB9 /* BoxContentSDK.framework in Embed Frameworks */, 68 | A52B6FF62022446E0057F175 /* Masonry.framework in Embed Frameworks */, 69 | ); 70 | name = "Embed Frameworks"; 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXCopyFilesBuildPhase section */ 74 | 75 | /* Begin PBXFileReference section */ 76 | 15146ED31AC20C71000BA380 /* BoxBrowseSDKSampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BoxBrowseSDKSampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 15146ED71AC20C71000BA380 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 15146ED81AC20C71000BA380 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 79 | 15146EDA1AC20C71000BA380 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 80 | 15146EDB1AC20C71000BA380 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 81 | 15146EDD1AC20C71000BA380 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 82 | 15146EDE1AC20C71000BA380 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 83 | 15146EE11AC20C71000BA380 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 84 | 15146EE31AC20C71000BA380 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 85 | 15146EE61AC20C71000BA380 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 86 | 15146EEC1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BoxBrowseSDKSampleAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | 15146EF11AC20C71000BA380 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 88 | 15146EF21AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BoxBrowseSDKSampleAppTests.m; sourceTree = ""; }; 89 | 591806061E53BA3C004E1B28 /* BoxBrowseSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BoxBrowseSDK.framework; path = Carthage/Build/iOS/BoxBrowseSDK.framework; sourceTree = ""; }; 90 | 59DDA9691ECE512D00512AF5 /* BoxBrowseSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BoxBrowseSDK.xcodeproj; path = ../BoxBrowseSDK/BoxBrowseSDK.xcodeproj; sourceTree = ""; }; 91 | 59F2650E1E72193900B95BC1 /* BoxContentSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BoxContentSDK.framework; path = Carthage/Build/iOS/BoxContentSDK.framework; sourceTree = ""; }; 92 | 59F265111E72195900B95BC1 /* MBProgressHUD.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MBProgressHUD.framework; path = Carthage/Build/iOS/MBProgressHUD.framework; sourceTree = ""; }; 93 | A53C4E941F7B060B009F1AB9 /* BoxContentSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BoxContentSDK.framework; path = Carthage/Build/iOS/BoxContentSDK.framework; sourceTree = ""; }; 94 | C5BB0F701EA56D860037CAF1 /* Masonry.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Masonry.framework; path = Carthage/Build/iOS/Masonry.framework; sourceTree = ""; }; 95 | /* End PBXFileReference section */ 96 | 97 | /* Begin PBXFrameworksBuildPhase section */ 98 | 15146ED01AC20C71000BA380 /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | A52B6FF72022446E0057F175 /* MBProgressHUD.framework in Frameworks */, 103 | 59DDA9721ECE514300512AF5 /* BoxBrowseSDK.framework in Frameworks */, 104 | A53C4E951F7B060B009F1AB9 /* BoxContentSDK.framework in Frameworks */, 105 | A52B6FF52022446E0057F175 /* Masonry.framework in Frameworks */, 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | 15146EE91AC20C71000BA380 /* Frameworks */ = { 110 | isa = PBXFrameworksBuildPhase; 111 | buildActionMask = 2147483647; 112 | files = ( 113 | ); 114 | runOnlyForDeploymentPostprocessing = 0; 115 | }; 116 | /* End PBXFrameworksBuildPhase section */ 117 | 118 | /* Begin PBXGroup section */ 119 | 15146ECA1AC20C71000BA380 = { 120 | isa = PBXGroup; 121 | children = ( 122 | A53C4E941F7B060B009F1AB9 /* BoxContentSDK.framework */, 123 | 59DDA9691ECE512D00512AF5 /* BoxBrowseSDK.xcodeproj */, 124 | 59F2650B1E72176400B95BC1 /* BoxBrowseSDK */, 125 | 15146ED51AC20C71000BA380 /* BoxBrowseSDKSampleApp */, 126 | 15146EEF1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests */, 127 | 15146ED41AC20C71000BA380 /* Products */, 128 | EB811E4165AEF29672AF1AE7 /* Frameworks */, 129 | ); 130 | sourceTree = ""; 131 | }; 132 | 15146ED41AC20C71000BA380 /* Products */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 15146ED31AC20C71000BA380 /* BoxBrowseSDKSampleApp.app */, 136 | 15146EEC1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.xctest */, 137 | ); 138 | name = Products; 139 | sourceTree = ""; 140 | }; 141 | 15146ED51AC20C71000BA380 /* BoxBrowseSDKSampleApp */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 15146EDA1AC20C71000BA380 /* AppDelegate.h */, 145 | 15146EDB1AC20C71000BA380 /* AppDelegate.m */, 146 | 15146EDD1AC20C71000BA380 /* ViewController.h */, 147 | 15146EDE1AC20C71000BA380 /* ViewController.m */, 148 | 15146EE01AC20C71000BA380 /* Main.storyboard */, 149 | 15146EE31AC20C71000BA380 /* Images.xcassets */, 150 | 15146EE51AC20C71000BA380 /* LaunchScreen.xib */, 151 | 15146ED61AC20C71000BA380 /* Supporting Files */, 152 | ); 153 | path = BoxBrowseSDKSampleApp; 154 | sourceTree = ""; 155 | }; 156 | 15146ED61AC20C71000BA380 /* Supporting Files */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 15146ED71AC20C71000BA380 /* Info.plist */, 160 | 15146ED81AC20C71000BA380 /* main.m */, 161 | ); 162 | name = "Supporting Files"; 163 | sourceTree = ""; 164 | }; 165 | 15146EEF1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 15146EF21AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.m */, 169 | 15146EF01AC20C71000BA380 /* Supporting Files */, 170 | ); 171 | path = BoxBrowseSDKSampleAppTests; 172 | sourceTree = ""; 173 | }; 174 | 15146EF01AC20C71000BA380 /* Supporting Files */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 15146EF11AC20C71000BA380 /* Info.plist */, 178 | ); 179 | name = "Supporting Files"; 180 | sourceTree = ""; 181 | }; 182 | 59DDA96A1ECE512D00512AF5 /* Products */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 59DDA96F1ECE512D00512AF5 /* BoxBrowseSDKTests.xctest */, 186 | 59DDA9711ECE512D00512AF5 /* BoxBrowseSDK.framework */, 187 | ); 188 | name = Products; 189 | sourceTree = ""; 190 | }; 191 | 59F2650B1E72176400B95BC1 /* BoxBrowseSDK */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | ); 195 | name = BoxBrowseSDK; 196 | sourceTree = ""; 197 | }; 198 | EB811E4165AEF29672AF1AE7 /* Frameworks */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | C5BB0F701EA56D860037CAF1 /* Masonry.framework */, 202 | 59F265111E72195900B95BC1 /* MBProgressHUD.framework */, 203 | 59F2650E1E72193900B95BC1 /* BoxContentSDK.framework */, 204 | 591806061E53BA3C004E1B28 /* BoxBrowseSDK.framework */, 205 | ); 206 | name = Frameworks; 207 | sourceTree = ""; 208 | }; 209 | /* End PBXGroup section */ 210 | 211 | /* Begin PBXNativeTarget section */ 212 | 15146ED21AC20C71000BA380 /* BoxBrowseSDKSampleApp */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = 15146EF61AC20C71000BA380 /* Build configuration list for PBXNativeTarget "BoxBrowseSDKSampleApp" */; 215 | buildPhases = ( 216 | 15146ECF1AC20C71000BA380 /* Sources */, 217 | 15146ED01AC20C71000BA380 /* Frameworks */, 218 | 15146ED11AC20C71000BA380 /* Resources */, 219 | 591E13D01EC64DEB008AFA5C /* Embed Frameworks */, 220 | A52B6FF4202244040057F175 /* Carthage Copy Script */, 221 | ); 222 | buildRules = ( 223 | ); 224 | dependencies = ( 225 | 59DDA9751ECE514300512AF5 /* PBXTargetDependency */, 226 | ); 227 | name = BoxBrowseSDKSampleApp; 228 | productName = BoxBrowseSDKSampleApp; 229 | productReference = 15146ED31AC20C71000BA380 /* BoxBrowseSDKSampleApp.app */; 230 | productType = "com.apple.product-type.application"; 231 | }; 232 | 15146EEB1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests */ = { 233 | isa = PBXNativeTarget; 234 | buildConfigurationList = 15146EF91AC20C71000BA380 /* Build configuration list for PBXNativeTarget "BoxBrowseSDKSampleAppTests" */; 235 | buildPhases = ( 236 | 15146EE81AC20C71000BA380 /* Sources */, 237 | 15146EE91AC20C71000BA380 /* Frameworks */, 238 | 15146EEA1AC20C71000BA380 /* Resources */, 239 | ); 240 | buildRules = ( 241 | ); 242 | dependencies = ( 243 | 15146EEE1AC20C71000BA380 /* PBXTargetDependency */, 244 | ); 245 | name = BoxBrowseSDKSampleAppTests; 246 | productName = BoxBrowseSDKSampleAppTests; 247 | productReference = 15146EEC1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.xctest */; 248 | productType = "com.apple.product-type.bundle.unit-test"; 249 | }; 250 | /* End PBXNativeTarget section */ 251 | 252 | /* Begin PBXProject section */ 253 | 15146ECB1AC20C71000BA380 /* Project object */ = { 254 | isa = PBXProject; 255 | attributes = { 256 | LastUpgradeCheck = 0800; 257 | ORGANIZATIONNAME = BOX; 258 | TargetAttributes = { 259 | 15146ED21AC20C71000BA380 = { 260 | CreatedOnToolsVersion = 6.2; 261 | }; 262 | 15146EEB1AC20C71000BA380 = { 263 | CreatedOnToolsVersion = 6.2; 264 | TestTargetID = 15146ED21AC20C71000BA380; 265 | }; 266 | }; 267 | }; 268 | buildConfigurationList = 15146ECE1AC20C71000BA380 /* Build configuration list for PBXProject "BoxBrowseSDKSampleApp" */; 269 | compatibilityVersion = "Xcode 3.2"; 270 | developmentRegion = English; 271 | hasScannedForEncodings = 0; 272 | knownRegions = ( 273 | en, 274 | Base, 275 | ); 276 | mainGroup = 15146ECA1AC20C71000BA380; 277 | productRefGroup = 15146ED41AC20C71000BA380 /* Products */; 278 | projectDirPath = ""; 279 | projectReferences = ( 280 | { 281 | ProductGroup = 59DDA96A1ECE512D00512AF5 /* Products */; 282 | ProjectRef = 59DDA9691ECE512D00512AF5 /* BoxBrowseSDK.xcodeproj */; 283 | }, 284 | ); 285 | projectRoot = ""; 286 | targets = ( 287 | 15146ED21AC20C71000BA380 /* BoxBrowseSDKSampleApp */, 288 | 15146EEB1AC20C71000BA380 /* BoxBrowseSDKSampleAppTests */, 289 | ); 290 | }; 291 | /* End PBXProject section */ 292 | 293 | /* Begin PBXReferenceProxy section */ 294 | 59DDA96F1ECE512D00512AF5 /* BoxBrowseSDKTests.xctest */ = { 295 | isa = PBXReferenceProxy; 296 | fileType = wrapper.cfbundle; 297 | path = BoxBrowseSDKTests.xctest; 298 | remoteRef = 59DDA96E1ECE512D00512AF5 /* PBXContainerItemProxy */; 299 | sourceTree = BUILT_PRODUCTS_DIR; 300 | }; 301 | 59DDA9711ECE512D00512AF5 /* BoxBrowseSDK.framework */ = { 302 | isa = PBXReferenceProxy; 303 | fileType = wrapper.framework; 304 | path = BoxBrowseSDK.framework; 305 | remoteRef = 59DDA9701ECE512D00512AF5 /* PBXContainerItemProxy */; 306 | sourceTree = BUILT_PRODUCTS_DIR; 307 | }; 308 | /* End PBXReferenceProxy section */ 309 | 310 | /* Begin PBXResourcesBuildPhase section */ 311 | 15146ED11AC20C71000BA380 /* Resources */ = { 312 | isa = PBXResourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | 15146EE21AC20C71000BA380 /* Main.storyboard in Resources */, 316 | 15146EE71AC20C71000BA380 /* LaunchScreen.xib in Resources */, 317 | 15146EE41AC20C71000BA380 /* Images.xcassets in Resources */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | 15146EEA1AC20C71000BA380 /* Resources */ = { 322 | isa = PBXResourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | /* End PBXResourcesBuildPhase section */ 329 | 330 | /* Begin PBXShellScriptBuildPhase section */ 331 | A52B6FF4202244040057F175 /* Carthage Copy Script */ = { 332 | isa = PBXShellScriptBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | ); 336 | inputPaths = ( 337 | "$(SRCROOT)/Carthage/Build/iOS/Masonry.framework", 338 | "$(SRCROOT)/Carthage/Build/iOS/MBProgressHUD.framework", 339 | ); 340 | name = "Carthage Copy Script"; 341 | outputPaths = ( 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | shellPath = /bin/sh; 345 | shellScript = "/usr/local/bin/carthage copy-frameworks"; 346 | }; 347 | /* End PBXShellScriptBuildPhase section */ 348 | 349 | /* Begin PBXSourcesBuildPhase section */ 350 | 15146ECF1AC20C71000BA380 /* Sources */ = { 351 | isa = PBXSourcesBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | 15146EDF1AC20C71000BA380 /* ViewController.m in Sources */, 355 | 15146EDC1AC20C71000BA380 /* AppDelegate.m in Sources */, 356 | 15146ED91AC20C71000BA380 /* main.m in Sources */, 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | }; 360 | 15146EE81AC20C71000BA380 /* Sources */ = { 361 | isa = PBXSourcesBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | 15146EF31AC20C71000BA380 /* BoxBrowseSDKSampleAppTests.m in Sources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | /* End PBXSourcesBuildPhase section */ 369 | 370 | /* Begin PBXTargetDependency section */ 371 | 15146EEE1AC20C71000BA380 /* PBXTargetDependency */ = { 372 | isa = PBXTargetDependency; 373 | target = 15146ED21AC20C71000BA380 /* BoxBrowseSDKSampleApp */; 374 | targetProxy = 15146EED1AC20C71000BA380 /* PBXContainerItemProxy */; 375 | }; 376 | 59DDA9751ECE514300512AF5 /* PBXTargetDependency */ = { 377 | isa = PBXTargetDependency; 378 | name = BoxBrowseSDK; 379 | targetProxy = 59DDA9741ECE514300512AF5 /* PBXContainerItemProxy */; 380 | }; 381 | /* End PBXTargetDependency section */ 382 | 383 | /* Begin PBXVariantGroup section */ 384 | 15146EE01AC20C71000BA380 /* Main.storyboard */ = { 385 | isa = PBXVariantGroup; 386 | children = ( 387 | 15146EE11AC20C71000BA380 /* Base */, 388 | ); 389 | name = Main.storyboard; 390 | sourceTree = ""; 391 | }; 392 | 15146EE51AC20C71000BA380 /* LaunchScreen.xib */ = { 393 | isa = PBXVariantGroup; 394 | children = ( 395 | 15146EE61AC20C71000BA380 /* Base */, 396 | ); 397 | name = LaunchScreen.xib; 398 | sourceTree = ""; 399 | }; 400 | /* End PBXVariantGroup section */ 401 | 402 | /* Begin XCBuildConfiguration section */ 403 | 15146EF41AC20C71000BA380 /* Debug */ = { 404 | isa = XCBuildConfiguration; 405 | buildSettings = { 406 | ALWAYS_SEARCH_USER_PATHS = NO; 407 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 408 | CLANG_CXX_LIBRARY = "libc++"; 409 | CLANG_ENABLE_MODULES = YES; 410 | CLANG_ENABLE_OBJC_ARC = YES; 411 | CLANG_WARN_BOOL_CONVERSION = YES; 412 | CLANG_WARN_CONSTANT_CONVERSION = YES; 413 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 414 | CLANG_WARN_EMPTY_BODY = YES; 415 | CLANG_WARN_ENUM_CONVERSION = YES; 416 | CLANG_WARN_INFINITE_RECURSION = YES; 417 | CLANG_WARN_INT_CONVERSION = YES; 418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 419 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 420 | CLANG_WARN_UNREACHABLE_CODE = YES; 421 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 422 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 423 | COPY_PHASE_STRIP = NO; 424 | ENABLE_STRICT_OBJC_MSGSEND = YES; 425 | ENABLE_TESTABILITY = YES; 426 | GCC_C_LANGUAGE_STANDARD = gnu99; 427 | GCC_DYNAMIC_NO_PIC = NO; 428 | GCC_NO_COMMON_BLOCKS = YES; 429 | GCC_OPTIMIZATION_LEVEL = 0; 430 | GCC_PREPROCESSOR_DEFINITIONS = ( 431 | "DEBUG=1", 432 | "$(inherited)", 433 | ); 434 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 435 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 436 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 437 | GCC_WARN_UNDECLARED_SELECTOR = YES; 438 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 439 | GCC_WARN_UNUSED_FUNCTION = YES; 440 | GCC_WARN_UNUSED_VARIABLE = YES; 441 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 442 | MTL_ENABLE_DEBUG_INFO = YES; 443 | ONLY_ACTIVE_ARCH = YES; 444 | OTHER_LDFLAGS = "$(inherited)"; 445 | SDKROOT = iphoneos; 446 | TARGETED_DEVICE_FAMILY = "1,2"; 447 | }; 448 | name = Debug; 449 | }; 450 | 15146EF51AC20C71000BA380 /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | ALWAYS_SEARCH_USER_PATHS = NO; 454 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 455 | CLANG_CXX_LIBRARY = "libc++"; 456 | CLANG_ENABLE_MODULES = YES; 457 | CLANG_ENABLE_OBJC_ARC = YES; 458 | CLANG_WARN_BOOL_CONVERSION = YES; 459 | CLANG_WARN_CONSTANT_CONVERSION = YES; 460 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 461 | CLANG_WARN_EMPTY_BODY = YES; 462 | CLANG_WARN_ENUM_CONVERSION = YES; 463 | CLANG_WARN_INFINITE_RECURSION = YES; 464 | CLANG_WARN_INT_CONVERSION = YES; 465 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 466 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 467 | CLANG_WARN_UNREACHABLE_CODE = YES; 468 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 469 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 470 | COPY_PHASE_STRIP = NO; 471 | ENABLE_NS_ASSERTIONS = NO; 472 | ENABLE_STRICT_OBJC_MSGSEND = YES; 473 | GCC_C_LANGUAGE_STANDARD = gnu99; 474 | GCC_NO_COMMON_BLOCKS = YES; 475 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 476 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 477 | GCC_WARN_UNDECLARED_SELECTOR = YES; 478 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 479 | GCC_WARN_UNUSED_FUNCTION = YES; 480 | GCC_WARN_UNUSED_VARIABLE = YES; 481 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 482 | MTL_ENABLE_DEBUG_INFO = NO; 483 | OTHER_LDFLAGS = "$(inherited)"; 484 | SDKROOT = iphoneos; 485 | TARGETED_DEVICE_FAMILY = "1,2"; 486 | VALIDATE_PRODUCT = YES; 487 | }; 488 | name = Release; 489 | }; 490 | 15146EF71AC20C71000BA380 /* Debug */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 494 | FRAMEWORK_SEARCH_PATHS = ( 495 | "$(inherited)", 496 | "$(PROJECT_DIR)/Carthage/Build/iOS", 497 | "$(PROJECT_DIR)/../Carthage/Build/iOS", 498 | ); 499 | INFOPLIST_FILE = BoxBrowseSDKSampleApp/Info.plist; 500 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 501 | PRODUCT_BUNDLE_IDENTIFIER = "com.box.$(PRODUCT_NAME:rfc1034identifier)"; 502 | PRODUCT_NAME = "$(TARGET_NAME)"; 503 | }; 504 | name = Debug; 505 | }; 506 | 15146EF81AC20C71000BA380 /* Release */ = { 507 | isa = XCBuildConfiguration; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | FRAMEWORK_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "$(PROJECT_DIR)/Carthage/Build/iOS", 513 | "$(PROJECT_DIR)/../Carthage/Build/iOS", 514 | ); 515 | INFOPLIST_FILE = BoxBrowseSDKSampleApp/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 517 | PRODUCT_BUNDLE_IDENTIFIER = "com.box.$(PRODUCT_NAME:rfc1034identifier)"; 518 | PRODUCT_NAME = "$(TARGET_NAME)"; 519 | }; 520 | name = Release; 521 | }; 522 | 15146EFA1AC20C71000BA380 /* Debug */ = { 523 | isa = XCBuildConfiguration; 524 | buildSettings = { 525 | BUNDLE_LOADER = "$(TEST_HOST)"; 526 | FRAMEWORK_SEARCH_PATHS = ( 527 | "$(SDKROOT)/Developer/Library/Frameworks", 528 | "$(inherited)", 529 | ); 530 | GCC_PREPROCESSOR_DEFINITIONS = ( 531 | "DEBUG=1", 532 | "$(inherited)", 533 | ); 534 | INFOPLIST_FILE = BoxBrowseSDKSampleAppTests/Info.plist; 535 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 536 | PRODUCT_BUNDLE_IDENTIFIER = "com.box.$(PRODUCT_NAME:rfc1034identifier)"; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BoxBrowseSDKSampleApp.app/BoxBrowseSDKSampleApp"; 539 | }; 540 | name = Debug; 541 | }; 542 | 15146EFB1AC20C71000BA380 /* Release */ = { 543 | isa = XCBuildConfiguration; 544 | buildSettings = { 545 | BUNDLE_LOADER = "$(TEST_HOST)"; 546 | FRAMEWORK_SEARCH_PATHS = ( 547 | "$(SDKROOT)/Developer/Library/Frameworks", 548 | "$(inherited)", 549 | ); 550 | INFOPLIST_FILE = BoxBrowseSDKSampleAppTests/Info.plist; 551 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 552 | PRODUCT_BUNDLE_IDENTIFIER = "com.box.$(PRODUCT_NAME:rfc1034identifier)"; 553 | PRODUCT_NAME = "$(TARGET_NAME)"; 554 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BoxBrowseSDKSampleApp.app/BoxBrowseSDKSampleApp"; 555 | }; 556 | name = Release; 557 | }; 558 | /* End XCBuildConfiguration section */ 559 | 560 | /* Begin XCConfigurationList section */ 561 | 15146ECE1AC20C71000BA380 /* Build configuration list for PBXProject "BoxBrowseSDKSampleApp" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 15146EF41AC20C71000BA380 /* Debug */, 565 | 15146EF51AC20C71000BA380 /* Release */, 566 | ); 567 | defaultConfigurationIsVisible = 0; 568 | defaultConfigurationName = Release; 569 | }; 570 | 15146EF61AC20C71000BA380 /* Build configuration list for PBXNativeTarget "BoxBrowseSDKSampleApp" */ = { 571 | isa = XCConfigurationList; 572 | buildConfigurations = ( 573 | 15146EF71AC20C71000BA380 /* Debug */, 574 | 15146EF81AC20C71000BA380 /* Release */, 575 | ); 576 | defaultConfigurationIsVisible = 0; 577 | defaultConfigurationName = Release; 578 | }; 579 | 15146EF91AC20C71000BA380 /* Build configuration list for PBXNativeTarget "BoxBrowseSDKSampleAppTests" */ = { 580 | isa = XCConfigurationList; 581 | buildConfigurations = ( 582 | 15146EFA1AC20C71000BA380 /* Debug */, 583 | 15146EFB1AC20C71000BA380 /* Release */, 584 | ); 585 | defaultConfigurationIsVisible = 0; 586 | defaultConfigurationName = Release; 587 | }; 588 | /* End XCConfigurationList section */ 589 | }; 590 | rootObject = 15146ECB1AC20C71000BA380 /* Project object */; 591 | } 592 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BoxBrowseSDKSampleApp 4 | // 5 | // Created by Rico Yao on 3/24/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BoxBrowseSDKSampleApp 4 | // 5 | // Created by Rico Yao on 3/24/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import BoxBrowseSDK; 10 | 11 | #import "AppDelegate.h" 12 | #import "ViewController.h" 13 | 14 | @interface AppDelegate () 15 | 16 | @end 17 | 18 | @implementation AppDelegate 19 | 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 22 | { 23 | #error Set your client-id and client-secret that you obtained from https://developers.box.com 24 | [BOXContentClient setClientID:nil clientSecret:nil]; 25 | 26 | ViewController *viewController = [[ViewController alloc] init]; 27 | self.window.rootViewController = viewController; 28 | [self.window makeKeyAndVisible]; 29 | return YES; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BoxBrowseSDKSampleApp 4 | // 5 | // Created by Rico Yao on 3/24/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // BoxBrowseSDKSampleApp 4 | // 5 | // Created by Rico Yao on 3/24/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | @import BoxBrowseSDK; 10 | 11 | #import "ViewController.h" 12 | 13 | @interface ViewController () 14 | 15 | @property (nonatomic, readwrite, strong) UIButton *button; 16 | @property (nonatomic, readwrite, strong) UINavigationController *navControllerForBrowseSDK; 17 | 18 | @end 19 | 20 | @implementation ViewController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | 26 | self.view.backgroundColor = [UIColor whiteColor]; 27 | 28 | self.button = [UIButton buttonWithType:UIButtonTypeSystem]; 29 | [self.button setTitle:@"Start" forState:UIControlStateNormal]; 30 | self.button.titleLabel.font = [UIFont systemFontOfSize:22.0f]; 31 | [self.button addTarget:self action:@selector(showFolderViewController) forControlEvents:UIControlEventTouchUpInside]; 32 | [self.view addSubview:self.button]; 33 | } 34 | 35 | - (void)viewDidLayoutSubviews 36 | { 37 | [super viewDidLayoutSubviews]; 38 | 39 | self.button.frame = self.view.bounds; 40 | [self.button sizeToFit]; 41 | self.button.center = self.view.center; 42 | } 43 | 44 | - (void)showFolderViewController 45 | { 46 | // Show a UIViewController that displays the contents of a Box Folder. 47 | BOXFolderViewController *folderViewController = [[BOXFolderViewController alloc] initWithContentClient:[BOXContentClient defaultClient]]; 48 | folderViewController.delegate = self; 49 | 50 | // You must load it in a UINavigationController. 51 | self.navControllerForBrowseSDK = [[UINavigationController alloc] initWithRootViewController:folderViewController]; 52 | [self presentViewController:self.navControllerForBrowseSDK animated:YES completion:nil]; 53 | } 54 | 55 | #pragma mark - BOXFolderViewControllerDelegate 56 | 57 | //////////////////////////////////////////////////////////////////////////////////////// 58 | // These are all optional and will allow you to customize behavior for your app. 59 | //////////////////////////////////////////////////////////////////////////////////////// 60 | 61 | - (BOOL)itemsViewControllerShouldShowCloseButton:(BOXItemsViewController *)itemsViewController 62 | { 63 | return NO; 64 | } 65 | 66 | - (BOOL)itemsViewController:(BOXItemsViewController *)itemsViewController shouldShowItem:(BOXItem *)item 67 | { 68 | return YES; 69 | } 70 | 71 | - (BOOL)itemsViewController:(BOXItemsViewController *)itemsViewController shouldEnableItem:(BOXItem *)item 72 | { 73 | return YES; 74 | } 75 | 76 | - (BOOL)itemsViewController:(BOXItemsViewController *)itemsViewController willNavigateToFolder:(BOXFolder *)folder 77 | { 78 | return YES; 79 | } 80 | 81 | - (void)itemsViewController:(BOXItemsViewController *)itemsViewController didTapFolder:(BOXFolder *)folder inItems:(NSArray *)items 82 | { 83 | NSLog(@"Did tap folder: %@", folder.name); 84 | } 85 | 86 | - (void)itemsViewController:(BOXItemsViewController *)itemsViewController didTapFile:(BOXFile *)file inItems:(NSArray *)items 87 | { 88 | NSLog(@"Did tap file: %@", file.name); 89 | } 90 | 91 | - (void)itemsViewControllerDidTapCloseButtton:(BOXItemsViewController *)itemsViewController 92 | { 93 | // If you don't implement this, the navigation controller will be dismissed for you. 94 | // Only implement if you need to customize behavior. 95 | NSLog(@"Did tap close button"); 96 | [self.navControllerForBrowseSDK dismissViewControllerAnimated:YES completion:nil]; 97 | } 98 | 99 | // By default the following sort order will be applied: 100 | // - Folders come before files 101 | // - Sort by modification date descending 102 | // - Sort by name ascending 103 | // You can implement your own sort order by implementing this delegate method. 104 | // 105 | //- (NSComparisonResult)itemsViewController:(BOXItemsViewController *)itemsViewController compareForSortingItem:(BOXItem *)itemA toItem:(BOXItem *)itemB 106 | //{ 107 | //} 108 | 109 | - (BOOL)folderViewControllerShouldShowChooseFolderButton:(BOXFolderViewController *)folderViewController 110 | { 111 | return YES; 112 | } 113 | 114 | - (void)folderViewController:(BOXFolderViewController *)folderViewController didChooseFolder:(BOXFolder *)folder 115 | { 116 | NSLog(@"Did choose folder: %@", folder.name); 117 | } 118 | 119 | - (BOOL)folderViewControllerShouldShowCreateFolderButton:(BOXFolderViewController *)folderViewController 120 | { 121 | return YES; 122 | } 123 | 124 | - (void)folderViewController:(BOXFolderViewController *)folderViewController didCreateNewFolder:(BOXFolder *)folder 125 | { 126 | NSLog(@"Did create new folder: %@", folder.name); 127 | } 128 | 129 | - (BOOL)folderViewController:(BOXFolderViewController *)folderViewController shouldShowDeleteButtonForItem:(BOXItem *)item 130 | { 131 | return YES; 132 | } 133 | 134 | - (void)folderViewController:(BOXFolderViewController *)folderViewController didDeleteItem:(BOXItem *)item 135 | { 136 | NSLog(@"Did delete item: %@", item.name); 137 | } 138 | 139 | - (BOOL)folderViewControllerShouldShowSearchBar:(BOXFolderViewController *)folderViewController 140 | { 141 | return YES; 142 | } 143 | 144 | 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BoxBrowseSDKSampleApp 4 | // 5 | // Created by Rico Yao on 3/24/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleAppTests/BoxBrowseSDKSampleAppTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BoxBrowseSDKSampleAppTests.m 3 | // BoxBrowseSDKSampleAppTests 4 | // 5 | // Created by Rico Yao on 3/24/15. 6 | // Copyright (c) 2015 BOX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface BoxBrowseSDKSampleAppTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation BoxBrowseSDKSampleAppTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/BoxBrowseSDKSampleAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/Cartfile: -------------------------------------------------------------------------------- 1 | # Box SDKs 2 | github "box/box-ios-browse-sdk.git" ~> 1.0 3 | github "box/box-ios-sdk" ~> 1.0 4 | -------------------------------------------------------------------------------- /BoxBrowseSDKSampleApp/Makefile: -------------------------------------------------------------------------------- 1 | CARTHAGE := $(shell command -v carthage 2> /dev/null) 2 | 3 | .PHONY : help bootstrap update clean check_carthage 4 | 5 | help: 6 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 7 | 8 | bootstrap: check_carthage ## Build the reference app dependency framework(s) to cartfile.resolved 9 | # Make sure handled by Carthage are up to date (as saved in Cartfile.resolved) 10 | $(CARTHAGE) bootstrap --platform iOS 11 | 12 | update: check_carthage ## Update the reference app dependency framework(s) from the Cartfile to latest compatible version 13 | # Update Carthage-managed dependencies to the most recent available versions 14 | $(CARTHAGE) update --platform iOS 15 | 16 | clean: ## Clean Carthage build directory 17 | # Remove Carthage products 18 | rm -rf ./Carthage/Build/* 19 | 20 | check_carthage: ## Validate Carthage is installed 21 | ifndef CARTHAGE 22 | @echo "Carthage not found. Install with 'brew install carthage'" 23 | @exit 1 24 | endif 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ============ 3 | 4 | All contributions are welcome to this project. 5 | 6 | Contributor License Agreement 7 | ----------------------------- 8 | 9 | Before a contribution can be merged into this project, please fill out 10 | the [Contributor License Agreement (CLA)](http://box.github.io/cla). 11 | 12 | How to contribute 13 | ----------------- 14 | 15 | - **File an issue** - if you found a bug, want to request an 16 | enhancement, or want to implement something (bug fix or feature). 17 | - **Send a pull request** - if you want to contribute code. Please be 18 | sure to file an issue first. 19 | 20 | Pull request best practices 21 | ============ 22 | 23 | We want to accept your pull requests. Please follow these steps: 24 | 25 | Step 1: File an issue 26 | --------------------- 27 | 28 | Before writing any code, please file an issue stating the problem you 29 | want to solve or the feature you want to implement. This allows us to 30 | give you feedback before you spend any time writing code. There may be a 31 | known limitation that can't be addressed, or a bug that has already been 32 | fixed in a different way. The issue allows us to communicate and figure 33 | out if it's worth your time to write a bunch of code for the project. 34 | 35 | Step 2: Fork this repository on GitHub 36 | ------------------------------------- 37 | 38 | This will create your own copy of our repository. 39 | 40 | Step 3: Set the remote fetch origin 41 | ------------------------------- 42 | 43 | The remote fetch origin is the project under the Box organization. 44 | Setting this will ensure you're pulling in the latest changes from the main repository. 45 | 46 | ``` 47 | git remote set-url origin https://github.com/box/box-ios-browse-sdk.git 48 | ``` 49 | 50 | ``` 51 | git remote set-url origin --push https://github.com//box-ios-browse-sdk.git 52 | ``` 53 | 54 | 55 | Step 4: Rebase 56 | -------------- 57 | 58 | Before sending a pull request, rebase against origin, like thus: 59 | 60 | ``` 61 | git fetch origin 62 | ``` 63 | ``` 64 | git pull --rebase 65 | ``` 66 | 67 | 68 | This will add your changes on top of what's already in origin. 69 | 70 | 71 | Step 5: Send the pull request 72 | ----------------------------- 73 | 74 | Send the pull request from your fork to us. Be sure to include 75 | a description that lets us know what work you did. 76 | 77 | Keep in mind that we like to see one issue addressed per pull request, 78 | as this helps keep our git history clean so we can more easily track 79 | down issues. 80 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | #Box SDKs 2 | git "git@github.com:box/box-ios-sdk.git" 3 | 4 | # 3rd party SDKs 5 | github "jdg/MBProgressHUD" ~> 1.0.0 6 | github "SnapKit/Masonry" ~> 1.0.1 7 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | - [ ] I have checked that the [API documentation][api-docs] doesn't solve my issue 2 | 3 | ### Description of the Issue 4 | 5 | 6 | 7 | 8 | 9 | ### Versions Used 10 | Browse SDK: 11 | iOS: 12 | 13 | ### Steps to Reproduce 14 | 15 | 16 | 17 | 18 | 19 | ### Error Message, Including Stack Trace 20 | 21 | 22 | 23 | [api-docs]: https://developer.box.com/docs 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | "License" shall mean the terms and conditions for use, reproduction, 9 | and distribution as defined by Sections 1 through 9 of this document. 10 | "Licensor" shall mean the copyright owner or entity authorized by 11 | the copyright owner that is granting the License. 12 | "Legal Entity" shall mean the union of the acting entity and all 13 | other entities that control, are controlled by, or are under common 14 | control with that entity. For the purposes of this definition, 15 | "control" means (i) the power, direct or indirect, to cause the 16 | direction or management of such entity, whether by contract or 17 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 18 | outstanding shares, or (iii) beneficial ownership of such entity. 19 | "You" (or "Your") shall mean an individual or Legal Entity 20 | exercising permissions granted by this License. 21 | "Source" form shall mean the preferred form for making modifications, 22 | including but not limited to software source code, documentation 23 | source, and configuration files. 24 | "Object" form shall mean any form resulting from mechanical 25 | transformation or translation of a Source form, including but 26 | not limited to compiled object code, generated documentation, 27 | and conversions to other media types. 28 | "Work" shall mean the work of authorship, whether in Source or 29 | Object form, made available under the License, as indicated by a 30 | copyright notice that is included in or attached to the work 31 | (an example is provided in the Appendix below). 32 | "Derivative Works" shall mean any work, whether in Source or Object 33 | form, that is based on (or derived from) the Work and for which the 34 | editorial revisions, annotations, elaborations, or other modifications 35 | represent, as a whole, an original work of authorship. For the purposes 36 | of this License, Derivative Works shall not include works that remain 37 | separable from, or merely link (or bind by name) to the interfaces of, 38 | the Work and Derivative Works thereof. 39 | "Contribution" shall mean any work of authorship, including 40 | the original version of the Work and any modifications or additions 41 | to that Work or Derivative Works thereof, that is intentionally 42 | submitted to Licensor for inclusion in the Work by the copyright owner 43 | or by an individual or Legal Entity authorized to submit on behalf of 44 | the copyright owner. For the purposes of this definition, "submitted" 45 | means any form of electronic, verbal, or written communication sent 46 | to the Licensor or its representatives, including but not limited to 47 | communication on electronic mailing lists, source code control systems, 48 | and issue tracking systems that are managed by, or on behalf of, the 49 | Licensor for the purpose of discussing and improving the Work, but 50 | excluding communication that is conspicuously marked or otherwise 51 | designated in writing by the copyright owner as "Not a Contribution." 52 | "Contributor" shall mean Licensor and any individual or Legal Entity 53 | on behalf of whom a Contribution has been received by Licensor and 54 | subsequently incorporated within the Work. 55 | 56 | 2. Grant of Copyright License. Subject to the terms and conditions of 57 | this License, each Contributor hereby grants to You a perpetual, 58 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 59 | copyright license to reproduce, prepare Derivative Works of, 60 | publicly display, publicly perform, sublicense, and distribute the 61 | Work and such Derivative Works in Source or Object form. 62 | 63 | 3. Grant of Patent License. Subject to the terms and conditions of 64 | this License, each Contributor hereby grants to You a perpetual, 65 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 66 | (except as stated in this section) patent license to make, have made, 67 | use, offer to sell, sell, import, and otherwise transfer the Work, 68 | where such license applies only to those patent claims licensable 69 | by such Contributor that are necessarily infringed by their 70 | Contribution(s) alone or by combination of their Contribution(s) 71 | with the Work to which such Contribution(s) was submitted. If You 72 | institute patent litigation against any entity (including a 73 | cross-claim or counterclaim in a lawsuit) alleging that the Work 74 | or a Contribution incorporated within the Work constitutes direct 75 | or contributory patent infringement, then any patent licenses 76 | granted to You under this License for that Work shall terminate 77 | as of the date such litigation is filed. 78 | 79 | 4. Redistribution. You may reproduce and distribute copies of the 80 | Work or Derivative Works thereof in any medium, with or without 81 | modifications, and in Source or Object form, provided that You 82 | meet the following conditions: 83 | 84 | (a) You must give any other recipients of the Work or 85 | Derivative Works a copy of this License; and 86 | 87 | (b) You must cause any modified files to carry prominent notices 88 | stating that You changed the files; and 89 | 90 | (c) You must retain, in the Source form of any Derivative Works 91 | that You distribute, all copyright, patent, trademark, and 92 | attribution notices from the Source form of the Work, 93 | excluding those notices that do not pertain to any part of 94 | the Derivative Works; and 95 | 96 | (d) If the Work includes a "NOTICE" text file as part of its 97 | distribution, then any Derivative Works that You distribute must 98 | include a readable copy of the attribution notices contained 99 | within such NOTICE file, excluding those notices that do not 100 | pertain to any part of the Derivative Works, in at least one 101 | of the following places: within a NOTICE text file distributed 102 | as part of the Derivative Works; within the Source form or 103 | documentation, if provided along with the Derivative Works; or, 104 | within a display generated by the Derivative Works, if and 105 | wherever such third-party notices normally appear. The contents 106 | of the NOTICE file are for informational purposes only and 107 | do not modify the License. You may add Your own attribution 108 | notices within Derivative Works that You distribute, alongside 109 | or as an addendum to the NOTICE text from the Work, provided 110 | that such additional attribution notices cannot be construed 111 | as modifying the License. 112 | 113 | You may add Your own copyright statement to Your modifications and 114 | may provide additional or different license terms and conditions 115 | for use, reproduction, or distribution of Your modifications, or 116 | for any such Derivative Works as a whole, provided Your use, 117 | reproduction, and distribution of the Work otherwise complies with 118 | the conditions stated in this License. 119 | 120 | 5. Submission of Contributions. Unless You explicitly state otherwise, 121 | any Contribution intentionally submitted for inclusion in the Work 122 | by You to the Licensor shall be under the terms and conditions of 123 | this License, without any additional terms or conditions. 124 | Notwithstanding the above, nothing herein shall supersede or modify 125 | the terms of any separate license agreement you may have executed 126 | with Licensor regarding such Contributions. 127 | 128 | 6. Trademarks. This License does not grant permission to use the trade 129 | names, trademarks, service marks, or product names of the Licensor, 130 | except as required for reasonable and customary use in describing the 131 | origin of the Work and reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. Unless required by applicable law or 134 | agreed to in writing, Licensor provides the Work (and each 135 | Contributor provides its Contributions) on an "AS IS" BASIS, 136 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 137 | implied, including, without limitation, any warranties or conditions 138 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 139 | PARTICULAR PURPOSE. You are solely responsible for determining the 140 | appropriateness of using or redistributing the Work and assume any 141 | risks associated with Your exercise of permissions under this License. 142 | 143 | 8. Limitation of Liability. In no event and under no legal theory, 144 | whether in tort (including negligence), contract, or otherwise, 145 | unless required by applicable law (such as deliberate and grossly 146 | negligent acts) or agreed to in writing, shall any Contributor be 147 | liable to You for damages, including any direct, indirect, special, 148 | incidental, or consequential damages of any character arising as a 149 | result of this License or out of the use or inability to use the 150 | Work (including but not limited to damages for loss of goodwill, 151 | work stoppage, computer failure or malfunction, or any and all 152 | other commercial damages or losses), even if such Contributor 153 | has been advised of the possibility of such damages. 154 | 155 | 9. Accepting Warranty or Additional Liability. While redistributing 156 | the Work or Derivative Works thereof, You may choose to offer, 157 | and charge a fee for, acceptance of support, warranty, indemnity, 158 | or other liability obligations and/or rights consistent with this 159 | License. However, in accepting such obligations, You may act only 160 | on Your own behalf and on Your sole responsibility, not on behalf 161 | of any other Contributor, and only if You agree to indemnify, 162 | defend, and hold each Contributor harmless for any liability 163 | incurred by, or claims asserted against, such Contributor by reason 164 | of your accepting any such warranty or additional liability. 165 | 166 | END OF TERMS AND CONDITIONS 167 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges) 2 | 3 | Box iOS Browse SDK 4 | =================== 5 | 6 | ##Note: 7 | 8 | - The Box iOS Browse SDK is in **Maintenance** mode. This means only critical bugs will be patched. However, new functionality and additional bug fixes may be added on occasion based on customer demand, but should not be expected. 9 | 10 | This SDK allows you to show UI that allows users to browse their folders on Box. 11 | 12 | Developer Setup 13 | --------------- 14 | * Ensure you have the latest version of [Xcode](https://developer.apple.com/xcode/) installed. 15 | * We encourage you to use [Carthage](https://github.com/Carthage/Carthage) to import the SDK into your project. 16 | 17 | Quickstart 18 | ---------- 19 | Step 1: Setup Carthage 20 | ``` 21 | brew install carthage 22 | ``` 23 | Create Cartfile in your project directory, add the following line: 24 | ``` 25 | git "git@github.com:box/box-ios-browse-sdk.git" "master" 26 | ``` 27 | This will fetch the latest commit on master branch. 28 | 29 | Step 2: Run Carthage Update 30 | 31 | In the same directory as your Cartfile, run the following command: 32 | ``` 33 | carthage update --platform ios 34 | ``` 35 | Step 3: Import 36 | 37 | In your project: 38 | 39 | ```objectivec 40 | @import BoxBrowseSDK; 41 | ``` 42 | 43 | Step 4: Set the Box Client ID and Client Secret that you obtain from [creating a developer account](http://developers.box.com/) 44 | ```objectivec 45 | [BOXContentClient setClientID:@"your-client-id" clientSecret:@"your-client-secret"]; 46 | ``` 47 | Step 5: Launch a BOXFolderViewController 48 | ```objectivec 49 | BOXContentClient *contentClient = [BOXContentClient defaultClient]; 50 | BOXFolderViewController *folderViewController = [[BOXFolderViewController alloc] initWithContentClient:contentClient]; 51 | 52 | // You must push it to a UINavigationController (i.e. do not 'presentViewController') 53 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:folderViewController]; 54 | [self presentViewController:navigationController animated:YES completion:nil]; 55 | ``` 56 | 57 | Sample App 58 | ---------- 59 | A sample app can be found in the [BoxBrowseSDKSampleApp](../../tree/master/BoxBrowseSDKSampleApp) folder. To execute the sample app: 60 | Step 1: Update Carthage 61 | ``` 62 | cd BoxBrowseSDKSampleApp 63 | carthage update --platform iOS 64 | ``` 65 | Step 2: Open Workspace 66 | ``` 67 | open BoxBrowseSDKSampleApp.xcworkspace 68 | ``` 69 | 70 | Contributing 71 | ------------ 72 | See [CONTRIBUTING](CONTRIBUTING.md) on how to help out. 73 | 74 | 75 | Copyright and License 76 | --------------------- 77 | Copyright 2015 Box, Inc. All rights reserved. 78 | 79 | Licensed under the Apache License, Version 2.0 (the "License"); 80 | you may not use this file except in compliance with the License. 81 | You may obtain a copy of the License at 82 | 83 | http://www.apache.org/licenses/LICENSE-2.0 84 | 85 | Unless required by applicable law or agreed to in writing, software 86 | distributed under the License is distributed on an "AS IS" BASIS, 87 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 88 | See the License for the specific language governing permissions and 89 | limitations under the License. 90 | --------------------------------------------------------------------------------