CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

MCDebuggingTools 0.5.0

MCDebuggingTools 0.5.0

TestsTested
LangLanguage Obj-CObjective C
License BSD 3.0
ReleasedLast Release Dec 2014

Maintained by Mirego.



  • By
  • Mirego

MCDebuggingTools - Extermination helper

Collection of debuging tools that can be added to your project

Usage

#import "AppDelegate.h"
#import "MCMemoryWarningGenerators.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#ifdef DEBUG
  // Force memory warnings to occur every 60 seconds. Helps you ensure you're
  // handling them properly.
  PERFORM_MEMORY_WARNING_AT_INTERVAL(60);
#endif


#ifdef DEBUG
  // Allocate a block of memory every 30 seconds. Helps ensure your application
  // can survive low memory conditions.
  ALLOCATE_MEMORY_BLOCK_AT_INTERNAL(30);
#endif

  return YES;
}

MCMemoryWarrningGenerator

Extremely simple to use tool to simulate low memory conditions in your application so you can ensure that it behaves correctly when receiving memory warnings.

// generates a simulated memory warning continuously at the specified interval
// in seconds.
PERFORM_MEMORY_WARNING_AT_INTERVAL(interval);
// Allocates blocks of 5MB of memory continuously at the specified interval
// in seconds.
ALLOCATE_MEMORY_BLOCK_AT_INTERNAL(interval)

Adding to your project

If you're using CocoaPods, there's nothing simpler. Add the following to your Podfile and run pod install.

pod 'MCDebuggingTools', :git => 'https://github.com/mirego/MCDebuggingTools.git'

Don't forget to #import "MCMemoryWarningGenerators.h" where it's needed.

License

MCDebuggingTools is © 2013 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

About Mirego

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We proudly built mobile applications for iPhone, iPad, Android, Blackberry, Windows Phone and Windows 8. Learn more about our team at life.mirego.com.