0% found this document useful (0 votes)
80 views

2020年阿里iOS面试题

The document discusses iOS debugging techniques including dSYM files, threads, operations queues, app launch process, performance optimization, and crash logs. Example techniques include using dSYM files to symbolicate crashes, Grand Central Dispatch for asynchronous operations, and TinyPNG to optimize image sizes.

Uploaded by

李龙龙
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

2020年阿里iOS面试题

The document discusses iOS debugging techniques including dSYM files, threads, operations queues, app launch process, performance optimization, and crash logs. Example techniques include using dSYM files to symbolicate crashes, Grand Central Dispatch for asynchronous operations, and TinyPNG to optimize image sizes.

Uploaded by

李龙龙
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

iOS

1.dSYM
2.
3.
4. App
5. App
6.0x8badf00d
7.
8.

1 dSYM

dSYM
dSYM Xcode dSYM
dSYM 16
symbols
dSYM /Users/<
>/Library/Developer/Xcode/Archives
Archives ( AUTOMATICALLY SAVE THE DSYM
FILES dSYM )

dSYM
release Xcode
crash report iOS
Xcode
Organizer iOS DeviceLog crash
dSYM
dSYM
Archives

--
xx.app xx.app.dSYM UUID crash
UUID UUID
1. xx.app UUID terminal
dwarfdump --uuid xx.app/xx (xx )2. xx.app.dSYM
UUID terminal dwarfdump --uuid xx.app.dSYM
3.crash Incident Identifier crash UUID
dSYM

bug
:1. xcarchive
( )2.
xcarchive xcarchive CPU
CPU 3. UUID UUID
4.

1
pthread

1 API
2 Unix\Linux\Windows
3
4
5 C
6
7

NSThread
1
2
3 OC
4
5

GCD
1 NSThread
2
3 C
4
5

NSOperation
1 GCD( GCD
2 GCD
3
4 OC
5
6

CPU 1 1
CPU
CPU
CPU N
CPU CPU

CPU

1M 512KB
CPU
2 GCD
GCD GCD
block GCD
GCD
NSOprationQueue
GCD
MacOX iOS Operation Queue
GCD
GCD iOS 4 MacOS X 10.6 Operation
Queue GCD

1 GCD C API NSOperationQueue


Objc GCD block
Operation

2 NSOperationQueue
( ) GCD queue
block( )

3 NSOperation Operation
Operation Operation

4 KVO NSOperation Operation


GCD

5 NSOperation NSOperation priority


GCD
block

6 NSOperation
block
Operation queue
API
API
API
GCD Operation queue

3
NSOperationNSOperation
1 NSOperation api NSOperationQueue
GCD GCD

2 NSOperationQueue NSOperation

3 NSOperationQueue KVO operation


isExecuted isFinished isCanceld

4 GCD FIFO NSOperationQueue


NSOperationQueue
NSOperation
NSOperation
.
/
GCD GCD

API API GCD


Operation queue

3.

1
2
3

1 “

2
3

4 APP
1 APP

Info.plist

Mach-O
CPU
Mach-O Mach-o

attribute(constructor) C

C++ Objc + load

main
UIApplicationMain
UIApplication
UIApplicationDelegate
info.plist,
Main Runloop
UIApplicationDelegate
application.didFinishLaunchingWithOptions:

info.plist storyBoard storyboard

UIWindow ->rootViewController->
5 APP
**App

main()

ObjC
C constructor
C++

ObjC +load ObjC


App
ObjC App
1 10 10
100 100 1000
1000 10000
attribute((constructor)) C
C++ ObjC +load
dispatch_once()
main()

main()

applicationWillFinishLaunching

rootViewController childViewController view subviews


applicationWillFinishLaunching

App
App
400ms main()

20 kill App
400ms main()
App
iOS
App
QQ SNG App
WiFi WiFi

App
App

1 main()

2 main() applicationWillFinishLaunching

3 App

4 App 1+2

1+2+3
1+2+3+4
iOS
QQ
“ ”

“ ”

1. WiFi

ObjC

fui Find Unused Imports

C++ Terminal cd
fui find
100% Xcode

svn rm

3 Category Category
ObjC

CPU

1.
IO
Xcode App
App Xcode

PNG

Xcode
TinyPNG

TinyPNG

SSTinyPNGRequest
SSPNGCompressor

https://tinypng.com/developers APIKey 500

5 applicationWillFinishLaunching
applicationWillFinishLaunching WiFi
iOS

applicationWillFinishLaunching

http 66 23

KPI

SNG
applicationWillFinishLaunching
WiFi

6 rootViewController
ViewController

wife UI

WiFi UI
TabBarController tab “ ” “ ” “ ” App
TabBarController Tab “
” ViewController childViewController UI
App

6 0x8badf00d
0x8badf00d: “ate bad food”! ( :p)
watchdog iOS

0xbad22222: VoIP
0xdead10cc: “dead lock”!
0xdeadfa11: “dead fall”!
, “ ”,
Home 0xdeadfa11
,

7
iOS NSUserDefaults
sqlite
URL iOS URL
URL
iOS

iOS

iOS

APP

8 iOS
4
iOS view
iOS
iOS
iOS

app
common core
MVC
UIViewController MVP MVVM MVCS
M V C

MVC

MVC
“ ” “ ”

sqlite FTS
HotFix Hybrid

*
app

App


BAT

SDK
Hybrid
BU App

13

BUG

: App

TCP

2G/3G/4G/WIFI

/ /

IP DNS

IP( Ping)
ProtocolBuffer+Gzip Payload

8.
Runtime Runloop block
SD AFN YYCache GCD JSPatch GPUImage

iOS

You might also like