Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

💪 Simulate iOS on-device memory warnings like a hero.

License

NotificationsYou must be signed in to change notification settings

torinkwok/AllYourMemoriesAreBelong2iOS

Repository files navigation

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 thedidReceiveMemoryWarning 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.

Carthage compatiblepod-validablity-badgeversion-badgelicense-badge

Features

  • 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 theRun 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 version

  • Supports 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

Installation

Carthage

If you useCarthage to manage your dependencies:

  1. Simply addAllYourMemoriesAreBelong2iOS to yourCartfile:
github "TorinKwok/AllYourMemoriesAreBelong2iOS" ~> 1.0.3
  1. ClickFile ->Add Files to "$PROJECT_NAME" item in Xcode menu bar. Choose theAllYourMemoriesAreBelong2iOS.xcodeproj

  2. EmbedAllYourMemoriesAreBelong2iOS inGeneral panel

CocoaPods

To install usingCocoaPods, add the following to your project Podfile:

pod'AllYourMemoriesAreBelong2iOS','~>1.0.3'

Git Submodule

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

Usage

  1. 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

  2. Press physical volume buttons on your iOS devices to induce the system memory warnings. You will want to process those notifications indidReceiveMemoryWarning orapplicationDidReceiveMemoryWarning: method in theViewControllers orAppDelegate

Author

Torin Kwok.

Contact me

License

MIT.

About

💪 Simulate iOS on-device memory warnings like a hero.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp