- Notifications
You must be signed in to change notification settings - Fork2
💪 Simulate iOS on-device memory warnings like a hero.
License
torinkwok/AllYourMemoriesAreBelong2iOS
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Yep.
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
orapplicationDidReceiveMemoryWarning:
method in myViewControllers orAppDelegate 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.
Induces memory warnings through simply pressing the physicalvolume buttons on iOS devices (like a hero)
Workstransparently. To useAllYourMemoriesAreBelong2iOS, all you have to do is just to link this framework to your app and hit the
Run
button to build/run theDebug scheme. You would never be bothered configuring anything. Also, the debug codes within this framework would never be shipped in releasing versionSupports hot-swapability forfacebook/KVOController. That is to say, once your app has linked toKVOController.framework, the internal mechanism ofAllYourMemoriesAreBelong2iOS would take advantage of it automatically, otherwise the raw KVO API will be choosen instead
If you useCarthage to manage your dependencies:
- Simply addAllYourMemoriesAreBelong2iOS to your
Cartfile
:
github "TorinKwok/AllYourMemoriesAreBelong2iOS" ~> 1.0.3
Click
File
->Add Files to "$PROJECT_NAME"
item in Xcode menu bar. Choose theAllYourMemoriesAreBelong2iOS.xcodeproj
EmbedAllYourMemoriesAreBelong2iOS in
General
panel
To install usingCocoaPods, add the following to your project Podfile:
pod'AllYourMemoriesAreBelong2iOS','~>1.0.3'
- Clone and incorporate this repo into your project with
git submodule
command:
git submodule add https://github.com/TorinKwok/AllYourMemoriesAreBelong2iOS.git"$SRC_ROOT" --recursive`
- The remaining steps are identical to the last two inCarthage section
Make sure that your project is being built with theDebug scheme. Keep in mind thatAllYourMemoriesAreBelong2iOS 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
Press physical volume buttons on your iOS devices to induce the system memory warnings. You will want to process those notifications in
didReceiveMemoryWarning
orapplicationDidReceiveMemoryWarning:
method in theViewControllers orAppDelegate
Torin Kwok.
- Email:
dG9yaW5Aa3dvay5pbQ==
(base64ed) - OpenPGP/GnuPG:fetch pub key
- GitHub:@TorinKwok
MIT.
About
💪 Simulate iOS on-device memory warnings like a hero.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.