Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Possible to disable all features of an iOS app after a length of time?

Hi all!

Got a weird one for you guys. Thinking of creating an iOS app where you can only use it's features within an 8 hour time span. Afterwards, the app restricts use of all it's features and just displays a 'Thanks for using the app." kind of message.

Also, I've been toying with the idea to only be able to use the app if it's within a certain wireless network?

I know this all sounds weird and unconventional but any helpful responses would be greeted with many thanks, praises, and virtual high fives.

.

1 Answer

Hey Roland Cedo,

I don't know about the wifi networks part. However, if you want to disable user interaction events in your application you can use:

UIApplication.sharedApplication().beginIgnoringInteractionEvents()

// & to turn them back on after 8 hours

UIApplication.sharedApplication().endIgnoringInteractionEvents()

Good Luck

Gotcha, I think that's one way of doing it. I was thinking of making a screen that thanks the user for using our app. I could use disabling interactions on top of that though. Thanks for the input! * air high five *