adtrace / adtrace_sdk_react_native

This is the React Native SDK of
https://adtrace.io/
Other
7 stars 1 forks source link

'RCTEventEmitter.h' file not found #3

Closed amereii closed 2 years ago

amereii commented 4 years ago

https://github.com/adtrace/adtrace_sdk_react_native/blob/master/ios/AdtraceEventEmitter.h#L12

Are you test adtrace SDK in iOS? is it working ?

arefhosseini commented 4 years ago

Have you tried this?

amereii commented 4 years ago

I added pod 'react-native-adtrace', :path => '../node_modules/react-native-adtrace' in my pod file

amereii commented 4 years ago

@arefhosseini As you labeled the issue as bug How long it take to fix it?

arefhosseini commented 4 years ago

Will fix this at end of the week.

amereii commented 4 years ago

@arefhosseini I just want to ask , is it solved?

arefhosseini commented 4 years ago

Hey there. Hope it will be fix on next 1-2 days. Thanks for your patient.

arefhosseini commented 4 years ago

@amereii You can test react-native for iOS. Just make sure that your adtrace version is 1.2.0. I'm waiting for your result.

amereii commented 4 years ago

@arefhosseini sorry for late response, I'm too busy these days I tested adtrace version 1.2.0 , still cannot run my add and I have 'RCTEventEmitter.h' file not found error in compile time I double check that I installed react-native-adtrace@1.2.0 and Adtrace@1.0.1 and I clear both yarn and pod cache

arefhosseini commented 4 years ago

Can you please attach the full log of output? It might be not using the last version of react-native-adtrace.

amereii commented 4 years ago

I'm sure that I am using react-native-adtrace@1.2.0 , I also checked version in node_modules/react-native-adtrace/package.json

I am using react-native@0.59.10

xcode error logs :

CompileC /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/Objects-normal/x86_64/AdtraceEventEmitter.o /Users/mac/Developer/app-front/node_modules/react-native-adtrace/ios/AdtraceEventEmitter.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'react-native-adtrace' from project 'Pods')
    cd /Users/mac/Developer/app-front/ios/Pods
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios8.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/mac/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/mac/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Index/DataStore -iquote /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/react-native-adtrace-generated-files.hmap -I/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/react-native-adtrace-own-target-headers.hmap -I/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/react-native-adtrace-all-non-framework-target-headers.hmap -ivfsoverlay /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/all-product-headers.yaml -iquote /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/react-native-adtrace-project-headers.hmap -I/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Products/Debug-iphonesimulator/react-native-adtrace/include -I/Users/mac/Developer/app-front/ios/Pods/Headers/Private -I/Users/mac/Developer/app-front/ios/Pods/Headers/Private/react-native-adtrace -I/Users/mac/Developer/app-front/ios/Pods/Headers/Public -I/Users/mac/Developer/app-front/ios/Pods/Headers/Public/Adtrace -I/Users/mac/Developer/app-front/ios/Pods/Headers/Public/React -I/Users/mac/Developer/app-front/ios/Pods/Headers/Public/react-native-adtrace -I/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/DerivedSources-normal/x86_64 -I/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/DerivedSources/x86_64 -I/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/DerivedSources -F/Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Products/Debug-iphonesimulator/react-native-adtrace -include /Users/mac/Developer/app-front/ios/Pods/Target\ Support\ Files/react-native-adtrace/react-native-adtrace-prefix.pch -MMD -MT dependencies -MF /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/Objects-normal/x86_64/AdtraceEventEmitter.d --serialize-diagnostics /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/Objects-normal/x86_64/AdtraceEventEmitter.dia -c /Users/mac/Developer/app-front/node_modules/react-native-adtrace/ios/AdtraceEventEmitter.m -o /Users/mac/Library/Developer/Xcode/DerivedData/app-hdlabmrvecomvmaxnwumoobcbqjb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-adtrace.build/Objects-normal/x86_64/AdtraceEventEmitter.o

In file included from /Users/mac/Developer/app-front/node_modules/react-native-adtrace/ios/AdtraceEventEmitter.m:6:
/Users/mac/Developer/app-front/node_modules/react-native-adtrace/ios/AdtraceEventEmitter.h:12:9: fatal error: '"RCTEventEmitter.h"' file not found
#import <"RCTEventEmitter.h">
        ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
arefhosseini commented 4 years ago

Please delete podfile.lock and Pods folder in iOS directory then run pod install then reinstall the app. I'm sure for fix this issue in this version.

amereii commented 4 years ago

@arefhosseini I am created a reproducible code

git clone https://github.com/amereii/adtrace-ios-bug
cd adtrace-ios-bug
yarn install
cd ios
pod install

Run with xcode

arefhosseini commented 4 years ago

Your Podfile project has no raect-native modules for integrating. Please see Podfile example.

amereii commented 4 years ago

@arefhosseini your example project used react-native@0.61.5 https://github.com/adtrace/adtrace_sdk_react_native/blob/master/example/package.json#L14

I am using react-native@0.59.10 and it is not required in pod , these modules already embedded in project

arefhosseini commented 4 years ago

Okay, I will try react-native-adtrace in react-native@0.59.10 and notify you this day.

amereii commented 4 years ago

@arefhosseini I am tried to install adtrace in a fresh react-native@0.61.5 created project

https://github.com/amereii/adtrace-ios-bug2

In this project I have the following error

Library not found for -lAdtrace

What is problem here? https://github.com/amereii/adtrace-ios-bug2/commit/4be3c520c1d4a2a07b72d23eaed7466c307ffb45

arefhosseini commented 4 years ago

Can you install modules with npx instead of yarn? Maybe it works.

amereii commented 4 years ago

npx ? Are you talking about npm ? AFAIK npx just execute npm package binaries not install packages? How can I install with npx?

arefhosseini commented 4 years ago

Actually I'm not a react-native developer. I just following commands via this link Due to this tutorial all commands run with npx.

amereii commented 4 years ago

https://www.npmjs.com/package/npx is a tool to run package binaries , like npm run and yarn run , AFAIK it is not a dependency manager

for instance . npx react-native run-android executes node_modules/.bin/react-native with run-android argument

yarn and npm are javascript dependency manager , in react-native project it is recommended by Facebook to use yarn

But I will try npm too later

amereii commented 4 years ago

Do you know how can I fix Library not found for -lAdtrace error in react-native@0.61.5

arefhosseini commented 4 years ago

Did you try linking adtrace to react-native? and try this:

1. Delete Podfile.lock
2. cd ios
3. pod deintegrate
4. pod install
5. cd ..
6. rm -rf node_modules && yarn
7. Add use_frameworks! to your Podfile
amereii commented 4 years ago

I followed your commands , it not working and created many many other problems

Did you try linking adtrace to react-native?

I manually linked adtrace too (without pod) in react-native@0.59.10 , In this case I have Library not found for -lAdtrace error exactly like react-native@0.61.5

arefhosseini commented 4 years ago

We are sorry for having such a big issue and not working this SDK. I will test until this day and notify you. If you have suggested commands for running and testing in your platform, please attach them.

We can integrate with your company directly such as phone call or personal meeting for fixing this issue. If you are willing to do that please contact us.

Thanks

namini40 commented 2 years ago

@arefhosseini @ya30janfeshani our new version is released. you may want to take a look! V2.0.3

savdev-ua commented 1 year ago

still facing this issue, is there any new workarounds?