1. 程式人生 > >iOS 應用程式 Crash檔案的理解與分析

iOS 應用程式 Crash檔案的理解與分析

Understanding and Analyzing iOS Application Crash Reports

https://developer.apple.com/library/ios/technotes/tn2151/_index.html

Technical Note TN2151

Understanding and Analyzing iOS Application Crash Reports

When an application crashes, a crash report is created which is very useful for understanding what caused the crash. This document contains essential information about how to symbolicate, understand, and interpret crash reports.

Introduction

When an application crashes on an iOS device, a crash report is created and stored on the device. Crash reports describe the conditions under which the application terminated, in most cases including a complete backtrace for each executing thread, and are typically very useful for debugging issues in the application. If you are an iOS developer, you should look at these crash reports to understand what crashes your application is having, and then try to fix them.

Crash reports with backtraces need to be symbolicated before they can be analyzed. Symbolication replaces memory addresses with human-readable function names and line numbers. If you get crash logs off a device through Xcode's Devices window, then they will be symbolicated for you automatically after a few seconds. Otherwise you will need to symbolicate the .crash

 file yourself by importing it to the Xcode Devices window. See Symbolication for details.

Low Memory report differs from other crash reports in that there are no backtraces in this type of report. When a low memory crash happens, you must investigate your memory usage patterns and your responses to low memory warnings. This document points to you several memory management references that you might find useful.

Acquiring Crash and Low Memory Reports

 discusses how to retrieve crash and low memory reports directly from an iOS device.

 in the  discusses how to view aggregate crash reports collected from TestFlight beta testers and users who have downloaded your app from the App Store.

Analyzing Crash Reports

This section discusses each of the sections found within a standard crash report.

Header

Every crash report begins with a header.

Listing 1  Excerpt of the header from a crash report.

Incident Identifier: E6EBC860-0222-4B82-BF7A-2B1C26BE1E85
CrashReporter Key: 6196484647b3431a9bc2833c19422539549f3dbe
Hardware Model: iPhone6,1
Process: TheElements [4637]
Path: /private/var/mobile/Containers/Bundle/Application/5A9E4FC2-D03B-4E19-9A91-104A0D0C1D44/TheElements.app/TheElements
Identifier: com.example.apple-samplecode.TheElements
Version: 1.12
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2015-04-06 09:14:08.775 -0700
Launch Time: 2015-04-06 09:14:08.597 -0700
OS Version: iOS 8.1.3 (12B466)
Report Version: 105

Most of the fields are self-explanatory but a few deserve special note:

  • Incident Identifier: A unique identifier for the report. Two reports will never share the same Incident Identifier.

  • CrashReporter Key: An anonymized per-device identifier. Two reports from the same device will contain identical values.

  • Process: The executable name for the process that crashed. This matches the value for the CFBundleExecutable key in the application's information property list.

  • Version: The version of the process that crashed. The value for this key is a concatenation of the values for the CFBundleVersion and CFBundleVersionString keys in the application's information property list.

  • Code Type: The target architecture of the process that crashed. This will be one of ARM-64 or ARM.

  • OS Version: The OS version, including the build number, on which the crash occurred.

Exception Codes

Not to be confused with Objective-C/C++ exceptions (though one of those may be the cause of the crash). This section lists the Mach Exception TypeException Subtype, processor-specificException Codes, and other fields which may provide more information about the nature of the crash. The final field lists the index of the thread which triggered the crash. Not all fields will be present in every crash report.

Listing 2  Excerpt of the Exception Codes section from a crash report.

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0

The following sections explain some of the most common exception types.

Bad Memory Access [EXC_BAD_ACCESS // SIGSEGV // SIGBUS]

The process attempted to access invalid memory. The Exception Subtype field contains a kern_return_t describing error. The Exception Sub-code (the value following the exception subtype) lists the bad memory address that was accessed.

If objc_msgSend or objc_release is near the top of the  for the crashed thread, the process may have attempted to message a deallocated object. You should profile the application with the to better understand the conditions of this crash.

Abnormal Exit [EXC_CRASH // SIGABRT]

The process exited abnormally. The most common cause of crashes with this exception type are uncaught Objective-C/C++ exceptions.

App Extensions will be terminated with this exception type if they take too much time to initialize (a watchdog termination). If an extension is killed due to a hang at launch, the Exception Subtype of the generated crash report will be LAUNCH_HANG. Because extensions do not have a main function, any time spent initializing occurs within static constructors and +load methods present in your extension and dependent libraries. You should defer as much of this work as possible.

Trace Trap [EXC_BREAKPOINT // SIGTRAP]

Similar to an Abnormal Exit, this exception is intended to give an attached debugger the chance to interrupt the process at a specific point in its execution. You can trigger this exception from your own code using the __builtin_trap() function. If no debugger is attached, the process is terminated and a crash report is generated.

Swift code will terminate the program with this exception type if it detects an unexpected condition at runtime such as:

  • a non-optional type with a nil value

  • a failed forced type conversion

Look at the  of the crashed thread to determine where the unexpected condition was encountered. Additional information may have also been logged to the device's console.

Guarded Resource Violation [EXC_GUARD]

The process violated a guarded resource protection. System libraries may mark certain file descriptors as guarded, after which normal operations on those descriptors will trigger an EXC_GUARDexception (when it wants to operate on these file descriptors, the system uses special 'guarded' private APIs). This helps you quickly track down issues such as closing a file descriptor that had been opened by a system library. For example, if an app closes the file descriptor used to access the SQLite file backing a Core Data store, Core Data would then crash mysteriously much later on. The guard exception gets these problems noticed sooner, and thus makes them easier to debug.

The associated Exception Subtype is a bitfield which breaks down as follows:

  • [63:61] - Guard Type: The type of the guarded resource. A value of 0x2 indicates the resource is a file descriptor.

  • [60:32] - Flavor: The conditions under which the violation was triggered.

    • If the first (1 << 0) bit is set, the process attempted to invoke close() on a guarded file descriptor.

    • If the second (1 << 1) bit is set, the process attempted to invoke dup()dup2(), or fcntl() with the F_DUPFD or F_DUPFD_CLOEXEC commands on a guarded file descriptor.

    • If the third (1 << 2) bit is set, the process attempted to send a guarded file descriptor via a socket.

    • If the fifth (1 << 4) bit is set, the process attempted to write to a guarded file descriptor.

  • [31:0] - File Descriptor: The guarded file descriptor that the process attempted to modify.

Resource Limit [EXC_RESOURCE]

The process hit a resource consumption limit. This is not a crash, but a notification from the OS that the process is using too many resources. The exact resource is in the Exception Subtype field.

  • The exception subtype WAKEUPS indicates that a thread was waking up too many times per second, which forces the CPU to wake up very often and consumes battery life. You should investigate why this is happening and avoid it if possible.

  • The exception subtype MEMORY indicates that the process has crossed a memory limit imposed by the system. This may be a precursor to termination for excess memory usage.

Other Exception Types

Some crash reports may contain an un-named Exception Type, which will be printed as a hexadecimal value (e.g. 00000020). If you receive one of these crash reports, look directly to the Exception Codes field for more information.

  • The exception code 0xbaaaaaad indicates that the log is a stackshot of the entire system, not a crash report. To take a stackshot, push the Home button and any volume button. Often these logs are accidentally created by users, and do not indicate an error.

  • The exception code 0xbad22222 indicates that a VoIP application has been terminated by iOS because it resumed too frequently.

  • The exception code 0x8badf00d indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. One common cause of this is doing . Whatever operation is on Thread 0 needs to be moved to a background thread, or processed differently, so that it does not block the main thread.

  • The exception code 0xc00010ff indicates the app was killed by the operating system in response to a thermal event. This may be due to an issue with the particular device that this crash occurred on, or the environment it was operated in. For tips on making your app run more efficiently, see  WWDC session.

  • The exception code 0xdead10cc indicates that an application has been terminated by iOS because it held on to a system resource (like the address book database) while running in the background.

  • The exception code 0xdeadfa11 indicated that an application has been force quit by the user. Force quits occur when the user first holds down the On/Off button until "slide to power off" appears, then holds down the Home button. It's reasonable to assume that the user has done this because the application has become unresponsive, but it's not guaranteed - force quit will work on any application.

    Note: Terminating a suspended app by removing it from the multitasking tray does not generate a crash report. Once an app has suspended, it is eligible for termination by iOS at any time, so no crash report will be generated.

Application Specific Information

Certain crashes write extra information out to the generated crash report. The contents of this section vary depending upon the type of termination. You should read this section to better understand the circumstances under which the application was terminated.

Listing 3  Excerpt of the Application Specific Information section from a crash report.

Application Specific Information:
MyApp[134] was suspended with locked system files:
/private/var/mobile/Library/AddressBook/AddressBook.sqlitedb

Backtrace

The most interesting part of a crash report is the backtrace for each of the process's threads at the time execution halted. Each of these traces is similar to what you would see when stopping execution in the debugger.

Listing 4  Excerpt of the Backtrace section from a fully symbolicated crash report.

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   TheElements               0x0000000100063fdc -[AtomicElementViewController myTransitionDidStop:finished:context:] (AtomicElementViewController.m:201)
1   UIKit                     0x000000018ca5c2ec -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
2   UIKit                     0x000000018ca5c1f4 -[UIViewAnimationState animationDidStop:finished:] + 100
3   QuartzCore                0x000000018c380f60 CA::Layer::run_animation_callbacks(void*) + 292
4   libdispatch.dylib         0x0000000198fb9368 _dispatch_client_callout + 12
5   libdispatch.dylib         0x0000000198fbd97c _dispatch_main_queue_callback_4CF + 928
6   CoreFoundation            0x000000018822dfa0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
7   CoreFoundation            0x000000018822c048 __CFRunLoopRun + 1488
8   CoreFoundation            0x00000001881590a0 CFRunLoopRunSpecific + 392
9   GraphicsServices          0x00000001912fb5a0 GSEventRunModal + 164
10  UIKit                     0x000000018ca8aaa0 UIApplicationMain + 1484
11  TheElements               0x000000010005d800 main (main.m:55)
12  libdyld.dylib             0x0000000198fe2a04 start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib    0x00000001990e0c94 kevent64 + 8
1   libdispatch.dylib         0x0000000198fc897c _dispatch_mgr_invoke + 272
2   libdispatch.dylib         0x0000000198fbb3b0 _dispatch_mgr_thread + 48
...

Symbolication

Crash logs retrieved from an iOS device will not contain the method or function names, known as symbols. Instead, you have hexadecimal addresses of executable code within the loaded binary images, as shown in Listing 5. You need to map these addresses to symbols.

Symbolication - resolving backtrace addresses to source code methods and lines - requires the application binary that was uploaded to the App Store and the .dSYM file that was generated when that binary was built. This must be an exact match - otherwise, you might get a partially symbolicated crash report, as shown in Listing 6. It is essential that you keep each build distributed to users (regardless of the details of that distribution) with its .dSYM file.

Listing 5  Excerpt of a backtrace section from an unsymbolicated crash report.

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   TheElements               0x00000001000effdc 0x1000e4000 + 49116
1   UIKit                     0x000000018ca5c2ec 0x18ca14000 + 295660
2   UIKit                     0x000000018ca5c1f4 0x18ca14000 + 295412
3   QuartzCore                0x000000018c380f60 0x18c36c000 + 85856
4   libdispatch.dylib         0x0000000198fb9368 0x198fb8000 + 4968
5   libdispatch.dylib         0x0000000198fbd97c 0x198fb8000 + 22908
6   CoreFoundation            0x000000018822dfa0 0x188150000 + 909216
7   CoreFoundation            0x000000018822c048 0x188150000 + 901192
8   CoreFoundation            0x00000001881590a0 0x188150000 + 37024
9   GraphicsServices          0x00000001912fb5a0 0x1912f0000 + 46496
10  UIKit                     0x000000018ca8aaa0 0x18ca14000 + 486048
11  TheElements               0x00000001000e9800 0x1000e4000 + 22528
12  libdyld.dylib             0x0000000198fe2a04 0x198fe0000 + 10756

Listing 6  Excerpt of a backtrace section from a partially symbolicated crash report (The system stack frames are symbolicated, but the app's stack frames are not).

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   TheElements               0x00000001000effdc 0x1000e4000 + 49116
1   UIKit                     0x000000018ca5c2ec -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
2   UIKit                     0x000000018ca5c1f4 -[UIViewAnimationState animationDidStop:finished:] + 100
3   QuartzCore                0x000000018c380f60 CA::Layer::run_animation_callbacks(void*) + 292
4   libdispatch.dylib         0x0000000198fb9368 _dispatch_client_callout + 12
5   libdispatch.dylib         0x0000000198fbd97c _dispatch_main_queue_callback_4CF + 928
6   CoreFoundation            0x000000018822dfa0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
7   CoreFoundation            0x000000018822c048 __CFRunLoopRun + 1488
8   CoreFoundation            0x00000001881590a0 CFRunLoopRunSpecific + 392
9   GraphicsServices          0x00000001912fb5a0 GSEventRunModal + 164
10  UIKit                     0x000000018ca8aaa0 UIApplicationMain + 1484
11  TheElements               0x00000001000e9800 0x1000e4000 + 22528
12  libdyld.dylib             0x0000000198fe2a04 start + 0

Important: You must keep both the application binary and the .dSYM file in order to be able to fully symbolicate crash reports. You should archive these files for every build that you submit to iTunes Connect. The .dSYM and application binary are specifically tied together on a per-build-basis, and subsequent builds, even from the same source files, will not interoperate with files from other builds. If you use Xcode's Build and Archive command then they will be placed in a suitable location automatically. Otherwise any location searchable by Spotlight (such as your home directory) is fine.

Xcode's Archive command makes it easy keeping the matching binary and the .dSYM. When you use the Archive command (by choosing "Archive" from the "Product" menu), Xcode will gather the application binary and the .dSYM containing symbol information together and store them in a location in your home folder. You can find all of your archived applications in the Xcode Organizer under the "Archived" section. Xcode will automatically search archived applications when symbolicating crash reports, and you can submit archived applications directly to iTunes Connect ensuring that the application and .dSYM that you have archived match what you release.

Xcode will automatically symbolicate all crash reports that it encounters, if it has the .dSYM and application binary that produced the crash report. Given a crash report, the matching binary, and its.dSYM file, all you need to do for symbolication is to add the crash report to the Xcode Organizer.

  1. Connect an iOS device to your Mac

  2. Choose "Devices" from the "Window" menu

  3. Under the "DEVICES" section in the left column, choose a device

  4. Click the "View Device Logs" button under the "Device Information" section on the right hand panel

  5. Drag your crash report onto the left column of the presented panel

  6. Xcode will automatically symbolicate the crash report and display the results

Exceptions

Exceptions in Objective-C are used to indicate programming or unexpected runtime errors such as out-of-bounds collection access, attempts to mutate immutable objects, not implementing a required method of a protocol, or sending an invalid message.

Note: Messaging a previously deallocated object may raise an NSInvalidArgumentException instead of immediately crashing the program. This occurs when a new object is allocated in the memory previously occupied by the deallocated object. If your application is crashing due to an uncaught NSInvalidArgumentException (look for -[NSObject(NSObject) doesNotRecognizeSelector:] in the exception backtrace), consider profiling your application with the  to eliminate the possibility that improper memory management is the cause.

If an exception is not caught, it is intercepted by a function called the uncaught exception handler. The default uncaught exception handler on iOS logs the exception information and backtrace to the device's console then terminates the program. Only the exception backtrace of the last uncaught exception is written to the generated crash report under the Last Exception Backtrace section, as shown in Listing 7. The exception message is omitted from the crash report. If you receive a crash report with a Last Exception Backtrace section you should acquire the console logs from the originating device to better understand the conditions leading to the exception being raised.

Listing 7  Excerpt of the Last Exception Backtrace section from an unsymbolicated crash report.

Last Exception Backtrace:
(0x18632c2d8 0x197af80e4 0x18632bf5c 0x187165480 0x186257520 0x18b18c7a0 0x18b088384 0x18ad6ca28 0x18ad6c994 0x18af0f25c 0x18ae21ef0 0x18ae21cbc 0x18ae21c3c 0x18ad69760 0x18a6b1e1c 0x18a6ac884 0x18a6ac728 0x18a6abebc 0x18a6abc3c 0x18a6a5364 0x1862e42a4 0x1862e1230 0x1862e1610 0x18620d2d4 0x18fa2b6fc 0x18add2fac 0x1000fd2f4 0x198176a08)

A crash log with a Last Exception Backtrace containing only hexadecimal addresses must be symbolicated to produce a usable backtrace as shown in Listing 8.

Listing 8  Excerpt of the Last Exception Backtrace section from a symbolicated crash report. This exception was raised when loading a scene in the app's storyboard. The corresponding IBOutlet for a connection to an element in the scene was missing.

Last Exception Backtrace:
0   CoreFoundation            0x18632c2d8 __exceptionPreprocess + 132
1   libobjc.A.dylib           0x197af80e4 objc_exception_throw + 60
2   CoreFoundation            0x18632bf5c -[NSException raise] + 12
3   Foundation                0x187165480 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 248
4   CoreFoundation            0x186257520 -[NSArray makeObjectsPerformSelector:] + 248
5   UIKit                     0x18b18c7a0 -[UINib instantiateWithOwner:options:] + 1604
6   UIKit                     0x18b088384 -[UIViewController _loadViewFromNibNamed:bundle:] + 284
7   UIKit                     0x18ad6ca28 -[UIViewController loadViewIfRequired] + 88
8   UIKit                     0x18ad6c994 -[UIViewController view] + 32
9   UIKit                     0x18af0f25c -[UINavigationController _startCustomTransition:] + 712
10  UIKit                     0x18ae21ef0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 468
11  UIKit                     0x18ae21cbc -[UINavigationController __viewWillLayoutSubviews] + 56
12  UIKit                     0x18ae21c3c -[UILayoutContainerView layoutSubviews] + 200
13  UIKit                     0x18ad69760 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 580
14  QuartzCore                0x18a6b1e1c -[CALayer layoutSublayers] + 152
15  QuartzCore                0x18a6ac884 CA::Layer::layout_if_needed(CA::Transaction*) + 320
16  QuartzCore                0x18a6ac728 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
17  QuartzCore                0x18a6abebc CA::Context::commit_transaction(CA::Transaction*) + 276
18  QuartzCore                0x18a6abc3c CA::Transaction::commit() + 528
19  QuartzCore                0x18a6a5364 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
20  CoreFoundation            0x1862e42a4 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
21  CoreFoundation            0x1862e1230 __CFRunLoopDoObservers + 360
22  CoreFoundation            0x1862e1610 __CFRunLoopRun + 836
23  CoreFoundation            0x18620d2d4 CFRunLoopRunSpecific + 396
24  GraphicsServices          0x18fa2b6fc GSEventRunModal + 168
25  UIKit                     0x18add2fac UIApplicationMain + 1488
26  TheElements               0x1000fd2f4 main (main.m:55)
27  libdyld.dylib             0x198176a08 start + 4

Note: If you find that exceptions thrown within an exception handling domain setup by your application are not being caught, verify that you are not specifying the -no_compact_unwind flag when building your application or libraries.

64-bit iOS uses a "zero-cost" exception implementation. In a "zero-cost" system, every function has additional data that describes how to unwind the stack if an exception is thrown across the function. If an exception is thrown across a stack frame that has no unwind data then exception handling cannot proceed and the process halts. There might be an exception handler farther up the stack, but if there is no unwind data for a frame then there is no way to get there from the stack frame where the exception was thrown. Specifying the -no_compact_unwind flag means you get no unwind tables for that code, so you can not throw exceptions across those functions.

Additionally, if you are including plain C code in your application or a library, you may need to specify the -funwind-tables flag to include unwind tables for all functions in that code.

Thread State

This section lists the ARM thread state of the crashed thread. This is a list of registers and their values at the time of the crash. Understanding the thread state is not necessary when reading a crash report but you may be able to use this information to better understand the conditions of the crash.

Listing 9  Excerpt of the Thread State section from a crash report.

相關推薦

iOS 應用程式 Crash檔案理解分析

Understanding and Analyzing iOS Application Crash Reports https://developer.apple.com/library/ios/technotes/tn2151/_index.html Technica

iOS開發之Crash日誌獲取分析

當在非除錯狀態下,我們用真機測試app,crash或者說閃退是一件很常見的事,最讓我們開發人員頭疼的是,自己在開發過程中總是不會遇到crash,安裝到別人的裝置,就出現了閃退崩潰現象。這種偶現的、概率比較低的閃退是最令人頭疼。 這時iOS crash log 

基於Swift的iOS應用程式開發:通過UITextFieldDelegate快速理解Delegate事件代理

// // 關於文字輸入框的事件代理,摘錄蘋果開發者中心的官方解釋如下: //*******************************************************************************************// //* To understand wh

arm應用程式檔案讀寫操作差異openfopen

在am335x的arm系統中編寫應用程式時,發現想將資料儲存在文字檔案中,下次啟動應用程式時就能從檔案中讀出上次的資料。結果一直儲存不成功,於是寫了一個簡單的測試程式,將一個100長度的陣列儲存在檔案中,然後再讀出來。發現了問題。 寫入的資料是1到100,讀出的資料卻是到

IOS應用程式釋出授權檔案過期的處理方法

IOS應用釋出ad-hoc方式釋出需要授權檔案,授權檔案會有過期時間,時間到了應用程式就不能用了。 針對這個問題有兩個解決方案: 1.通過appStore釋出應用,這樣直接從應用程式商店下載的應用是不需要授權檔案的。(但是此種情況如果開發者帳號到期沒有續費,應用就不能再下載

mysql體系結構理解分析

interface storage 編程語言 數據庫 結構圖 接觸mysql有一年多了,但是始終是一個偶爾用用的狀態,對其原理性的東西研究不夠,在不少mysql相關的暑假中提到mysql體系結構,很清楚解析了mysql的各個模塊分層和主要功能特性,在理解此功能特性後,會剛好的幫助我

iOS應用程式如何呼叫以太坊智慧合約

以太坊智慧合約有各種各樣的用例,但到目前為止,從你的iOS應用程式中呼叫它們非常困難。不過如果使用以太坊iOS開發套件和EtherKit,這種情況會改善很多,你可以立即開始使用。在本教程結束時,你將能夠呼叫其ABI(應用程式二進位制介面)中定義的任何公共合約函式。 對於這個專案,我們將使

筆記-iOS應用程式的啟動過程

程式的啟動 使用Xcode開啟一個專案,很容易會發現一個檔案main.m檔案,此處就是應用的入口。 程式啟動時,先執行main函式,main函式是iOS程式的入口點 內部會呼叫UIApplicationMain函式 UIApplicationMain裡會建立一個UIApplication物

轉老羅 Android應用程式資源的查詢過程分析

原文地址  http://blog.csdn.net/luoshengyang/article/details/8806798   轉載請說明     我們知道,在Android系統中,每一個應用程式一般都會配置很多資源,用來適配不同密

根據登錄檔讀取應用程式配置檔案,根據XML文字動態生成樹狀列表,自定義SAP GUI登入頁面

 技術要點 1.根據SAPGUI應用程式名動態讀取登入配置檔案的絕對路徑,如果應用程式未安裝,則提示相應訊息。 2. 根據獲取的路徑得到配置檔案的XML文字字串,其中包含所有的登入資訊,呼叫上一篇日誌解析XML的類方法,得到登入介面結構的文件例項 3.通過文件例項利用控制

蘋果安裝app的另一種方式(通過itms-services協議,不通過AppStore,直接安裝IOS應用程式

最近有一專案的要求是不通過蘋果商店,二是通過掃描二維碼進行下載app,當然了安卓手機是非常容易做到的,這裡主要講述蘋果的。以及兩個應用合併為一個的知識點。其實很多分發平臺就是這樣做的。比如:fir.im等等吧。那麼接下來我們開始我們的部落格內容。 其實分發平臺很多是獲取你上傳的app,會生成

刪數問題的理解分析

1、實踐題目 刪數問題 2、問題描述  給定n位正整數a,去掉其中任意k(k≤n)個數字後,剩下的數字按原次序排列組成一個新的正整數。對於給定的n位正整數a和正整數 k,設計一個演算法找出剩下數字組成的新數最小的刪數方案。 輸入格式:第 1 行是1 個正整數 a。第 2 行是正整數k。 輸

如何備份和恢復iOS應用程式的資料和設定

iMazing(http://www.imazing.cc/)具有強大的應用資料提取工具,可以幫助您從任何一臺iOS裝置備份、恢復或傳輸應用資料和以及其裝置應用的設定。您還可以管理iOS應用程式,當您匯入裝置上不存在的應用程式的資料和設定時,iMazing將自動下載(從App Store)並

Android匯出已安裝應用程式apk檔案的兩種方案

Android匯出已安裝應用程式apk檔案的兩種方案 如果已經在Android手機上安裝了App應用程式,那麼Android系統會保留應用程式的apk安裝副本。如果要匯出這些apk檔案,有以下兩種方案:第一種方案:命令列模式。 先通過 adb shell pm list packag

c#程式應用程式設定檔案Settings.settings詳解

應用程式設定 應用程式設定使您能夠動態儲存和檢索應用程式的屬性設定和其他資訊。 還使您能夠維護客戶端計算機上的自定義應用程式和使用者首選項。 通常這些資料(如連線字串)對於執行應用程式是非常重要的,並且您不想將這些資料直接包含在應用程式程式碼中。 也許想要儲存兩種不同的資料庫連線字串,並在執行時

Android安全/開發基礎--15--應用程式配置檔案詳解(AndroidManifest.xml)

================================================================= Android應用程式都需要有清單檔案。該檔案必須命名為AndroidManifest.xml且必須防止在應用程式根目錄中。它聲明

Swift 語言開發 iOS 應用程式的利弊

目前全球共有超過 7 億臺 iPhone 處於活躍狀態,這造就了 iOS 作為全球第二大移動裝置平臺的狀態。雖然安卓系統的全球市場佔有率超過 iOS 系統,但在諸如美國、法國和英國的區域性市場中 iOS 系統仍然佔據主導地位。因此許多公司專注於 iOS 平臺進行軟體開發,因為

Windows下dump檔案生成分析

一、    生成Dump檔案方式 1.1工作管理員 在程式崩潰後,先不關閉程式,在工作管理員中找到該程式對應的程序。右鍵—>建立轉儲檔案。 此時會在預設的目錄下創建出一個dump檔案。 可以看出,此種方法只適用於程式崩潰但沒有立即自行退出的情況。

c++ dmp檔案生成分析

    目前做一個專案,利用mfc做框架生成執行程式,在本機及實驗室的機子裡都能正常執行,但運用到遠端的機器上就崩,而且好像不是程式演算法的問題,不能重現很難定位,所以考慮利用dmp檔案來分析。 1.dmp檔案生成實現程式碼 標頭檔案 #includ

iOS開發中Block的理解使用

// 隨機生成的顏色 UIColor *color = [UIColor colorWithRed:arc4random()%256/255.0 green:arc4random()%256/255.0 blue:arc4random()%256/255.0 alpha:1]; // 第二步 給Blo

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x00000001995f8020
    x4: 0x0000000000000000   x5: 0x0000000000000001   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000015  x10: 0x0000000199601df0  x11: 0x0000000b0000000f
   x12: 0x00000001741e8700  x13: 0x000001a5995f5779  x14: 0x0000000000000000  x15: 0x0000000044000000