From 9c834223fe4c5986eb876ea2fe3cf7129d2beef3 Mon Sep 17 00:00:00 2001 From: Ryan Olson Date: Sat, 19 Jul 2014 18:16:06 -0700 Subject: [PATCH] Exclude FLEX from release builds in the example project. --- Example/UICatalog.xcodeproj/project.pbxproj | 2 ++ Example/UICatalog/AAPLCatalogTableTableViewController.m | 8 ++++++++ Example/UICatalog/AAPLMasterViewController.m | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/Example/UICatalog.xcodeproj/project.pbxproj b/Example/UICatalog.xcodeproj/project.pbxproj index 8be18ce..0ade43d 100644 --- a/Example/UICatalog.xcodeproj/project.pbxproj +++ b/Example/UICatalog.xcodeproj/project.pbxproj @@ -823,6 +823,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + EXCLUDED_SOURCE_FILE_NAMES = ""; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "UICatalog/UICatalog-Prefix.pch"; INFOPLIST_FILE = "UICatalog/UICatalog-Info.plist"; @@ -836,6 +837,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + EXCLUDED_SOURCE_FILE_NAMES = "FLEX*"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "UICatalog/UICatalog-Prefix.pch"; INFOPLIST_FILE = "UICatalog/UICatalog-Info.plist"; diff --git a/Example/UICatalog/AAPLCatalogTableTableViewController.m b/Example/UICatalog/AAPLCatalogTableTableViewController.m index 5dad774..060d045 100644 --- a/Example/UICatalog/AAPLCatalogTableTableViewController.m +++ b/Example/UICatalog/AAPLCatalogTableTableViewController.m @@ -5,7 +5,11 @@ // Created by Ryan Olson on 7/17/14. #import "AAPLCatalogTableTableViewController.h" + +#if DEBUG +// FLEX should only be compiled and used in debug builds. #import "FLEXManager.h" +#endif @interface AAPLCatalogTableTableViewController () @@ -17,13 +21,17 @@ { [super viewDidLoad]; +#if DEBUG self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"FLEX" style:UIBarButtonItemStylePlain target:self action:@selector(flexButtonTapped:)]; +#endif } - (void)flexButtonTapped:(id)sender { +#if DEBUG // This call shows the FLEX toolbar if it's not already shown. [[FLEXManager sharedManager] showExplorer]; +#endif } @end diff --git a/Example/UICatalog/AAPLMasterViewController.m b/Example/UICatalog/AAPLMasterViewController.m index 33c509c..561129d 100644 --- a/Example/UICatalog/AAPLMasterViewController.m +++ b/Example/UICatalog/AAPLMasterViewController.m @@ -46,7 +46,11 @@ */ #import "AAPLMasterViewController.h" + +#if DEBUG +// FLEX should only be compiled and used in debug builds. #import "FLEXManager.h" +#endif @implementation AAPLMasterViewController @@ -54,12 +58,16 @@ { [super viewDidLoad]; +#if DEBUG self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"FLEX" style:UIBarButtonItemStylePlain target:self action:@selector(flexButtonTapped:)]; +#endif } - (void)flexButtonTapped:(id)sender { +#if DEBUG [[FLEXManager sharedManager] showExplorer]; +#endif } // When a segue from the AAPLMasterViewController's table view is triggered, we want to ensure that the current detail view controller's