From 33bd35db40e2efd52698d04f395334c4e0137a03 Mon Sep 17 00:00:00 2001 From: Mike McDonald Date: Fri, 14 Aug 2015 17:20:31 -0700 Subject: [PATCH] Removed __kindof, since support in Cocoapods doesn't seem to work properly. Also added proper macros for nullability and generics to guard against older versions. --- FirebaseUI.xcodeproj/project.pbxproj | 4 ++ FirebaseUI/API/FirebaseArray.h | 3 +- .../API/FirebaseCollectionViewDataSource.h | 23 ++++---- FirebaseUI/API/FirebaseTableViewDataSource.h | 23 ++++---- FirebaseUI/API/FirebaseUI.h | 8 +-- .../FirebaseCollectionViewDataSource.m | 2 +- .../FirebaseTableViewDataSource.m | 2 +- FirebaseUI/XCodeMacros.h | 56 +++++++++++++++++++ 8 files changed, 92 insertions(+), 29 deletions(-) create mode 100644 FirebaseUI/XCodeMacros.h diff --git a/FirebaseUI.xcodeproj/project.pbxproj b/FirebaseUI.xcodeproj/project.pbxproj index c8b18cda905..c63385af011 100644 --- a/FirebaseUI.xcodeproj/project.pbxproj +++ b/FirebaseUI.xcodeproj/project.pbxproj @@ -34,6 +34,7 @@ D8B6ACF91B583D3E005CDDB2 /* FirebaseDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6ACED1B583C33005CDDB2 /* FirebaseDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; D8B6ACFB1B583D48005CDDB2 /* FirebaseArray.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6ACEC1B583C33005CDDB2 /* FirebaseArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; D8DA10F11B7AC50400D00954 /* FirebaseCollectionViewDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = D8DA10F01B7AC50400D00954 /* FirebaseCollectionViewDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D8DB81A81B7EA357001429C6 /* XCodeMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = D8DB81A71B7EA357001429C6 /* XCodeMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; D8DF55621B742DB40030E996 /* FirebaseCollectionViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = D8DF55611B742DB40030E996 /* FirebaseCollectionViewDataSource.m */; }; /* End PBXBuildFile section */ @@ -73,6 +74,7 @@ D8C579A61B57349000899F86 /* libFirebaseUI.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFirebaseUI.a; sourceTree = BUILT_PRODUCTS_DIR; }; D8C579BB1B5837DF00899F86 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; D8DA10F01B7AC50400D00954 /* FirebaseCollectionViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FirebaseCollectionViewDataSource.h; path = API/FirebaseCollectionViewDataSource.h; sourceTree = ""; }; + D8DB81A71B7EA357001429C6 /* XCodeMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCodeMacros.h; sourceTree = ""; }; D8DF55611B742DB40030E996 /* FirebaseCollectionViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FirebaseCollectionViewDataSource.m; path = Implementation/FirebaseCollectionViewDataSource.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -109,6 +111,7 @@ D8B6ACED1B583C33005CDDB2 /* FirebaseDataSource.h */, D8B6ACEE1B583C33005CDDB2 /* FirebaseTableViewDataSource.h */, D8DA10F01B7AC50400D00954 /* FirebaseCollectionViewDataSource.h */, + D8DB81A71B7EA357001429C6 /* XCodeMacros.h */, ); name = API; sourceTree = ""; @@ -160,6 +163,7 @@ D87E4ABA1B7D832D00A53633 /* FirebaseUI.h in Headers */, D8B6ACF91B583D3E005CDDB2 /* FirebaseDataSource.h in Headers */, D8784C401B719F280025587E /* FirebaseArrayDelegate.h in Headers */, + D8DB81A81B7EA357001429C6 /* XCodeMacros.h in Headers */, D8124F431B72B347003441AD /* FirebaseTableViewDataSource.h in Headers */, D8DA10F11B7AC50400D00954 /* FirebaseCollectionViewDataSource.h in Headers */, D8B6ACFB1B583D48005CDDB2 /* FirebaseArray.h in Headers */, diff --git a/FirebaseUI/API/FirebaseArray.h b/FirebaseUI/API/FirebaseArray.h index 132bf7993b9..67716124985 100644 --- a/FirebaseUI/API/FirebaseArray.h +++ b/FirebaseUI/API/FirebaseArray.h @@ -27,6 +27,7 @@ */ #import +#import #import "FirebaseArrayDelegate.h" @@ -52,7 +53,7 @@ /** * The delegate object that array changes are surfaced to. */ -@property (strong, nonatomic) NSMutableArray *snapshots; +@property (strong, nonatomic) __GENERIC(NSMutableArray, FDataSnapshot *) *snapshots; #pragma mark - #pragma mark Initializer methods diff --git a/FirebaseUI/API/FirebaseCollectionViewDataSource.h b/FirebaseUI/API/FirebaseCollectionViewDataSource.h index 4f16b9fa96d..c53b2f68e06 100644 --- a/FirebaseUI/API/FirebaseCollectionViewDataSource.h +++ b/FirebaseUI/API/FirebaseCollectionViewDataSource.h @@ -27,6 +27,7 @@ */ #import +#import #import "FirebaseDataSource.h" @@ -40,22 +41,22 @@ /** * The model class to coerce FDataSnapshots to (if desired). For instance, if the modelClass is set to [Message class] in Obj-C or Message.self in Swift, then objects of type Message will be returned instead of type FDataSnapshot. */ -@property (strong, nonatomic, nonnull) Class modelClass; +@property (strong, nonatomic, __NON_NULL) Class modelClass; /** * The reuse identifier for cells in the UICollectionView. */ -@property (strong, nonatomic, nonnull) NSString *reuseIdentifier; +@property (strong, nonatomic, __NON_NULL) NSString *reuseIdentifier; /** * The UICollectionView instance that operations (inserts, removals, moves, etc.) are performed against. */ -@property (strong, nonatomic, nonnull) UICollectionView *collectionView; +@property (strong, nonatomic, __NON_NULL) UICollectionView *collectionView; /** * The callback to populate a subclass of UICollectionViewCell with an object provided by the datasource. */ -@property (strong, nonatomic, nonnull) void(^populateCell)(__kindof UICollectionViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object); +@property (strong, nonatomic, __NON_NULL) void(^populateCell)(UICollectionViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object); /** * Initialize an instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with FDataSnapshots. @@ -64,7 +65,7 @@ * @param collectionView An instance of a UICollectionView to bind to * @return An instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with FDataSnapshots */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; /** * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with FDataSnapshots. @@ -74,7 +75,7 @@ * @param collectionView An instance of a UICollectionView to bind to * @return An instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with FDataSnapshots */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref cellClass:(nullable Class)cell reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref cellClass:(__NULLABLE Class)cell reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; /** * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom xib with FDataSnapshots. @@ -84,7 +85,7 @@ * @param collectionView An instance of a UICollectionView to bind to * @return An instance of FirebaseCollectionViewDataSource that populates a custom xib with FDataSnapshots */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref nibNamed:(nonnull NSString *)nibName reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref nibNamed:(__NON_NULL NSString *)nibName reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; /** * Initialize an instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with a custom model class. @@ -94,7 +95,7 @@ * @param collectionView An instance of a UICollectionView to bind to * @return An instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with a custom model class */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; /** * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with a custom model class. @@ -105,7 +106,7 @@ * @param collectionView An instance of a UICollectionView to bind to * @return An instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with a custom model class */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model cellClass:(nullable Class)cell reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model cellClass:(__NULLABLE Class)cell reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; /** * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom xib with a custom model class. @@ -116,12 +117,12 @@ * @param collectionView An instance of a UICollectionView to bind to * @return An instance of FirebaseCollectionViewDataSource that populates a custom xib with a custom model class */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model nibNamed:(nonnull NSString *)nibName reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model nibNamed:(__NON_NULL NSString *)nibName reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; /** * This method populates the fields of a UICollectionViewCell or subclass given an FDataSnapshot (or custom model object). * @param callback A block which returns an initialized UICollectionViewCell (or subclass) and the corresponding object to populate the cell with. */ -- (void)populateCellWithBlock:(nonnull void(^)( __kindof UICollectionViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object))callback; +- (void)populateCellWithBlock:(__NON_NULL void(^)(UICollectionViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object))callback; @end diff --git a/FirebaseUI/API/FirebaseTableViewDataSource.h b/FirebaseUI/API/FirebaseTableViewDataSource.h index 76a5035aad8..32f8f5ba140 100644 --- a/FirebaseUI/API/FirebaseTableViewDataSource.h +++ b/FirebaseUI/API/FirebaseTableViewDataSource.h @@ -27,6 +27,7 @@ */ #import +#import #import "FirebaseDataSource.h" @@ -40,22 +41,22 @@ /** * The model class to coerce FDataSnapshots to (if desired). For instance, if the modelClass is set to [Message class] in Obj-C or Message.self in Swift, then objects of type Message will be returned instead of type FDataSnapshot. */ -@property (strong, nonatomic, nonnull) Class modelClass; +@property (strong, nonatomic, __NON_NULL) Class modelClass; /** * The reuse identifier for cells in the UITableView. */ -@property (strong, nonatomic, nonnull) NSString *reuseIdentifier; +@property (strong, nonatomic, __NON_NULL) NSString *reuseIdentifier; /** * The UITableView instance that operations (inserts, removals, moves, etc.) are performed against. */ -@property (strong, nonatomic, nonnull) UITableView *tableView; +@property (strong, nonatomic, __NON_NULL) UITableView *tableView; /** * The callback to populate a subclass of UITableViewCell with an object provided by the datasource. */ -@property (strong, nonatomic, nonnull) void(^populateCell)(__kindof UITableViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object); +@property (strong, nonatomic, __NON_NULL) void(^populateCell)(UITableViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object); /** * Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with FDataSnapshots. @@ -64,7 +65,7 @@ * @param tableView An instance of a UITableView to bind to * @return An instance of FirebaseTableViewDataSource that populates UITableViewCells with FDataSnapshots */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UITableView *)tableView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UITableView *)tableView; /** * Initialize an instance of FirebaseTableViewDataSource that populates a custom subclass of UITableViewCell with FDataSnapshots. @@ -74,7 +75,7 @@ * @param tableView An instance of a UITableView to bind to * @return An instance of FirebaseTableViewDataSource that populates a custom subclass of UITableViewCell with FDataSnapshots */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref cellClass:(nullable Class)cell reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UITableView *)tableView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref cellClass:(__NULLABLE Class)cell reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UITableView *)tableView; /** * Initialize an instance of FirebaseTableViewDataSource that populates a custom xib with FDataSnapshots. @@ -84,7 +85,7 @@ * @param tableView An instance of a UITableView to bind to * @return An instance of FirebaseTableViewDataSource that populates a custom xib with FDataSnapshots */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref nibNamed:(nonnull NSString *)nibName reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UITableView *)tableView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref nibNamed:(__NON_NULL NSString *)nibName reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UITableView *)tableView; /** * Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with a custom model class. @@ -94,7 +95,7 @@ * @param tableView An instance of a UITableView to bind to * @return An instance of FirebaseTableViewDataSource that populates UITableViewCells with a custom model class */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UITableView *)tableView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UITableView *)tableView; /** * Initialize an instance of FirebaseTableViewDataSource that populates a custom subclass of UITableViewCell with a custom model class. @@ -105,7 +106,7 @@ * @param tableView An instance of a UITableView to bind to * @return An instance of FirebaseTableViewDataSource that populates a custom subclass of UITableViewCell with a custom model class */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model cellClass:(nullable Class)cell reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UITableView *)tableView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model cellClass:(__NULLABLE Class)cell reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UITableView *)tableView; /** * Initialize an instance of FirebaseTableViewDataSource that populates a custom xib with a custom model class. @@ -116,13 +117,13 @@ * @param tableView An instance of a UITableView to bind to * @return An instance of FirebaseTableViewDataSource that populates a custom xib with a custom model class */ -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model nibNamed:(nonnull NSString *)nibName reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UITableView *)tableView; +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model nibNamed:(__NON_NULL NSString *)nibName reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UITableView *)tableView; /** * This method populates the fields of a UITableViewCell or subclass given a model object (or FDataSnapshot). * @param callback A block which returns an initialized UITableViewCell (or subclass) and the corresponding object to populate the cell with. */ -- (void)populateCellWithBlock:(nonnull void(^)(__kindof UITableViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object))callback; +- (void)populateCellWithBlock:(__NON_NULL void(^)(UITableViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object))callback; @end diff --git a/FirebaseUI/API/FirebaseUI.h b/FirebaseUI/API/FirebaseUI.h index 1bd974bcab0..1402b839dbb 100644 --- a/FirebaseUI/API/FirebaseUI.h +++ b/FirebaseUI/API/FirebaseUI.h @@ -28,10 +28,10 @@ #import -#import "FirebaseArray.h" -#import "FirebaseDataSource.h" -#import "FirebaseTableViewDataSource.h" -#import "FirebaseCollectionViewDataSource.h" +#import +#import +#import +#import @interface FirebaseUI : NSObject diff --git a/FirebaseUI/Implementation/FirebaseCollectionViewDataSource.m b/FirebaseUI/Implementation/FirebaseCollectionViewDataSource.m index 0e867c28762..1b74db2613f 100644 --- a/FirebaseUI/Implementation/FirebaseCollectionViewDataSource.m +++ b/FirebaseUI/Implementation/FirebaseCollectionViewDataSource.m @@ -154,7 +154,7 @@ -(NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfIt return [self.array count]; } -- (void)populateCellWithBlock:(nonnull void(^)( __kindof UICollectionViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object))callback; +- (void)populateCellWithBlock:(__NON_NULL void(^)(UICollectionViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object))callback; { self.populateCell = callback; } diff --git a/FirebaseUI/Implementation/FirebaseTableViewDataSource.m b/FirebaseUI/Implementation/FirebaseTableViewDataSource.m index a63429e4f70..7046f5d31bb 100644 --- a/FirebaseUI/Implementation/FirebaseTableViewDataSource.m +++ b/FirebaseUI/Implementation/FirebaseTableViewDataSource.m @@ -160,7 +160,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger return [self.array count]; } -- (void)populateCellWithBlock:(nonnull void(^)( __kindof UITableViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object))callback; +- (void)populateCellWithBlock:(__NON_NULL void(^)(UITableViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object))callback; { self.populateCell = callback; } diff --git a/FirebaseUI/XCodeMacros.h b/FirebaseUI/XCodeMacros.h new file mode 100644 index 00000000000..fdecb0aed20 --- /dev/null +++ b/FirebaseUI/XCodeMacros.h @@ -0,0 +1,56 @@ +/* + * Firebase UI Bindings iOS Library + * + * Copyright © 2015 Firebase - All Rights Reserved + * https://www.firebase.com + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binaryform must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef XCodeMacros_h +#define XCodeMacros_h + +#if __has_feature(nullability) +# define __ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN +# define __ASSUME_NONNULL_END NS_ASSUME_NONNULL_END +# define __NULLABLE nullable +# define __NULLABLE_PTR __nullable +# define __NON_NULL nonnull +# define __NON_NULL_PTR __nonnull +#else +# define __ASSUME_NONNULL_BEGIN +# define __ASSUME_NONNULL_END +# define __NULLABLE +# define __NULLABLE_PTR +# define __NON_NULL +# define __NON_NULL_PTR +#endif + +#if __has_feature(objc_generics) +# define __GENERIC(class, ...) class<__VA_ARGS__> +# define __GENERIC_TYPE(type) type +#else +# define __GENERIC(class, ...) class +# define __GENERIC_TYPE(type) id +#endif + +#endif /* XCodeMacros_h */ \ No newline at end of file