Is it even possible to use 2 versions of same framework in my XCode project?
I need Firebase.framework
pre google version (to connect to NEST API) as well as new one (used for analytics now).
I've tried to create an intermediate LegacyFirebase.Framework
which is compiled with an old Firebase.framework
file.
#import "LegacyFirebase.h"
#import <Firebase/Firebase.h>
@interface LegacyFirebase () {
@private
Firebase * fb;
}
@end
@implementation LegacyFirebase
-(instancetype)init:(NSString *) urlString {
self = [super init];
if(self){
fb = [[Firebase alloc] initWithUrl:urlString];
}
return self;
}
- (void)authorize:(NSString *) token completion: (void (^)(NSError *error , id data))block {
[fb authWithCredential:token withCompletionBlock:^(NSError *error, id data) {
block(error, data);
} withCancelBlock:^(NSError *error) {
block(error, nil);
}];
}
-(void)subscribe: (void (^)(NSDictionary* data))block {
[fb observeSingleEventOfType:FEventTypeValue withBlock:^(FDataSnapshot *snapshot) {
block(snapshot.value);
}];
}
But when I added it to my project, which already contains new Firebase.framework
included -- LegacyFirebase seems to use new one.
EDIT/DONE:
Managed to create correct intermediate LegacyFirebase.Framework
. I can use it in my project and have no conflicts.