ios - how to find size of my iphone app programatically? -
i'm working on finding size of iphone app along frameworks didn't find way how this.can provide me code this?i got code of finding current memory usage of app while running.
nsstring *folderpath = [[nsbundle mainbundle] bundlepath]; nsarray *filesarray = [[nsfilemanager defaultmanager] subpathsofdirectoryatpath:folderpath error:nil]; nsenumerator *filesenumerator = [filesarray objectenumerator]; nsstring *filename; unsigned long long int filesize = 0; while (filename = [filesenumerator nextobject]) { nsdictionary *filedictionary = [[nsfilemanager defaultmanager] fileattributesatpath:[folderpath stringbyappendingpathcomponent:filename] traverselink:yes]; filesize += [filedictionary filesize]; } nslog(@"app size : %lld",filesize);
Comments
Post a Comment