Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 45

syedasad2001
Aspiring developer
Profile
Posts: 38
Reg: May 12, 2014
Karachi
380
08/14/14 06:10 AM (10 years ago)

editing appDelegate file for the Reminder List Plugin

Hi, I see that I have to do some edits in the appDelegate file in order to use the Reminder List plugin. Could someone please help me in doing this? I have tried the recommendations given online but not working. Have to say that plugin is working currently, without the code edits in my iPhone simulator, but I think it will give problem when I submit to iStore. AppDelegate file is as follows. /* * Copyright David Book, buzztouch.com * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice which includes the * name(s) of the copyright holders. It must also retain this list of conditions and the * following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of David Book, or buzztouch.com nor the names of its contributors * may be used to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ #import "BT_audioPlayer.h" #import "BT_contextMenu.h" #import "BT_reachability.h" #import "BT_application.h" #import "BT_device.h" #import "BT_downloader.h" #import "BT_user.h" #import "BT_viewController.h" #import "BT_navController.h" #import "BT_tabBarController.h" @interface parentingmanual_appDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate, AVAudioPlayerDelegate, UIAlertViewDelegate>{ } @property (nonatomic) int statusBarStyle; @property (nonatomic, strong) NSString *navBarTitleTextColor; @property (nonatomic) BOOL showDebugInfo; @property (nonatomic, strong) UIWindow *window; @property (nonatomic, strong) BT_reachability *rootNetworkMonitor; @property (nonatomic, strong) BT_locationManager *rootLocationMonitor; @property (nonatomic, strong) BT_application *rootApp; @property (nonatomic, strong) BT_device *rootDevice; @property (nonatomic, strong) BT_user *rootUser; @property (nonatomic, strong) NSString *currentMode; @property (nonatomic, assign) BOOL uiIsVisible; @property (nonatomic, assign) BOOL isRefreshing; @property (nonatomic, retain) NSMutableData *receivedData; @property (nonatomic, strong) NSString *configurationFileName; @property (nonatomic, strong) NSString *saveAsFileName; @property (nonatomic, strong) NSString *modifiedFileName; @property (nonatomic, strong) BT_audioPlayer *audioPlayer; @property (nonatomic, strong) NSMutableArray *soundEffectNames; @property (nonatomic, strong) NSMutableArray *soundEffectPlayers; @property (nonatomic, strong) BT_contextMenu *contextMenu; //launch methods.. -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; -(void)applicationDidBecomeActive:(UIApplication *)application; -(void)applicationWillTerminate:(UIApplication *)application; -(void)applicationWillResignActive:(UIApplication *)application; -(void)applicationDidEnterBackground:(UIApplication *)application; -(void)applicationWillEnterForeground:(UIApplication *)application; //data methods... -(void)refreshAppData; -(void)reportToCloud; -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data; -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; -(void)connectionDidFinishLoading:(NSURLConnection *)connection; //background audio methods... -(void)loadAudioForScreen:(BT_item *)theScreenData; -(void)showAudioControls; -(void)hideAudioControls; -(void)playSoundEffect:(NSString *)theFileName; //push notification methods... -(void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken; -(void)unRegisterForPushNotifications; -(void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error; -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; -(void)playSoundFromPushMessage:(NSString *)soundEffectFileName; //helper methods... -(BT_navController *)getNavigationController; -(BT_viewController *)getViewController; -(void)networkTypeChanged:(NSNotification*)note; -(void)showAlert:(NSString *)theTitle theMessage:(NSString *)theMessage alertTag:(int)alertTag; -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex; -(void)showContextMenu; -(void)hideContextMenu; //orientation methods... -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window; @end
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/14/14 07:19 AM (10 years ago)
This is the header file (.h) of your appDelegate, not the actual method (.m) file. I just sent you an edited parentingmanual_appDelegate.m file that will work in your project. Check your email :)
 
syedasad2001
Aspiring developer
Profile
Posts: 38
Reg: May 12, 2014
Karachi
380
like
08/14/14 07:35 AM (10 years ago)
Thanks Atrain53. You are awesome!
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
09/16/14 01:26 PM (9 years ago)
Atrain - I'm having the same issue (I think).. Every time I try to upload my project to iTunes, Xcode quits unexpectedly. I'm thinking by looking at the crash report that it has to do with the reminder plugin. What is this "edited parentingmanual_appDelegate.m" you speak of?
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/17/14 06:41 AM (9 years ago)
I would probably need to see some of the crash report to know exactly what the issue is. As far as the "edited parentingmanual_appDelegate.m" That is a file syedasad2001 sent me. He didn't quite understand how to edit his appDelegate file to work with the plugin, so I sent him one with the proper edits for his project. There's a few lines of code you have to add to that file so the Notifications work with the plugin. If you need me to edit yours, let me know :)
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
09/17/14 11:12 AM (9 years ago)
My issue ended up being I was using the beta version of Xcode. I had no idea about the notifications. When you say notifications, do you mean a number by the Icon or a pop up screen? Whatever it is, I'll take it :))
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.