iOS App瘦身

作者: YanZi_33 | 来源:发表于2021-01-19 19:59 被阅读0次

    删除无用图片

    主要是使用一个开源的 Mac App LSUnusedResources 进行冗余图片的排查

    Snip20210119_30.png

    根据工具搜索出来的结果,然后再在工程中进行检测确定目标图片确实没有使用再进行删除操作。

    图片压缩

    删除无用文件类

    • 工程所有文件名称与文件大小的预览

    App工程在编译完成之后会生成LinkMap文件;我们可以通过LinkMap文件来获得所有的代码类和方法的信息。获取 LinkMap 可以通过配置工程 将 Build Setting 里面的 Write Link Map File 设置为 YES,然后指定 Path to Link Map File 的路径 就可以得到每次编译后的 LinkMap 文件了。

    LinkMap文件内容主要分成三个部分:

    • Object File:包含了代码工程的所有文件;
    • Section:描述了代码段在生成的 Mach-O 里的偏移位置和大小;
    • Symbols:会列出每个方法、类、Block,以及它们的大小。

    工程配置如下所示:

    Snip20210119_32.png

    编译生成的LinkMap文件路径其父文件Intermediates.noindex与.app文件的Products文件同级.

    Snip20210119_33.png

    使用LinkMap分析工具:https://github.com/huanxsd/LinkMap 得出每个类或者库所占用的空间大小(代码段+数据段),方便开发者快速定位需要优化的类或静态库。

    Snip20210119_34.png
    • 搜索出工程中所有未使用的类文件,并清除

    使用工具:CATClearProjectTool-master(https://github.com/CatchZeng/CATClearProjectTool

    Snip20210119_35.png

    删除无用方法

    1. 基于Mach-O的分析,使用otool工具获取相关数据数据
    • 首先获取所有方法
    • 其次获取被调用的所有方法;
    • 根据前面两步 取差值得到的就是未被调用的方法
    1. AppCode的使用

    LinkMap项目实战

    • 新建一个Test工程如下所示:
    Snip20210120_37.png
    • 编译生成的LinkMap文件如下:
    # Path: /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Products/Debug-iphonesimulator/Test.app/Test
    # Arch: x86_64
    # Object files:
    [  0] linker synthesized
    [  1] /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Intermediates.noindex/Test.build/Debug-iphonesimulator/Test.build/Test.app-Simulated.xcent
    [  2] /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Intermediates.noindex/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/YYXX.o
    [  3] /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Intermediates.noindex/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/ViewController.o
    [  4] /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Intermediates.noindex/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/AppDelegate.o
    [  5] /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Intermediates.noindex/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/main.o
    [  6] /Users/liyanyan33/Library/Developer/Xcode/DerivedData/Test-azsblmdskapmxmcdjqdgvsdbpvcv/Build/Intermediates.noindex/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/YYPerson.o
    [  7] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks//Foundation.framework/Foundation.tbd
    [  8] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/libobjc.tbd
    [  9] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks//UIKit.framework/UIKit.tbd
    # Sections:
    # Address   Size        Segment Section
    0x1000013C0 0x0000043D  __TEXT  __text
    0x1000017FE 0x0000004E  __TEXT  __stubs
    0x10000184C 0x00000092  __TEXT  __stub_helper
    0x1000018DE 0x0000004A  __TEXT  __objc_classname
    0x100001928 0x000000E7  __TEXT  __cstring
    0x100001A0F 0x00000B3C  __TEXT  __objc_methname
    0x10000254B 0x000008F1  __TEXT  __objc_methtype
    0x100002E3C 0x0000017A  __TEXT  __entitlements
    0x100002FB8 0x00000048  __TEXT  __unwind_info
    0x100003000 0x00000018  __DATA_CONST    __got
    0x100003018 0x00000040  __DATA_CONST    __cfstring
    0x100003058 0x00000020  __DATA_CONST    __objc_classlist
    0x100003078 0x00000008  __DATA_CONST    __objc_nlclslist
    0x100003080 0x00000010  __DATA_CONST    __objc_protolist
    0x100003090 0x00000008  __DATA_CONST    __objc_imageinfo
    0x100004000 0x00000068  __DATA  __la_symbol_ptr
    0x100004068 0x00000D80  __DATA  __objc_const
    0x100004DE8 0x00000030  __DATA  __objc_selrefs
    0x100004E18 0x00000018  __DATA  __objc_classrefs
    0x100004E30 0x00000008  __DATA  __objc_superrefs
    0x100004E38 0x00000008  __DATA  __objc_ivar
    0x100004E40 0x00000140  __DATA  __objc_data
    0x100004F80 0x000000D0  __DATA  __data
    # Symbols:
    # Address   Size        File  Name
    0x1000013C0 0x00000030  [  3] +[ViewController load]
    0x1000013F0 0x000000BA  [  3] -[ViewController viewDidLoad]
    0x1000014B0 0x00000090  [  4] -[AppDelegate application:didFinishLaunchingWithOptions:]
    0x100001540 0x00000120  [  4] -[AppDelegate application:configurationForConnectingSceneSession:options:]
    0x100001660 0x0000006C  [  4] -[AppDelegate application:didDiscardSceneSessions:]
    0x1000016D0 0x00000090  [  5] _main
    0x100001760 0x00000030  [  6] -[YYPerson name]
    0x100001790 0x00000040  [  6] -[YYPerson setName:]
    0x1000017D0 0x0000002D  [  6] -[YYPerson .cxx_destruct]
    0x1000017FE 0x00000006  [  7] _NSLog
    0x100001804 0x00000006  [  7] _NSStringFromClass
    0x10000180A 0x00000006  [  9] _UIApplicationMain
    0x100001810 0x00000006  [  8] _objc_alloc
    0x100001816 0x00000006  [  8] _objc_autoreleasePoolPop
    0x10000181C 0x00000006  [  8] _objc_autoreleasePoolPush
    0x100001822 0x00000006  [  8] _objc_autoreleaseReturnValue
    0x100001828 0x00000006  [  8] _objc_getProperty
    0x10000182E 0x00000006  [  8] _objc_msgSendSuper2
    0x100001834 0x00000006  [  8] _objc_opt_class
    0x10000183A 0x00000006  [  8] _objc_retainAutoreleasedReturnValue
    0x100001840 0x00000006  [  8] _objc_setProperty_nonatomic_copy
    0x100001846 0x00000006  [  8] _objc_storeStrong
    0x10000184C 0x00000010  [  0] helper helper
    0x10000185C 0x0000000A  [  7] _NSLog
    0x100001866 0x0000000A  [  7] _NSStringFromClass
    0x100001870 0x0000000A  [  8] _objc_alloc
    0x10000187A 0x0000000A  [  8] _objc_autoreleasePoolPop
    0x100001884 0x0000000A  [  8] _objc_autoreleasePoolPush
    0x10000188E 0x0000000A  [  8] _objc_autoreleaseReturnValue
    0x100001898 0x0000000A  [  8] _objc_getProperty
    0x1000018A2 0x0000000A  [  8] _objc_msgSendSuper2
    0x1000018AC 0x0000000A  [  8] _objc_opt_class
    0x1000018B6 0x0000000A  [  8] _objc_retainAutoreleasedReturnValue
    0x1000018C0 0x0000000A  [  8] _objc_setProperty_nonatomic_copy
    0x1000018CA 0x0000000A  [  8] _objc_storeStrong
    0x1000018D4 0x0000000A  [  9] _UIApplicationMain
    0x1000018DE 0x00000005  [  2] literal string: YYXX
    0x1000018E3 0x0000000F  [  3] literal string: ViewController
    0x1000018F2 0x0000000C  [  4] literal string: AppDelegate
    0x1000018FE 0x00000016  [  4] literal string: UIApplicationDelegate
    0x100001914 0x00000009  [  4] literal string: NSObject
    0x10000191D 0x00000009  [  6] literal string: YYPerson
    0x100001926 0x00000002  [  6] literal string: �
    0x100001928 0x00000003  [  3] literal string: %s
    0x10000192B 0x00000017  [  3] literal string: +[ViewController load]
    0x100001942 0x0000003A  [  4] literal string: -[AppDelegate application:didFinishLaunchingWithOptions:]
    0x10000197C 0x00000016  [  4] literal string: Default Configuration
    0x100001992 0x00000005  [  4] literal string: hash
    0x100001997 0x00000005  [  4] literal string: TQ,R
    0x10000199C 0x0000000B  [  4] literal string: superclass
    0x1000019A7 0x00000005  [  4] literal string: T#,R
    0x1000019AC 0x0000000C  [  4] literal string: description
    0x1000019B8 0x00000011  [  4] literal string: T@"NSString",R,C
    0x1000019C9 0x00000011  [  4] literal string: debugDescription
    0x1000019DA 0x00000007  [  4] literal string: window
    0x1000019E1 0x00000011  [  4] literal string: T@"UIWindow",&,N
    0x1000019F2 0x00000005  [  6] literal string: name
    0x1000019F7 0x00000018  [  6] literal string: T@"NSString",C,N,V_name
    0x100001A0F 0x0000000C  [  3] literal string: viewDidLoad
    0x100001A1B 0x0000000C  [  3] literal string: purpleColor
    0x100001A27 0x00000005  [  3] literal string: view
    0x100001A2C 0x00000014  [  3] literal string: setBackgroundColor:
    0x100001A40 0x00000005  [  3] literal string: load
    0x100001A45 0x00000005  [  4] literal string: role
    0x100001A4A 0x0000001A  [  4] literal string: initWithName:sessionRole:
    0x100001A64 0x00000009  [  4] literal string: isEqual:
    0x100001A6D 0x00000006  [  4] literal string: class
    0x100001A73 0x00000005  [  4] literal string: self
    0x100001A78 0x00000011  [  4] literal string: performSelector:
    0x100001A89 0x0000001C  [  4] literal string: performSelector:withObject:
    0x100001AA5 0x00000027  [  4] literal string: performSelector:withObject:withObject:
    0x100001ACC 0x00000008  [  4] literal string: isProxy
    0x100001AD4 0x0000000F  [  4] literal string: isKindOfClass:
    0x100001AE3 0x00000011  [  4] literal string: isMemberOfClass:
    0x100001AF4 0x00000014  [  4] literal string: conformsToProtocol:
    0x100001B08 0x00000014  [  4] literal string: respondsToSelector:
    0x100001B1C 0x00000007  [  4] literal string: retain
    0x100001B23 0x00000008  [  4] literal string: release
    0x100001B2B 0x0000000C  [  4] literal string: autorelease
    0x100001B37 0x0000000C  [  4] literal string: retainCount
    0x100001B43 0x00000005  [  4] literal string: zone
    0x100001B48 0x00000005  [  4] literal string: hash
    0x100001B4D 0x0000000B  [  4] literal string: superclass
    0x100001B58 0x0000000C  [  4] literal string: description
    0x100001B64 0x00000011  [  4] literal string: debugDescription
    0x100001B75 0x0000001F  [  4] literal string: applicationDidFinishLaunching:
    0x100001B94 0x0000002C  [  4] literal string: application:willFinishLaunchingWithOptions:
    0x100001BC0 0x0000002B  [  4] literal string: application:didFinishLaunchingWithOptions:
    0x100001BEB 0x0000001C  [  4] literal string: applicationDidBecomeActive:
    0x100001C07 0x0000001D  [  4] literal string: applicationWillResignActive:
    0x100001C24 0x0000001B  [  4] literal string: application:handleOpenURL:
    0x100001C3F 0x00000032  [  4] literal string: application:openURL:sourceApplication:annotation:
    0x100001C71 0x0000001D  [  4] literal string: application:openURL:options:
    0x100001C8E 0x00000024  [  4] literal string: applicationDidReceiveMemoryWarning:
    0x100001CB2 0x0000001A  [  4] literal string: applicationWillTerminate:
    0x100001CCC 0x00000022  [  4] literal string: applicationSignificantTimeChange:
    0x100001CEE 0x00000035  [  4] literal string: application:willChangeStatusBarOrientation:duration:
    0x100001D23 0x0000002B  [  4] literal string: application:didChangeStatusBarOrientation:
    0x100001D4E 0x00000026  [  4] literal string: application:willChangeStatusBarFrame:
    0x100001D74 0x00000025  [  4] literal string: application:didChangeStatusBarFrame:
    0x100001D99 0x00000031  [  4] literal string: application:didRegisterUserNotificationSettings:
    0x100001DCA 0x0000003E  [  4] literal string: application:didRegisterForRemoteNotificationsWithDeviceToken:
    0x100001E08 0x0000003E  [  4] literal string: application:didFailToRegisterForRemoteNotificationsWithError:
    0x100001E46 0x0000002A  [  4] literal string: application:didReceiveRemoteNotification:
    0x100001E70 0x00000029  [  4] literal string: application:didReceiveLocalNotification:
    0x100001E99 0x0000004F  [  4] literal string: application:handleActionWithIdentifier:forLocalNotification:completionHandler:
    0x100001EE8 0x00000061  [  4] literal string: application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:
    0x100001F49 0x00000050  [  4] literal string: application:handleActionWithIdentifier:forRemoteNotification:completionHandler:
    0x100001F99 0x00000060  [  4] literal string: application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:
    0x100001FF9 0x00000041  [  4] literal string: application:didReceiveRemoteNotification:fetchCompletionHandler:
    0x10000203A 0x0000002F  [  4] literal string: application:performFetchWithCompletionHandler:
    0x100002069 0x0000003C  [  4] literal string: application:performActionForShortcutItem:completionHandler:
    0x1000020A5 0x00000043  [  4] literal string: application:handleEventsForBackgroundURLSession:completionHandler:
    0x1000020E8 0x00000032  [  4] literal string: application:handleWatchKitExtensionRequest:reply:
    0x10000211A 0x0000002D  [  4] literal string: applicationShouldRequestHealthAuthorization:
    0x100002147 0x0000002C  [  4] literal string: application:handleIntent:completionHandler:
    0x100002173 0x0000001F  [  4] literal string: applicationDidEnterBackground:
    0x100002192 0x00000020  [  4] literal string: applicationWillEnterForeground:
    0x1000021B2 0x0000002F  [  4] literal string: applicationProtectedDataWillBecomeUnavailable:
    0x1000021E1 0x0000002C  [  4] literal string: applicationProtectedDataDidBecomeAvailable:
    0x10000220D 0x00000035  [  4] literal string: application:supportedInterfaceOrientationsForWindow:
    0x100002242 0x00000031  [  4] literal string: application:shouldAllowExtensionPointIdentifier:
    0x100002273 0x0000003F  [  4] literal string: application:viewControllerWithRestorationIdentifierPath:coder:
    0x1000022B2 0x0000002E  [  4] literal string: application:shouldSaveSecureApplicationState:
    0x1000022E0 0x00000031  [  4] literal string: application:shouldRestoreSecureApplicationState:
    0x100002311 0x00000030  [  4] literal string: application:willEncodeRestorableStateWithCoder:
    0x100002341 0x0000002F  [  4] literal string: application:didDecodeRestorableStateWithCoder:
    0x100002370 0x00000028  [  4] literal string: application:shouldSaveApplicationState:
    0x100002398 0x0000002B  [  4] literal string: application:shouldRestoreApplicationState:
    0x1000023C3 0x0000002E  [  4] literal string: application:willContinueUserActivityWithType:
    0x1000023F1 0x00000035  [  4] literal string: application:continueUserActivity:restorationHandler:
    0x100002426 0x00000039  [  4] literal string: application:didFailToContinueUserActivityWithType:error:
    0x10000245F 0x00000023  [  4] literal string: application:didUpdateUserActivity:
    0x100002482 0x00000034  [  4] literal string: application:userDidAcceptCloudKitShareWithMetadata:
    0x1000024B6 0x0000003C  [  4] literal string: application:configurationForConnectingSceneSession:options:
    0x1000024F2 0x00000025  [  4] literal string: application:didDiscardSceneSessions:
    0x100002517 0x00000007  [  4] literal string: window
    0x10000251E 0x0000000B  [  4] literal string: setWindow:
    0x100002529 0x0000000E  [  6] literal string: .cxx_destruct
    0x100002537 0x00000005  [  6] literal string: name
    0x10000253C 0x00000009  [  6] literal string: setName:
    0x100002545 0x00000006  [  6] literal string: _name
    0x10000254B 0x00000008  [  3] literal string: v16@0:8
    0x100002553 0x0000000B  [  4] literal string: B24@0:8@16
    0x10000255E 0x00000008  [  4] literal string: #16@0:8
    0x100002566 0x00000008  [  4] literal string: @16@0:8
    0x10000256E 0x0000000B  [  4] literal string: @24@0:8:16
    0x100002579 0x0000000E  [  4] literal string: @32@0:8:16@24
    0x100002587 0x00000011  [  4] literal string: @40@0:8:16@24@32
    0x100002598 0x00000008  [  4] literal string: B16@0:8
    0x1000025A0 0x0000000B  [  4] literal string: B24@0:8#16
    0x1000025AB 0x0000000B  [  4] literal string: B24@0:8:16
    0x1000025B6 0x00000009  [  4] literal string: Vv16@0:8
    0x1000025BF 0x00000008  [  4] literal string: Q16@0:8
    0x1000025C7 0x00000012  [  4] literal string: ^{_NSZone=}16@0:8
    0x1000025D9 0x00000015  [  4] literal string: B24@0:8@"Protocol"16
    0x1000025EE 0x00000012  [  4] literal string: @"NSString"16@0:8
    0x100002600 0x0000000B  [  4] literal string: v24@0:8@16
    0x10000260B 0x0000000E  [  4] literal string: B32@0:8@16@24
    0x100002619 0x00000014  [  4] literal string: B48@0:8@16@24@32@40
    0x10000262D 0x00000011  [  4] literal string: B40@0:8@16@24@32
    0x10000263E 0x00000011  [  4] literal string: v40@0:8@16q24d32
    0x10000264F 0x0000000E  [  4] literal string: v32@0:8@16q24
    0x10000265D 0x0000002D  [  4] literal string: v56@0:8@16{CGRect={CGPoint=dd}{CGSize=dd}}24
    0x10000268A 0x0000000E  [  4] literal string: v32@0:8@16@24
    0x100002698 0x00000015  [  4] literal string: v48@0:8@16@24@32@?40
    0x1000026AD 0x00000018  [  4] literal string: v56@0:8@16@24@32@40@?48
    0x1000026C5 0x00000012  [  4] literal string: v40@0:8@16@24@?32
    0x1000026D7 0x0000000F  [  4] literal string: v32@0:8@16@?24
    0x1000026E6 0x0000000E  [  4] literal string: Q32@0:8@16@24
    0x1000026F4 0x00000011  [  4] literal string: @40@0:8@16@24@32
    0x100002705 0x00000012  [  4] literal string: B40@0:8@16@24@?32
    0x100002717 0x00000011  [  4] literal string: v40@0:8@16@24@32
    0x100002728 0x0000001A  [  4] literal string: v24@0:8@"UIApplication"16
    0x100002742 0x0000002B  [  4] literal string: B32@0:8@"UIApplication"16@"NSDictionary"24
    0x10000276D 0x00000024  [  4] literal string: B32@0:8@"UIApplication"16@"NSURL"24
    0x100002791 0x00000034  [  4] literal string: B48@0:8@"UIApplication"16@"NSURL"24@"NSString"32@40
    0x1000027C5 0x00000035  [  4] literal string: B40@0:8@"UIApplication"16@"NSURL"24@"NSDictionary"32
    0x1000027FA 0x00000020  [  4] literal string: v40@0:8@"UIApplication"16q24d32
    0x10000281A 0x0000001D  [  4] literal string: v32@0:8@"UIApplication"16q24
    0x100002837 0x0000003C  [  4] literal string: v56@0:8@"UIApplication"16{CGRect={CGPoint=dd}{CGSize=dd}}24
    0x100002873 0x00000039  [  4] literal string: v32@0:8@"UIApplication"16@"UIUserNotificationSettings"24
    0x1000028AC 0x00000025  [  4] literal string: v32@0:8@"UIApplication"16@"NSData"24
    0x1000028D1 0x00000026  [  4] literal string: v32@0:8@"UIApplication"16@"NSError"24
    0x1000028F7 0x0000002B  [  4] literal string: v32@0:8@"UIApplication"16@"NSDictionary"24
    0x100002922 0x00000032  [  4] literal string: v32@0:8@"UIApplication"16@"UILocalNotification"24
    0x100002954 0x00000048  [  4] literal string: v48@0:8@"UIApplication"16@"NSString"24@"UILocalNotification"32@?<v@?>40
    0x10000299C 0x00000052  [  4] literal string: v56@0:8@"UIApplication"16@"NSString"24@"NSDictionary"32@"NSDictionary"40@?<v@?>48
    0x1000029EE 0x00000041  [  4] literal string: v48@0:8@"UIApplication"16@"NSString"24@"NSDictionary"32@?<v@?>40
    0x100002A2F 0x00000059  [  4] literal string: v56@0:8@"UIApplication"16@"NSString"24@"UILocalNotification"32@"NSDictionary"40@?<v@?>48
    0x100002A88 0x00000035  [  4] literal string: v40@0:8@"UIApplication"16@"NSDictionary"24@?<v@?Q>32
    0x100002ABD 0x00000024  [  4] literal string: v32@0:8@"UIApplication"16@?<v@?Q>24
    0x100002AE1 0x00000042  [  4] literal string: v40@0:8@"UIApplication"16@"UIApplicationShortcutItem"24@?<v@?B>32
    0x100002B23 0x00000030  [  4] literal string: v40@0:8@"UIApplication"16@"NSString"24@?<v@?>32
    0x100002B53 0x00000043  [  4] literal string: v40@0:8@"UIApplication"16@"NSDictionary"24@?<v@?@"NSDictionary">32
    0x100002B96 0x00000043  [  4] literal string: v40@0:8@"UIApplication"16@"INIntent"24@?<v@?@"INIntentResponse">32
    0x100002BD9 0x00000027  [  4] literal string: Q32@0:8@"UIApplication"16@"UIWindow"24
    0x100002C00 0x00000027  [  4] literal string: B32@0:8@"UIApplication"16@"NSString"24
    0x100002C27 0x00000044  [  4] literal string: @"UIViewController"40@0:8@"UIApplication"16@"NSArray"24@"NSCoder"32
    0x100002C6B 0x00000026  [  4] literal string: B32@0:8@"UIApplication"16@"NSCoder"24
    0x100002C91 0x00000026  [  4] literal string: v32@0:8@"UIApplication"16@"NSCoder"24
    0x100002CB7 0x00000040  [  4] literal string: B40@0:8@"UIApplication"16@"NSUserActivity"24@?<v@?@"NSArray">32
    0x100002CF7 0x00000033  [  4] literal string: v40@0:8@"UIApplication"16@"NSString"24@"NSError"32
    0x100002D2A 0x0000002D  [  4] literal string: v32@0:8@"UIApplication"16@"NSUserActivity"24
    0x100002D57 0x0000002E  [  4] literal string: v32@0:8@"UIApplication"16@"CKShareMetadata"24
    0x100002D85 0x00000060  [  4] literal string: @"UISceneConfiguration"40@0:8@"UIApplication"16@"UISceneSession"24@"UISceneConnectionOptions"32
    0x100002DE5 0x00000024  [  4] literal string: v32@0:8@"UIApplication"16@"NSSet"24
    0x100002E09 0x00000012  [  4] literal string: @"UIWindow"16@0:8
    0x100002E1B 0x00000015  [  4] literal string: v24@0:8@"UIWindow"16
    0x100002E30 0x0000000C  [  6] literal string: @"NSString"
    0x100002E3C 0x0000017A  [  1] opaque_section
    0x100002FB8 0x00000048  [  0] compact unwind info
    0x100003000 0x00000008  [  0] non-lazy-pointer-to-local: _objc_msgSend
    0x100003008 0x00000008  [  0] non-lazy-pointer-to-local: _objc_release
    0x100003010 0x00000008  [  0] non-lazy-pointer-to-local: dyld_stub_binder
    0x100003018 0x00000020  [  3] CFString
    0x100003038 0x00000020  [  4] CFString
    0x100003058 0x00000008  [  2] anon
    0x100003060 0x00000008  [  3] anon
    0x100003068 0x00000008  [  4] anon
    0x100003070 0x00000008  [  6] anon
    0x100003078 0x00000008  [  3] anon
    0x100003080 0x00000008  [  4] __OBJC_LABEL_PROTOCOL_$_NSObject
    0x100003088 0x00000008  [  4] __OBJC_LABEL_PROTOCOL_$_UIApplicationDelegate
    0x100003090 0x00000008  [  0] objc image info
    0x100004000 0x00000008  [  7] _NSLog
    0x100004008 0x00000008  [  7] _NSStringFromClass
    0x100004010 0x00000008  [  9] _UIApplicationMain
    0x100004018 0x00000008  [  8] _objc_alloc
    0x100004020 0x00000008  [  8] _objc_autoreleasePoolPop
    0x100004028 0x00000008  [  8] _objc_autoreleasePoolPush
    0x100004030 0x00000008  [  8] _objc_autoreleaseReturnValue
    0x100004038 0x00000008  [  8] _objc_getProperty
    0x100004040 0x00000008  [  8] _objc_msgSendSuper2
    0x100004048 0x00000008  [  8] _objc_opt_class
    0x100004050 0x00000008  [  8] _objc_retainAutoreleasedReturnValue
    0x100004058 0x00000008  [  8] _objc_setProperty_nonatomic_copy
    0x100004060 0x00000008  [  8] _objc_storeStrong
    0x100004068 0x00000048  [  2] l_OBJC_METACLASS_RO_$_YYXX
    0x1000040B0 0x00000048  [  2] l_OBJC_CLASS_RO_$_YYXX
    0x1000040F8 0x00000020  [  3] l_OBJC_$_CLASS_METHODS_ViewController
    0x100004118 0x00000048  [  3] l_OBJC_METACLASS_RO_$_ViewController
    0x100004160 0x00000020  [  3] l_OBJC_$_INSTANCE_METHODS_ViewController
    0x100004180 0x00000048  [  3] l_OBJC_CLASS_RO_$_ViewController
    0x1000041C8 0x000001D0  [  4] l_OBJC_$_PROTOCOL_INSTANCE_METHODS_NSObject
    0x100004398 0x00000020  [  4] l_OBJC_$_PROTOCOL_INSTANCE_METHODS_OPT_NSObject
    0x1000043B8 0x00000048  [  4] l_OBJC_$_PROP_LIST_NSObject
    0x100004400 0x000000A0  [  4] l_OBJC_$_PROTOCOL_METHOD_TYPES_NSObject
    0x1000044A0 0x00000018  [  4] l_OBJC_$_PROTOCOL_REFS_UIApplicationDelegate
    0x1000044B8 0x00000500  [  4] l_OBJC_$_PROTOCOL_INSTANCE_METHODS_OPT_UIApplicationDelegate
    0x1000049B8 0x00000018  [  4] l_OBJC_$_PROP_LIST_UIApplicationDelegate
    0x1000049D0 0x000001A8  [  4] l_OBJC_$_PROTOCOL_METHOD_TYPES_UIApplicationDelegate
    0x100004B78 0x00000018  [  4] l_OBJC_CLASS_PROTOCOLS_$_AppDelegate
    0x100004B90 0x00000048  [  4] l_OBJC_METACLASS_RO_$_AppDelegate
    0x100004BD8 0x00000050  [  4] l_OBJC_$_INSTANCE_METHODS_AppDelegate
    0x100004C28 0x00000058  [  4] l_OBJC_$_PROP_LIST_AppDelegate
    0x100004C80 0x00000048  [  4] l_OBJC_CLASS_RO_$_AppDelegate
    0x100004CC8 0x00000048  [  6] l_OBJC_METACLASS_RO_$_YYPerson
    0x100004D10 0x00000050  [  6] l_OBJC_$_INSTANCE_METHODS_YYPerson
    0x100004D60 0x00000028  [  6] l_OBJC_$_INSTANCE_VARIABLES_YYPerson
    0x100004D88 0x00000018  [  6] l_OBJC_$_PROP_LIST_YYPerson
    0x100004DA0 0x00000048  [  6] l_OBJC_CLASS_RO_$_YYPerson
    0x100004DE8 0x00000008  [  3] pointer-to-literal-cstring
    0x100004DF0 0x00000008  [  3] pointer-to-literal-cstring
    0x100004DF8 0x00000008  [  3] pointer-to-literal-cstring
    0x100004E00 0x00000008  [  3] pointer-to-literal-cstring
    0x100004E08 0x00000008  [  4] pointer-to-literal-cstring
    0x100004E10 0x00000008  [  4] pointer-to-literal-cstring
    0x100004E18 0x00000008  [  3] objc-class-ref
    0x100004E20 0x00000008  [  4] objc-class-ref
    0x100004E28 0x00000008  [  5] objc-class-ref
    0x100004E30 0x00000008  [  3] anon
    0x100004E38 0x00000008  [  6] _OBJC_IVAR_$_YYPerson._name
    0x100004E40 0x00000028  [  2] _OBJC_METACLASS_$_YYXX
    0x100004E68 0x00000028  [  2] _OBJC_CLASS_$_YYXX
    0x100004E90 0x00000028  [  3] _OBJC_CLASS_$_ViewController
    0x100004EB8 0x00000028  [  3] _OBJC_METACLASS_$_ViewController
    0x100004EE0 0x00000028  [  4] _OBJC_METACLASS_$_AppDelegate
    0x100004F08 0x00000028  [  4] _OBJC_CLASS_$_AppDelegate
    0x100004F30 0x00000028  [  6] _OBJC_METACLASS_$_YYPerson
    0x100004F58 0x00000028  [  6] _OBJC_CLASS_$_YYPerson
    0x100004F80 0x00000008  [  0] __dyld_private
    0x100004F88 0x00000004  [  3] _a
    0x100004F90 0x00000060  [  4] __OBJC_PROTOCOL_$_NSObject
    0x100004FF0 0x00000060  [  4] __OBJC_PROTOCOL_$_UIApplicationDelegate
    
    # Dead Stripped Symbols:
    #           Size        File  Name
    <<dead>>    0x00000018  [  3] CIE
    <<dead>>    0x00000003  [  4] literal string: %s
    <<dead>>    0x00000020  [  4] CFString
    <<dead>>    0x00000018  [  4] CIE
    <<dead>>    0x00000018  [  5] CIE
    <<dead>>    0x00000008  [  6] literal string: v16@0:8
    <<dead>>    0x00000008  [  6] literal string: @16@0:8
    <<dead>>    0x0000000B  [  6] literal string: v24@0:8@16
    <<dead>>    0x00000018  [  6] CIE
    

    看到LinkMap的三部分组成

    相关文章

      网友评论

        本文标题:iOS App瘦身

        本文链接:https://www.haomeiwen.com/subject/pahczktx.html