Closed hoseinmobasher closed 6 years ago
Hi @hoseinmobasher ,
Please check Header Search Paths in RNVideoPlayer, is it already added: $(SRCROOT)/../../../ios/HuntersLog -> recursive
It will help RNVideoPlayer interact with AppDelegate.h in root project.
Please try and let me know if you still find any problems.
Thanks.
Hello BondGoat, i'm having the same issue. I've tried what you had sugested in your previous comment and i still get the error. Can you help me, thanks.
Hi @andrelimawork ,
Sorry, there's mistake in previous comment, it should be : $(SRCROOT)/../../../ios/[your project source] The number of '../' depends on your folder structure, this path should point to the folder that contain your project's AppDelegate.h
For example my project is HuntersLog, the folder structure is: HuntersLog:
OK, so from above structure, in RNVideoPlayer -> BuildSettings -> Search Path -> Header Search Paths: add '$(SRCROOT)/../../../ios/HuntersLog' -> recursive
Please check your app folder structure and change the approriate path, it should be worked.
BRs.
heheheh thanks for your time, i've figured out it myself. It stays as help for other people with the same problem.
@BondGoat You can avoid including AppDelegate.h by not using the delegate and instead fetch UIWindow like this:
UIWindow *window = [[UIApplication sharedApplication] keyWindow] ... [window.rootViewController.view addSubview.....
Just run into the same problem and solved it following the owner's suggestion. Uploading this image here for other people who run into the same problem:
I saw there is the path $(SRCROOT)/../../../ios/HuntersLog
and I change HuntersLog
into my own project's name, then it builds successfully.
I have the same project structure as the example given by the owner in his previous answer.
But.. if this is a code to be shared, why the HuntersLog
folder is hardcoded?
Hi @msdark ,
Because this code was first used for my Project, so in order to apply to yours, you need to make some update like what I've shown above, and 1 more reason is that the module use AppDelegate instance so you need to import it from the main project as "$(SRCROOT)/../../../ios/[your project here]".
Thanks.
hi. I opened 'node_modules/react-native-native-video-player/ios/RNVideoPlayer.xcodeproj' with Xcode and go to Build Settings > Search Paths > Header Search Paths then Edit the path variable from $(SRCROOT)/../../../HuntersLog to $(SRCROOT)/../../../VideoDemo and it can build. But after build success, it gets an error.
@BondGoat @KlavierCat @andrelimawork could guys help me?
hi. I opened 'node_modules/react-native-native-video-player/ios/RNVideoPlayer.xcodeproj' with Xcode and go to Build Settings > Search Paths > Header Search Paths then Edit the path variable from $(SRCROOT)/../../../HuntersLog to $(SRCROOT)/../../../VideoDemo and it can build. But after build success, it gets an error.
@BondGoat @KlavierCat @andrelimawork could guys help me?
hi. I opened 'node_modules/react-native-native-video-player/ios/RNVideoPlayer.xcodeproj' with Xcode and go to Build Settings > Search Paths > Header Search Paths then Edit the path variable from $(SRCROOT)/../../../HuntersLog to $(SRCROOT)/../../../VideoDemo and it can build. But after build success, it gets an error.
@BondGoat @KlavierCat @andrelimawork could guys help me?
i'm facing same problem ...please help
Hello, I've downloaded your module and tried to compile it, but faced to the following error:
This error occurred in RNVideoPlayer.h and first line of that. So, how should I do? Where is the AppDelegate.h file?
Thanks in advance