I have built an activator listener that will open a UIAlert open being activated. Everything works great, except every time I open an app i get this message:
here is my .m file, tell me if there is anything else you need:
//
// Activate_Reminders.m
// Activate Reminders
//
// Created by Miles Bernhard on 3/4/13.
// Copyright (c) 2013 W1ld Appl3s. All rights reserved.
//
(BOOL)dismiss
{
if (av)
{
[av dismissWithClickedButtonIndex:[av cancelButtonIndex] animated:YES];
[av release];
av = nil;
return YES;
}
return NO;
}
(void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
{
[av release];
av = nil;
}
(void)activator:(LAActivator )activator receiveEvent:(LAEvent )event
{
if (![self dismiss])
{
av = [[UIAlertView alloc] initWithTitle:@"Backup!" message:@"Backup your iDevice now!" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[av show];
[event setHandled:YES];
}
}
(void)activator:(LAActivator )activator abortEvent:(LAEvent )event
{
// Called when event is escalated to higher event
[self dismiss];
}
(void)activator:(LAActivator )activator otherListenerDidHandleEvent:(LAEvent )event
{
// Called when other listener receives an event
[self dismiss];
}
(void)activator:(LAActivator )activator receiveDeactivateEvent:(LAEvent )event
{
// Called when the home button is pressed.
// If showing UI, then dismiss it and call setHandled:.
if ([self dismiss])
[event setHandled:YES];
}
I have built an activator listener that will open a UIAlert open being activated. Everything works great, except every time I open an app i get this message: here is my .m file, tell me if there is anything else you need: // // Activate_Reminders.m // Activate Reminders // // Created by Miles Bernhard on 3/4/13. // Copyright (c) 2013 W1ld Appl3s. All rights reserved. //
// LibActivator by Ryan Petrich // See https://github.com/rpetrich/libactivator
import <Foundation/Foundation.h>
import <UIKit/UIKit.h>
import <libactivator/libactivator.h>
@interface Activate_Reminders : NSObject<LAListener, UIAlertViewDelegate> { @private UIAlertView *av; } @end
@implementation Activate_Reminders
(void)load { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[[LAActivator sharedInstance] registerListener:[self new] forName:@"W1ld-Appl3s.Activate-Reminders"];
[pool release]; }
@end
Thanks So Much! W1ld Appl3s