Instance Method

preflightAndReturnError:

Returns a Boolean value indicating whether the bundle’s executable code could be loaded successfully.

Declaration

- (BOOL)preflightAndReturnError:(NSError * _Nullable *)error;

Parameters

error

On input, a pointer to an error object variable. On output, this variable may contain an error object indicating why the bundle’s executable could not be loaded. If no error would occur, this parameter is left unmodified. You may specify nil for this parameter if you are not interested in the error information.

Return Value

YES if the bundle’s executable code could be loaded successfully or is already loaded; otherwise, NO if the code could not be loaded.

Discussion

This method does not actually load the bundle’s executable code. Instead, it performs several checks to see if the code could be loaded and with one exception returns the same errors that would occur during an actual load operation. The one exception is the NSExecutableLinkError error, which requires the actual loading of the code to verify link errors.

For a list of possible load errors, see the discussion for the loadAndReturnError: method.

See Also

Loading Code from a Bundle

executableArchitectures

An array of numbers indicating the architecture types supported by the bundle’s executable.

- load

Dynamically loads the bundle’s executable code into a running program, if the code has not already been loaded.

- loadAndReturnError:

Loads the bundle’s executable code and returns any errors.

- unload

Unloads the code associated with the receiver.

loaded

The load status of a bundle.

Mach-O Architecture

Constants describing the CPU types that a bundle’s executable code supports.