From 85d1746cd4ef68181f9c193c89e672e419ee689e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20M=C3=A6re=20Overskaug?= Date: Wed, 22 Mar 2017 10:46:37 +0100 Subject: [PATCH] fix(iOS): add support for dynamic frameworks If one uses CocoaPods and installs the 'Analytics' pod using the option for dyamic frameworks (use_frameworks!) The import of SEGAnalytics will no longer work. With this support we support dynamic frameworks, while being backwards compatible. --- ios/SegmentAnalytics/Classes/SegmentAnalytics.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/SegmentAnalytics/Classes/SegmentAnalytics.m b/ios/SegmentAnalytics/Classes/SegmentAnalytics.m index a57e589..d5919d8 100644 --- a/ios/SegmentAnalytics/Classes/SegmentAnalytics.m +++ b/ios/SegmentAnalytics/Classes/SegmentAnalytics.m @@ -4,7 +4,12 @@ #import "SegmentAnalytics.h" #import "RCTConvert.h" +#if __has_include() #import +#else +#import "SEGAnalytics.h" +#endif + #import @implementation SegmentAnalytics