Quellcode durchsuchen

Exclude FLEX from release builds in the example project.

Ryan Olson vor 12 Jahren
Ursprung
Commit
9c834223fe

+ 2 - 0
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";

+ 8 - 0
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

+ 8 - 0
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