AllYourMemoriesAreBelong2iOS 1.0.3

AllYourMemoriesAreBelong2iOS 1.0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2017

Maintained by Torin Kwok.



Broken English?

Yep.

What's this?

A kind of questions frequently asked on StackOverflow:

I'd like to test my app functions well in low memory conditions, but it's difficult to test. How can I induce low memory warnings that trigger the didReceiveMemoryWarning or applicationDidReceiveMemoryWarning: method in my ViewControllers or AppDelegate when the app is running on the real device, NOT the simulator? Or what are some ways I can test my app under these possible conditions?

The reason I can't use the simulator is my app uses Game Center and invites don't work on the simulator.

AllYourMemoriesAreBelong2iOS is an elegant solution to those problems. With using it, it became incredibly easy to simulate iOS on-device memory warnings.

Features

  • Induces memory warnings through simply pressing the physical volume buttons on iOS devices (like a hero)

  • Works transparently. To use AllYourMemoriesAreBelong2iOS, all you have to do is just to link this framework to your app and hit the Run button to build/run the Debug scheme. You would never be bothered configuring anything. Also, the debug codes within this framework would never be shipped in releasing version

  • Supports hot-swapability for facebook/KVOController. That is to say, once your app has linked to KVOController.framework, the internal mechanism of AllYourMemoriesAreBelong2iOS would take advantage of it automatically, otherwise the raw KVO API will be choosen instead

Installation

Git Submodule

  1. Clone and incorporate this repo into your project with git submodule command:
git submodule add https://github.com/TorinKwok/AllYourMemoriesAreBelong2iOS.git "$SRC_ROOT" --recursive`
  1. The remaining steps are identical to the last two in Carthage section

Usage

  1. Make sure that your project is being built with the Debug scheme. Keep in mind that AllYourMemoriesAreBelong2iOS is impossible without invocations to Apple private APIs, hence its all internal implementation was masked in releasing version, since, if not so, there's a distinct possibility that your app would be rejected by iTunes Connect reviewers

  2. Press physical volume buttons on your iOS devices to induce the system memory warnings. You will want to process those notifications in didReceiveMemoryWarning or applicationDidReceiveMemoryWarning: method in the ViewControllers or AppDelegate

Author

Torin Kwok.

Contact me

License

MIT.