SmartCrashReportsInstall


Abstract

API to the Installer of Smart Crash Reports

Discussion

This API allows you to painlessly install Smart Crash Reports from within your application. It will properly detect the versions and whether it should upgrade/install over an older version on the user's computer.

In order to use this library, you have to add the following frameworks to your project:

Functions

UnsanitySCR_CanInstall
Check whether this library can install Smart Crash Reports on user's system.
UnsanitySCR_Install
Attempt to install Smart Crash Reports on user's system.
UnsanitySCR_InstallableVersion
Get the version of Smart Crash Reports that this library can install.
UnsanitySCR_InstalledVersion
Get the version of Smart Crash Reports installed on user's system.

UnsanitySCR_CanInstall


Check whether this library can install Smart Crash Reports on user's system.

Boolean UnsanitySCR_CanInstall(); 
function result
TRUE if Smart Crash Reports can be installed, or FALSE if they are already installed (of the same or newer version).
Discussion

Returns whether Smart Crash Reports can be installed.


UnsanitySCR_Install


Attempt to install Smart Crash Reports on user's system.

OSStatus UnsanitySCR_Install(); 
function result
One of the UnsanitySCR_Install_ErrorCode result codes.
Discussion

Installs Smart Crash Reports from the library's archive, if possible.


UnsanitySCR_InstallableVersion


Get the version of Smart Crash Reports that this library can install.

UInt32 UnsanitySCR_InstallableVersion(); 
function result
UInt32 containing the version of Smart Crash Reports (in CFBundleGetVersionNumber() format) bundled in this library.
Discussion

Returns the version of Smart Crash Reports that this library can install.


UnsanitySCR_InstalledVersion


Get the version of Smart Crash Reports installed on user's system.

UInt32 UnsanitySCR_InstalledVersion(); 
function result
UInt32 containing the version of Smart Crash Reports (in CFBundleGetVersionNumber() format), or 0 if Smart Crash Reports are not installed.
Discussion

Returns the version of Smart Crash Reports installed on user's system.

Enumerations


UnsanitySCR_Install_ErrorCode


Result codes returned from the UnsanitySCR_Install() function

enum { 
    kUnsanitySCR_Install_NoError = 0, 
    kUnsanitySCR_Install_OutOfMemory = -108, 
    kUnsanitySCR_Install_InstalledGlobally = -13, 
    kUnsanitySCR_Install_NoPermissions = -54, 
    kUnsanitySCR_Install_WillNotInstall = -14 
} UnsanitySCR_Install_ErrorCode; 
Constants
kUnsanitySCR_Install_NoError
No error. Installation succeeded.
kUnsanitySCR_Install_OutOfMemory
Could not allocate needed memory for the installation.
kUnsanitySCR_Install_InstalledGlobally
Smart Crash Reports are already installed globally and this API can not install into /Library as it would require additional fiddling with the authorization which is beyond the scope of this API.

kUnsanitySCR_Install_NoPermissions
Could not install because of file permission issues.
kUnsanitySCR_Install_WillNotInstall
Could not install because a newer or same version of Smart Crash Reports is already installed.
Discussion

These error codes will be returned from the UnsanitySCR_Install() function.

(Last Updated September 07, 2005)