DJI-Mobile-SDK-Tutorials / iOS-FPVDemo

A demo to introduce how to implement the FPV view, take photo and record video using DJI Mobile SDK.
MIT License
37 stars 24 forks source link

"DJISDK/DJISDK.h" not found VideoPreviewer with Swift, CocoaPods #7

Open guicolares opened 8 years ago

guicolares commented 8 years ago

Hi,

I am trying develop camera feature with Swift, cocoapods and using the import VideoPreviewer but I'm having the error below:

-/Users/guilherme/Documents/xcodeprojects/skydronesCapture/VideoPreviewer/VideoPreviewer/VideoPreviewer.m:13:9: 'DJISDK/DJISDK.h' file not found

But the parent project is works fine the import DJISDK.

Thanks.

oliverou commented 8 years ago

Hi, please make sure the VideoPreviewer folder(Includes the VideoPreviewer.xcodeproj file, not just the .h and .m files) you download is placed in the same Frameworks folder as DJISDK.framework. Follow the Importing the VideoPreviewer section in the tutorial. Hope this helps.

dwcares commented 7 years ago

porting to Swift was a little tricker than i expected, especially with the binary data types/streams for the video previewer.

i built a sample here: https://github.com/dwcares/iOS-FPVDemo-Swift

feel free to pull it into the samples.

oliverou commented 7 years ago

Hi @dwcares, thanks for the help. You can also check Importing the VideoPreviewer tutorial for help.

dwcares commented 7 years ago

@oliverou thanks! the tutorial is helpful but since it's only objective-c it doesn't help with the tricky bits like getting the Swift3 Data object from ::videoFeed piped to the VideoPreviewer. if you make a new swift repo i will create a PR for a swift version of the sample that i wrote. (https://github.com/dwcares/iOS-FPVDemo-Swift)

11

oliverou commented 7 years ago

Hi @dwcares , thanks! Please check my reply on this issue. Close this issue now.