main
 1//
 2// Licensed under the terms in License.txt
 3//
 4// Copyright 2010 Allen Ding. All rights reserved.
 5//
 6
 7#import <Foundation/Foundation.h>
 8
 9#define KW_VERSION 0.9001
10
11// Blocks being unavailable cripples the usability of Kiwi, but is supported
12// because they are not available on anything less than a device running 3.2.
13#if !defined(__BLOCKS__)
14#error "Kiwi requires blocks support."
15#endif
16
17// As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or
18// forwardInvocation: boundary in the simulator will terminate the app instead
19// of being caught in @catch blocks from the caller side of the -invoke. Kiwi
20// tries to handle this by storing the first exception that it would have
21// otherwise thrown in a nasty global that callers can look for and handle.
22// (Buggy termination is less desirable than global variables).
23//
24// Obviously, this can only handles cases where Kiwi itself would have raised
25// an exception.
26#if TARGET_IPHONE_SIMULATOR
27    #define KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG 1
28#endif