ios8 - Today Extension not working -
i have issues in today extensions on ios8. tried debugging using xcode debugger , putting nslogs. there no logic in code well. reason:
the widget not displaying info (its working hello world label) debugging not working, doesn't reach break points. there specific way debug extensions?here code snippet
@implementation todayviewcontroller{ nsarray *locallist; } -(void)awakefromnib{ [super awakefromnib]; [self loadlist]; [self setpreferredcontentsize:self.tableview.frame.size]; nslog(@"inside awake nib"); } - (void)viewdidload { [super viewdidload]; // additional setup after loading view. nslog(@"inside view did load"); } -(void)loadlist{ nsmutablearray *mutablearray = [[nsmutablearray alloc]initwithcapacity:5]; [mutablearray addobject:@"asdjasdj"]; [mutablearray addobject:@"qowiepqiw"]; [mutablearray addobject:@"qoqwoei"]; [mutablearray addobject:@"pqoiweoqi"]; [mutablearray addobject:@"lkdsflk"]; [mutablearray addobject:@"kdjlkaj"]; locallist = [mutablearray copy]; } -(nsinteger)numberofsectionsintableview:(uitableview *)tableview{ homecoming 1; } -(nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section{ homecoming [locallist count]; } -(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ uitableviewcell *cell = [[uitableviewcell alloc]initwithstyle:uitableviewcellstyledefault reuseidentifier:@"widgetcell"]; uilabel *label = [[uilabel alloc]init]; [label settext:[locallist objectatindex:indexpath.row ]]; [[cell contentview]addsubview:label]; homecoming cell; }
to debug extension, need manually attach widget debugger.
from xcode menu "debug" -> "attach process" -> "your extension bundle id"
ios8 ios-app-extension
No comments:
Post a Comment