While trying to implement CleverTap through Segment, I encountered an error that seems common throughout Github issues, which is "<CleverTapSDK/CleverTap.h> file not found" .
I tried every alternative:
use_frameworks!on my Podfile: doesn't work because I am also using Firebase, which conflicts with this flag and does not allow me to build the project.
use_module_headers!on my Podfile: doesn't work because it conflicts with the "glog" podspec and doesn't allow me to build the project; if I use the flag
module_headers: trueon "Segment-CleverTap", "CleverTap-iOS-SDK" and "RNAnalyticsIntegration-CleverTap" it goes back to the "<CleverTapSDK/CleverTap.h> file not found error"
Adding the CleverTap SDK manually into the project, embedding it on my files: also returns "<CleverTapSDK/CleverTap.h> file not found error"
Adding the "@segment/analytics-react-native-clevertap" .xcodeproj into the project, embedding it on my files: also returns "<CleverTapSDK/CleverTap.h> file not found error"
I tried every possible solution, including everything I can find on Github issues or StackOverflow posts and nothing works. Does anyone know how I can solve this? The only solution I found was to change the import on the podfile to
#import <CleverTap-iOS-SDK/CleverTap.h> on the SEGCleverTapIntegration.m file, but this won't solve my issue.
Here's my final Podfile after every try still not working:
platform :ios, '10.0' install! 'cocoapods', :integrate_targets => false, :deterministic_uuids => false # remove "Generated duplicate UUIDs" warnings target '***' do #React Dependencies pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', 'DevSupport', 'RCTText', 'RCTNetwork', 'RCTWebSocket', 'RCTAnimation' ] pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' # Pods for *** pod 'Firebase/Core', '~> 5.15.0' pod 'Firebase/Auth', '~> 5.15.0' pod 'Firebase/Messaging', '~> 5.15.0' pod 'Firebase/Database', '~> 5.15.0' pod 'Fabric', '~> 1.9.0' pod 'Crashlytics', '~> 3.12.0' pod 'ZendeskSDK', '~> 4.0.0' pod 'AppsFlyerFramework', '4.10.4' pod 'Segment-CleverTap', modular_headers: true pod 'CleverTap-iOS-SDK', modular_headers: true pod 'react-native-branch', path: '../node_modules/react-native-branch' pod 'react-native-appsflyer', path: '../node_modules/react-native-appsflyer' pod 'Branch-SDK', path: '../node_modules/react-native-branch/ios' pod 'react-native-splash-screen', path: '../node_modules/react-native-splash-screen' pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage' pod 'RNReanimated', :path => '../node_modules/react-native-reanimated' pod 'react-native-camera', :path => '../node_modules/react-native-camera' pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo' pod 'react-native-orientation-locker', :path => '../node_modules/react-native-orientation-locker/react-native-orientation-locker.podspec' pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage' pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions' pod 'RNShare', :path => '../node_modules/react-native-share' pod 'RNViewShot', :path => '../node_modules/react-native-view-shot' pod 'RNAnalytics', :path => '../node_modules/@segment/analytics-react-native' pod 'RNAnalyticsIntegration-Amplitude', :path => '../node_modules/@segment/analytics-react-native-amplitude' pod 'RNAnalyticsIntegration-CleverTap', path: '../node_modules/@segment/analytics-react-native-clevertap', modular_headers: true target '***Tests' do inherit! :search_paths end end target '***-tvOS' do target '***-tvOSTests' do inherit! :search_paths end end post_install do |installer| installer.pods_project.targets.each do |target| # TODO - The following is needed to ensure the "archive" step works in XCode. # It removes React & Yoga from the Pods project, as it is already included in the main project. # https://github.com/facebook/react-native/issues/20492 # Without this, you'd see errors when you archive like: # "Multiple commands produce ... libReact.a" # "Multiple commands produce ... libyoga.a" targets_to_ignore = %w(React yoga) if targets_to_ignore.include? target.name target.remove_from_project end end end