Coder Social home page Coder Social logo

aerobotics / react-native-dji-mobile Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 14.0 2.41 MB

React Native Wrapper Library For DJI Mobile SDK

License: MIT License

Java 44.02% JavaScript 16.99% Objective-C 5.40% Ruby 0.42% Swift 32.54% Python 0.59% C 0.04%
android dji dji-mobile-sdk ios react-native

react-native-dji-mobile's People

Contributors

arosendorff avatar dependabot[bot] avatar karouman avatar mcorner avatar mikewoots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-dji-mobile's Issues

Can't pass the ios build on xCode

Hi,
Thanks for your work on this library. I am building an ios version app with this library, following the instructions, but still blocked by some build issues in xCode and need you help as I just start with the ios stuff.

I am using:
react-nativve: 0.59.9
react-native-dji-mobile: 0.3.11
xCode: 10.2.1

I set below as in GettingStarted.md:
1. in podfile
a. add "use_modular_headers!"
b. set "

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec', :modular_headers => false
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false
pod 'DJIWidget', '~> 1.5', :modular_headers => true
pod 'react-native-dji-mobile', :path => '../node_modules/react-native-dji-mobile'"
(pod install successfully)

2. Created 'empty.swift' at the same level as the Info.plist
Run build in xCode, but get 'Apple Mach-O Linker Error' as below (just list some the errors):

"OBJC_CLASS$_DJIFlightControllerKey", referenced from:
objc-class-ref in libreact-native-dji-mobile.a(DJIMissionControl.o)
objc-class-ref in libreact-native-dji-mobile.a(DJIMobile.o)
objc-class-ref in libreact-native-dji-mobile.a(DJIRealTimeDataLogger.o)
objc-class-ref in libreact-native-dji-mobile.a(VirtualStickTimelineElement.o)
"OBJC_CLASS$_DJIWaypoint", referenced from:
objc-class-ref in libreact-native-dji-mobile.a(WaypointMissionTimelineElement.o)
"_DJIFlightControllerParamIsUltrasonicBeingUsed", referenced from:
function signature specialization <Arg[1] = Dead> of react_native_dji_mobile.VirtualStickTimelineElement.(isUltrasonicEnabled in _9A648512620641238644E54D7118CAA8)(withCompletion: (Swift.Bool, Swift.Error?) -> ()) -> () in libreact-native-dji-mobile.a(VirtualStickTimelineElement.o)
"_DJICameraParamVideoFileCompressionStandard", referenced from:
react_native_dji_mobile.CameraControlNative.setVideoFileCompressionStandard(videoCompressionStandard: Swift.String, resolve: (Any?) -> (), reject: (Swift.String?, Swift.String?, Swift.Error?) -> ()) -> () in libreact-native-dji-mobile.a(CameraControl.o)
"OBJC_CLASS$_DJISDKManager", referenced from:
objc-class-ref in libreact-native-dji-mobile.a(DJIMedia.o)
objc-class-ref in libreact-native-dji-mobile.a(CameraControl.o)
objc-class-ref in libreact-native-dji-mobile.a(DroneVideoView.o)
objc-class-ref in libreact-native-dji-mobile.a(DJIMissionControl.o)
objc-class-ref in libreact-native-dji-mobile.a(DJIMobile.o)
objc-class-ref in libreact-native-dji-mobile.a(DJIRealTimeDataLogger.o)
objc-class-ref in libreact-native-dji-mobile.a(RecordFlightData.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Google and tried to change 'Mach-O Type' from 'Executable' to 'Static Library' can resolve these errors, but cause another error as:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk/usr/lib/libz.tbd is not an object file (not allowed in a library)``

Will be appreciate if anyone can advise how I could move on as well as any specific settings in xCode, (i.e. enable Bitcode => disable, Mach-O Type => ?, etc.)

React Native v66 support?

I'm trying to setup this package for an iPad app.

I've tried to create a new RN project with --version flag like npx react-native init ProjectName --version 0.57.8, but that version flag isn't working, so that command created a new project with the latest RN version and this package isn't compatible with the latest RN version.

Is this repo still maintained or is there any other oper source solution available? Any help is appreciated!

The following Swift pods cannot yet be integrated as static libraries

When setting up the project according to the readme I see the following errors:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `react-native-dji-mobile` depends upon `DJIWidget`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
react-native -v
react-native-cli: 2.0.1
react-native: 0.62.2

Is there an updated README version to integrate this into a new project?

Podfile below


use_modular_headers!
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

def add_flipper_pods!(versions = {})
  versions['Flipper'] ||= '~> 0.33.1'
  versions['DoubleConversion'] ||= '1.1.7'
  versions['Flipper-Folly'] ||= '~> 2.1'
  versions['Flipper-Glog'] ||= '0.3.6'
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
  versions['Flipper-RSocket'] ||= '~> 1.0'

  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'

  # List all transitive dependencies for FlipperKit pods
  # to avoid them being linked in Release builds
  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end

# Post Install processing for Flipper
def flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == 'YogaKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
end

target 'YourProjectName' do
  # Pods for YourProjectName
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec', :modular_headers => false
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false

  pod 'DJIWidget', '~> 1.5', :modular_headers => false
  pod 'react-native-dji-mobile', :path => '../node_modules/react-native-dji-mobile'

  target 'YourProjectNameTests' do
    inherit! :complete
    # Pods for testing
  end

  use_native_modules!

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  add_flipper_pods!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'YourProjectName-tvOS' do
  # Pods for YourProjectName-tvOS

  target 'YourProjectName-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Implement media download

I have had poor luck with downloading movies using the SDK in the past, but maybe I missed something.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.