CleverTap / clevertap-react-native

CleverTap React Native SDK
Other
59 stars 71 forks source link

'CleverTap-iOS-SDK/CleverTap.h' file not found #408

Open abisalde opened 2 months ago

abisalde commented 2 months ago

After upgrading our project to react-native-version 0.74.5 from 0.71.14. I get this issue. I tried to upgrade to clevertap-react-native version 2.1.1 error remains the same as version 1.1.1

Screenshot 2024-09-01 at 21 09 47
System:
  OS: macOS 14.4
  CPU: (8) arm64 Apple M1 Pro
  Memory: 145.55 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.4
    path: ~/.nvm/versions/node/v18.20.4/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v18.20.4/bin/npm
  Watchman:
    version: 2024.08.12.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
akashvercetti commented 2 months ago

@abisalde So I created a new react native project using the command npx react-native init exampleproject --version 0.74.5 and installed CleverTap 2.2.1. Both of the following import statements work fine.

#import <CleverTap-iOS-SDK/CleverTap.h>
#import <clevertap-react-native/CleverTapReactManager.h> 

OR

#import "CleverTap.h"
#import "CleverTapReactManager.h"

The project builds up and runs on the simulator. I have uploaded the project at https://drive.google.com/file/d/1URNhE3pU5ZHkkVHzQr18GdqJqupfs5HP/view?usp=sharing . Could you take a look at the AppDelegate, package.json and Podfile and compare it with yours?

abisalde commented 2 months ago

@akashvercetti

Thank you for your prompt response

#import "CleverTap.h"
#import "CleverTapReactManager.h"

👆🏽The above works and builds perfectly with no issues

🔻 The below doesn't work and keeps throwing the error

#import <CleverTap-iOS-SDK/CleverTap.h>
#import <clevertap-react-native/CleverTapReactManager.h>