├── .gitignore ├── GSDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── GSDemo.xccheckout │ │ └── GSDemo.xcscmblueprint │ └── xcuserdata │ │ ├── DJI.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ ├── ares.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── zlinoliver.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── DJI.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── GSDemo.xcscheme │ │ └── xcschememanagement.plist │ ├── ares.xcuserdatad │ └── xcschemes │ │ ├── GSDemo.xcscheme │ │ └── xcschememanagement.plist │ └── zlinoliver.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── GSDemo.xcscheme │ └── xcschememanagement.plist ├── GSDemo ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── DJIAircraftAnnotation.h ├── DJIAircraftAnnotation.m ├── DJIAircraftAnnotationView.h ├── DJIAircraftAnnotationView.m ├── DJIGSButtonViewController.h ├── DJIGSButtonViewController.m ├── DJIGSButtonViewController.xib ├── DJIMapController.h ├── DJIMapController.m ├── DJIRootViewController.h ├── DJIRootViewController.m ├── DJIWaypointConfigViewController.h ├── DJIWaypointConfigViewController.m ├── DJIWaypointConfigViewController.xib ├── DemoUtility │ ├── DemoUtility.h │ └── DemoUtility.m ├── GSDemo-pch.pch ├── GSDemo.entitlements ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── aircraft.imageset │ │ ├── Contents.json │ │ └── aircraft@2x.png ├── Info.plist ├── aircraft@2x.png └── main.m ├── GSDemoTests ├── GSDemoTests.m └── Info.plist ├── LICENSE.txt ├── Podfile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | .DS_Store 5 | 6 | ## Build generated 7 | build/ 8 | DerivedData 9 | Pods/ 10 | Podfile.lock 11 | 12 | ## Various settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | xcuserdata 22 | 23 | ## Other 24 | *.xccheckout 25 | *.moved-aside 26 | *.xcuserstate 27 | *.xcscmblueprint 28 | Podfile.lock 29 | 30 | *.xcworkspace 31 | 32 | ## Obj-C/Swift specific 33 | *.hmap 34 | *.ipa 35 | *.xcworkspace 36 | 37 | # CocoaPods 38 | # 39 | # We recommend against adding the Pods directory to your .gitignore. However 40 | # you should judge for yourself, the pros and cons are mentioned at: 41 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 42 | # 43 | #Pods/ 44 | 45 | # Carthage 46 | # 47 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 48 | # Carthage/Checkouts 49 | 50 | Carthage/Build 51 | 52 | build 53 | Output 54 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 080399469B2DBEA6F0789E6D /* libPods-GSDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD01B4A59AB3761414068C5E /* libPods-GSDemo.a */; }; 11 | A402A0701B4BC22400129605 /* DJIRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A402A06F1B4BC22400129605 /* DJIRootViewController.m */; }; 12 | A402A0741B4BC43800129605 /* DJIMapController.m in Sources */ = {isa = PBXBuildFile; fileRef = A402A0721B4BC43800129605 /* DJIMapController.m */; }; 13 | A402A07A1B4BDAE400129605 /* DJIAircraftAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = A402A0771B4BDAE400129605 /* DJIAircraftAnnotation.m */; }; 14 | A402A07B1B4BDAE400129605 /* DJIAircraftAnnotationView.m in Sources */ = {isa = PBXBuildFile; fileRef = A402A0791B4BDAE400129605 /* DJIAircraftAnnotationView.m */; }; 15 | A4507F291CB506D40037861C /* DJIGSButtonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A4507F241CB506D40037861C /* DJIGSButtonViewController.m */; }; 16 | A4507F2A1CB506D40037861C /* DJIGSButtonViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A4507F251CB506D40037861C /* DJIGSButtonViewController.xib */; }; 17 | A4507F2B1CB506D40037861C /* DJIWaypointConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A4507F271CB506D40037861C /* DJIWaypointConfigViewController.m */; }; 18 | A4507F2C1CB506D40037861C /* DJIWaypointConfigViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A4507F281CB506D40037861C /* DJIWaypointConfigViewController.xib */; }; 19 | A4507F301CB506F20037861C /* DemoUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = A4507F2F1CB506F20037861C /* DemoUtility.m */; }; 20 | A4E86B781B4A374300F204DA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A4E86B771B4A374300F204DA /* main.m */; }; 21 | A4E86B7B1B4A374300F204DA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A4E86B7A1B4A374300F204DA /* AppDelegate.m */; }; 22 | A4E86B811B4A374300F204DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A4E86B7F1B4A374300F204DA /* Main.storyboard */; }; 23 | A4E86B831B4A374300F204DA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A4E86B821B4A374300F204DA /* Images.xcassets */; }; 24 | A4E86B861B4A374300F204DA /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = A4E86B841B4A374300F204DA /* LaunchScreen.xib */; }; 25 | A4F9574C1B4ADD570017733D /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A4F9574B1B4ADD570017733D /* MapKit.framework */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 0203E5861C9C0B5F00A69BCF /* GSDemo-pch.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GSDemo-pch.pch"; sourceTree = ""; }; 30 | 5B0CAE4A21C1AEFA08AF5AD5 /* Pods-GSDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GSDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-GSDemo/Pods-GSDemo.release.xcconfig"; sourceTree = ""; }; 31 | A402A06E1B4BC22400129605 /* DJIRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJIRootViewController.h; sourceTree = ""; }; 32 | A402A06F1B4BC22400129605 /* DJIRootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJIRootViewController.m; sourceTree = ""; }; 33 | A402A0711B4BC43800129605 /* DJIMapController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJIMapController.h; sourceTree = ""; }; 34 | A402A0721B4BC43800129605 /* DJIMapController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJIMapController.m; sourceTree = ""; }; 35 | A402A0761B4BDAE400129605 /* DJIAircraftAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJIAircraftAnnotation.h; sourceTree = ""; }; 36 | A402A0771B4BDAE400129605 /* DJIAircraftAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJIAircraftAnnotation.m; sourceTree = ""; }; 37 | A402A0781B4BDAE400129605 /* DJIAircraftAnnotationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJIAircraftAnnotationView.h; sourceTree = ""; }; 38 | A402A0791B4BDAE400129605 /* DJIAircraftAnnotationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJIAircraftAnnotationView.m; sourceTree = ""; }; 39 | A44305471DA88CF3009C1370 /* GSDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GSDemo.entitlements; sourceTree = ""; }; 40 | A4507F231CB506D40037861C /* DJIGSButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJIGSButtonViewController.h; sourceTree = ""; }; 41 | A4507F241CB506D40037861C /* DJIGSButtonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJIGSButtonViewController.m; sourceTree = ""; }; 42 | A4507F251CB506D40037861C /* DJIGSButtonViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DJIGSButtonViewController.xib; sourceTree = ""; }; 43 | A4507F261CB506D40037861C /* DJIWaypointConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJIWaypointConfigViewController.h; sourceTree = ""; }; 44 | A4507F271CB506D40037861C /* DJIWaypointConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJIWaypointConfigViewController.m; sourceTree = ""; }; 45 | A4507F281CB506D40037861C /* DJIWaypointConfigViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DJIWaypointConfigViewController.xib; sourceTree = ""; }; 46 | A4507F2E1CB506F20037861C /* DemoUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoUtility.h; sourceTree = ""; }; 47 | A4507F2F1CB506F20037861C /* DemoUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoUtility.m; sourceTree = ""; }; 48 | A4E86B721B4A374300F204DA /* GSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | A4E86B761B4A374300F204DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | A4E86B771B4A374300F204DA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | A4E86B791B4A374300F204DA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 52 | A4E86B7A1B4A374300F204DA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 53 | A4E86B801B4A374300F204DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 54 | A4E86B821B4A374300F204DA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 55 | A4E86B851B4A374300F204DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 56 | A4E86B901B4A374300F204DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | A4E86B911B4A374300F204DA /* GSDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GSDemoTests.m; sourceTree = ""; }; 58 | A4F9574B1B4ADD570017733D /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 59 | BD01B4A59AB3761414068C5E /* libPods-GSDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GSDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | D28B91E9DC596A93C22AC0F1 /* Pods-GSDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GSDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GSDemo/Pods-GSDemo.debug.xcconfig"; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | A4E86B6F1B4A374300F204DA /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | A4F9574C1B4ADD570017733D /* MapKit.framework in Frameworks */, 69 | 080399469B2DBEA6F0789E6D /* libPods-GSDemo.a in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 45EC2DD14ECB83295E2E51A5 /* Pods */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | D28B91E9DC596A93C22AC0F1 /* Pods-GSDemo.debug.xcconfig */, 80 | 5B0CAE4A21C1AEFA08AF5AD5 /* Pods-GSDemo.release.xcconfig */, 81 | ); 82 | name = Pods; 83 | sourceTree = ""; 84 | }; 85 | A4507F2D1CB506F20037861C /* DemoUtility */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | A4507F2E1CB506F20037861C /* DemoUtility.h */, 89 | A4507F2F1CB506F20037861C /* DemoUtility.m */, 90 | ); 91 | path = DemoUtility; 92 | sourceTree = ""; 93 | }; 94 | A4E86B691B4A374300F204DA = { 95 | isa = PBXGroup; 96 | children = ( 97 | A4E86B741B4A374300F204DA /* GSDemo */, 98 | A4E86B9B1B4A56C600F204DA /* Frameworks */, 99 | A4E86B8E1B4A374300F204DA /* GSDemoTests */, 100 | A4E86B731B4A374300F204DA /* Products */, 101 | 45EC2DD14ECB83295E2E51A5 /* Pods */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | A4E86B731B4A374300F204DA /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | A4E86B721B4A374300F204DA /* GSDemo.app */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | A4E86B741B4A374300F204DA /* GSDemo */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | A44305471DA88CF3009C1370 /* GSDemo.entitlements */, 117 | A402A06E1B4BC22400129605 /* DJIRootViewController.h */, 118 | A402A06F1B4BC22400129605 /* DJIRootViewController.m */, 119 | A4E86B791B4A374300F204DA /* AppDelegate.h */, 120 | A4E86B7A1B4A374300F204DA /* AppDelegate.m */, 121 | A402A0761B4BDAE400129605 /* DJIAircraftAnnotation.h */, 122 | A402A0771B4BDAE400129605 /* DJIAircraftAnnotation.m */, 123 | A402A0781B4BDAE400129605 /* DJIAircraftAnnotationView.h */, 124 | A402A0791B4BDAE400129605 /* DJIAircraftAnnotationView.m */, 125 | A402A0711B4BC43800129605 /* DJIMapController.h */, 126 | A402A0721B4BC43800129605 /* DJIMapController.m */, 127 | A4507F231CB506D40037861C /* DJIGSButtonViewController.h */, 128 | A4507F241CB506D40037861C /* DJIGSButtonViewController.m */, 129 | A4507F251CB506D40037861C /* DJIGSButtonViewController.xib */, 130 | A4507F261CB506D40037861C /* DJIWaypointConfigViewController.h */, 131 | A4507F271CB506D40037861C /* DJIWaypointConfigViewController.m */, 132 | A4507F281CB506D40037861C /* DJIWaypointConfigViewController.xib */, 133 | A4E86B7F1B4A374300F204DA /* Main.storyboard */, 134 | A4E86B821B4A374300F204DA /* Images.xcassets */, 135 | A4E86B841B4A374300F204DA /* LaunchScreen.xib */, 136 | A4507F2D1CB506F20037861C /* DemoUtility */, 137 | A4E86B751B4A374300F204DA /* Supporting Files */, 138 | ); 139 | path = GSDemo; 140 | sourceTree = ""; 141 | }; 142 | A4E86B751B4A374300F204DA /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 0203E5861C9C0B5F00A69BCF /* GSDemo-pch.pch */, 146 | A4E86B761B4A374300F204DA /* Info.plist */, 147 | A4E86B771B4A374300F204DA /* main.m */, 148 | ); 149 | name = "Supporting Files"; 150 | sourceTree = ""; 151 | }; 152 | A4E86B8E1B4A374300F204DA /* GSDemoTests */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | A4E86B911B4A374300F204DA /* GSDemoTests.m */, 156 | A4E86B8F1B4A374300F204DA /* Supporting Files */, 157 | ); 158 | path = GSDemoTests; 159 | sourceTree = ""; 160 | }; 161 | A4E86B8F1B4A374300F204DA /* Supporting Files */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | A4E86B901B4A374300F204DA /* Info.plist */, 165 | ); 166 | name = "Supporting Files"; 167 | sourceTree = ""; 168 | }; 169 | A4E86B9B1B4A56C600F204DA /* Frameworks */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | A4F9574B1B4ADD570017733D /* MapKit.framework */, 173 | BD01B4A59AB3761414068C5E /* libPods-GSDemo.a */, 174 | ); 175 | name = Frameworks; 176 | path = GSDemo; 177 | sourceTree = ""; 178 | }; 179 | /* End PBXGroup section */ 180 | 181 | /* Begin PBXNativeTarget section */ 182 | A4E86B711B4A374300F204DA /* GSDemo */ = { 183 | isa = PBXNativeTarget; 184 | buildConfigurationList = A4E86B951B4A374300F204DA /* Build configuration list for PBXNativeTarget "GSDemo" */; 185 | buildPhases = ( 186 | 7C397C450D07EB3410E544D4 /* [CP] Check Pods Manifest.lock */, 187 | A4E86B6E1B4A374300F204DA /* Sources */, 188 | A4E86B6F1B4A374300F204DA /* Frameworks */, 189 | A4E86B701B4A374300F204DA /* Resources */, 190 | 77FBCBEDAFAB5EF6E97903FA /* [CP] Embed Pods Frameworks */, 191 | 6EE988EA46BB0D1D54711519 /* [CP] Copy Pods Resources */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | ); 197 | name = GSDemo; 198 | productName = GSDemo; 199 | productReference = A4E86B721B4A374300F204DA /* GSDemo.app */; 200 | productType = "com.apple.product-type.application"; 201 | }; 202 | /* End PBXNativeTarget section */ 203 | 204 | /* Begin PBXProject section */ 205 | A4E86B6A1B4A374300F204DA /* Project object */ = { 206 | isa = PBXProject; 207 | attributes = { 208 | LastUpgradeCheck = 0630; 209 | ORGANIZATIONNAME = DJI; 210 | TargetAttributes = { 211 | A4E86B711B4A374300F204DA = { 212 | CreatedOnToolsVersion = 6.3; 213 | DevelopmentTeam = 7UL3LRJL93; 214 | SystemCapabilities = { 215 | com.apple.DataProtection = { 216 | enabled = 1; 217 | }; 218 | }; 219 | }; 220 | }; 221 | }; 222 | buildConfigurationList = A4E86B6D1B4A374300F204DA /* Build configuration list for PBXProject "GSDemo" */; 223 | compatibilityVersion = "Xcode 3.2"; 224 | developmentRegion = English; 225 | hasScannedForEncodings = 0; 226 | knownRegions = ( 227 | en, 228 | Base, 229 | ); 230 | mainGroup = A4E86B691B4A374300F204DA; 231 | productRefGroup = A4E86B731B4A374300F204DA /* Products */; 232 | projectDirPath = ""; 233 | projectRoot = ""; 234 | targets = ( 235 | A4E86B711B4A374300F204DA /* GSDemo */, 236 | ); 237 | }; 238 | /* End PBXProject section */ 239 | 240 | /* Begin PBXResourcesBuildPhase section */ 241 | A4E86B701B4A374300F204DA /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | A4E86B811B4A374300F204DA /* Main.storyboard in Resources */, 246 | A4507F2C1CB506D40037861C /* DJIWaypointConfigViewController.xib in Resources */, 247 | A4E86B861B4A374300F204DA /* LaunchScreen.xib in Resources */, 248 | A4507F2A1CB506D40037861C /* DJIGSButtonViewController.xib in Resources */, 249 | A4E86B831B4A374300F204DA /* Images.xcassets in Resources */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | /* End PBXResourcesBuildPhase section */ 254 | 255 | /* Begin PBXShellScriptBuildPhase section */ 256 | 6EE988EA46BB0D1D54711519 /* [CP] Copy Pods Resources */ = { 257 | isa = PBXShellScriptBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | inputPaths = ( 262 | ); 263 | name = "[CP] Copy Pods Resources"; 264 | outputPaths = ( 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | shellPath = /bin/sh; 268 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GSDemo/Pods-GSDemo-resources.sh\"\n"; 269 | showEnvVarsInLog = 0; 270 | }; 271 | 77FBCBEDAFAB5EF6E97903FA /* [CP] Embed Pods Frameworks */ = { 272 | isa = PBXShellScriptBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | ); 276 | inputPaths = ( 277 | ); 278 | name = "[CP] Embed Pods Frameworks"; 279 | outputPaths = ( 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | shellPath = /bin/sh; 283 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GSDemo/Pods-GSDemo-frameworks.sh\"\n"; 284 | showEnvVarsInLog = 0; 285 | }; 286 | 7C397C450D07EB3410E544D4 /* [CP] Check Pods Manifest.lock */ = { 287 | isa = PBXShellScriptBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ); 291 | inputPaths = ( 292 | ); 293 | name = "[CP] Check Pods Manifest.lock"; 294 | outputPaths = ( 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | shellPath = /bin/sh; 298 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 299 | showEnvVarsInLog = 0; 300 | }; 301 | /* End PBXShellScriptBuildPhase section */ 302 | 303 | /* Begin PBXSourcesBuildPhase section */ 304 | A4E86B6E1B4A374300F204DA /* Sources */ = { 305 | isa = PBXSourcesBuildPhase; 306 | buildActionMask = 2147483647; 307 | files = ( 308 | A4507F301CB506F20037861C /* DemoUtility.m in Sources */, 309 | A402A07A1B4BDAE400129605 /* DJIAircraftAnnotation.m in Sources */, 310 | A4507F2B1CB506D40037861C /* DJIWaypointConfigViewController.m in Sources */, 311 | A402A0701B4BC22400129605 /* DJIRootViewController.m in Sources */, 312 | A4507F291CB506D40037861C /* DJIGSButtonViewController.m in Sources */, 313 | A402A0741B4BC43800129605 /* DJIMapController.m in Sources */, 314 | A402A07B1B4BDAE400129605 /* DJIAircraftAnnotationView.m in Sources */, 315 | A4E86B7B1B4A374300F204DA /* AppDelegate.m in Sources */, 316 | A4E86B781B4A374300F204DA /* main.m in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | /* End PBXSourcesBuildPhase section */ 321 | 322 | /* Begin PBXVariantGroup section */ 323 | A4E86B7F1B4A374300F204DA /* Main.storyboard */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | A4E86B801B4A374300F204DA /* Base */, 327 | ); 328 | name = Main.storyboard; 329 | sourceTree = ""; 330 | }; 331 | A4E86B841B4A374300F204DA /* LaunchScreen.xib */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | A4E86B851B4A374300F204DA /* Base */, 335 | ); 336 | name = LaunchScreen.xib; 337 | sourceTree = ""; 338 | }; 339 | /* End PBXVariantGroup section */ 340 | 341 | /* Begin XCBuildConfiguration section */ 342 | A4E86B931B4A374300F204DA /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BOOL_CONVERSION = YES; 351 | CLANG_WARN_CONSTANT_CONVERSION = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INT_CONVERSION = YES; 356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 357 | CLANG_WARN_UNREACHABLE_CODE = YES; 358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 360 | COPY_PHASE_STRIP = NO; 361 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 362 | ENABLE_STRICT_OBJC_MSGSEND = YES; 363 | GCC_C_LANGUAGE_STANDARD = gnu99; 364 | GCC_DYNAMIC_NO_PIC = NO; 365 | GCC_NO_COMMON_BLOCKS = YES; 366 | GCC_OPTIMIZATION_LEVEL = 0; 367 | GCC_PREPROCESSOR_DEFINITIONS = ( 368 | "DEBUG=1", 369 | "$(inherited)", 370 | ); 371 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 374 | GCC_WARN_UNDECLARED_SELECTOR = YES; 375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 376 | GCC_WARN_UNUSED_FUNCTION = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 379 | MTL_ENABLE_DEBUG_INFO = YES; 380 | ONLY_ACTIVE_ARCH = YES; 381 | SDKROOT = iphoneos; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | }; 384 | name = Debug; 385 | }; 386 | A4E86B941B4A374300F204DA /* Release */ = { 387 | isa = XCBuildConfiguration; 388 | buildSettings = { 389 | ALWAYS_SEARCH_USER_PATHS = NO; 390 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 391 | CLANG_CXX_LIBRARY = "libc++"; 392 | CLANG_ENABLE_MODULES = YES; 393 | CLANG_ENABLE_OBJC_ARC = YES; 394 | CLANG_WARN_BOOL_CONVERSION = YES; 395 | CLANG_WARN_CONSTANT_CONVERSION = YES; 396 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 397 | CLANG_WARN_EMPTY_BODY = YES; 398 | CLANG_WARN_ENUM_CONVERSION = YES; 399 | CLANG_WARN_INT_CONVERSION = YES; 400 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 401 | CLANG_WARN_UNREACHABLE_CODE = YES; 402 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 403 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 404 | COPY_PHASE_STRIP = NO; 405 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 406 | ENABLE_NS_ASSERTIONS = NO; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | GCC_C_LANGUAGE_STANDARD = gnu99; 409 | GCC_NO_COMMON_BLOCKS = YES; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 417 | MTL_ENABLE_DEBUG_INFO = NO; 418 | SDKROOT = iphoneos; 419 | TARGETED_DEVICE_FAMILY = "1,2"; 420 | VALIDATE_PRODUCT = YES; 421 | }; 422 | name = Release; 423 | }; 424 | A4E86B961B4A374300F204DA /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | baseConfigurationReference = D28B91E9DC596A93C22AC0F1 /* Pods-GSDemo.debug.xcconfig */; 427 | buildSettings = { 428 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 429 | CODE_SIGN_ENTITLEMENTS = GSDemo/GSDemo.entitlements; 430 | DEVELOPMENT_TEAM = 7UL3LRJL93; 431 | ENABLE_BITCODE = NO; 432 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 433 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 434 | GCC_PREFIX_HEADER = "GSDemo/GSDemo-pch.pch"; 435 | INFOPLIST_FILE = GSDemo/Info.plist; 436 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 438 | PRODUCT_BUNDLE_IDENTIFIER = com.dji.GSDemo1; 439 | PRODUCT_NAME = "$(TARGET_NAME)"; 440 | VALID_ARCHS = "arm64 arm64e armv7s"; 441 | }; 442 | name = Debug; 443 | }; 444 | A4E86B971B4A374300F204DA /* Release */ = { 445 | isa = XCBuildConfiguration; 446 | baseConfigurationReference = 5B0CAE4A21C1AEFA08AF5AD5 /* Pods-GSDemo.release.xcconfig */; 447 | buildSettings = { 448 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 449 | CODE_SIGN_ENTITLEMENTS = GSDemo/GSDemo.entitlements; 450 | DEVELOPMENT_TEAM = 7UL3LRJL93; 451 | ENABLE_BITCODE = NO; 452 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 453 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 454 | GCC_PREFIX_HEADER = "GSDemo/GSDemo-pch.pch"; 455 | INFOPLIST_FILE = GSDemo/Info.plist; 456 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 457 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 458 | PRODUCT_BUNDLE_IDENTIFIER = com.dji.GSDemo1; 459 | PRODUCT_NAME = "$(TARGET_NAME)"; 460 | VALID_ARCHS = "arm64 arm64e armv7s"; 461 | }; 462 | name = Release; 463 | }; 464 | /* End XCBuildConfiguration section */ 465 | 466 | /* Begin XCConfigurationList section */ 467 | A4E86B6D1B4A374300F204DA /* Build configuration list for PBXProject "GSDemo" */ = { 468 | isa = XCConfigurationList; 469 | buildConfigurations = ( 470 | A4E86B931B4A374300F204DA /* Debug */, 471 | A4E86B941B4A374300F204DA /* Release */, 472 | ); 473 | defaultConfigurationIsVisible = 0; 474 | defaultConfigurationName = Release; 475 | }; 476 | A4E86B951B4A374300F204DA /* Build configuration list for PBXNativeTarget "GSDemo" */ = { 477 | isa = XCConfigurationList; 478 | buildConfigurations = ( 479 | A4E86B961B4A374300F204DA /* Debug */, 480 | A4E86B971B4A374300F204DA /* Release */, 481 | ); 482 | defaultConfigurationIsVisible = 0; 483 | defaultConfigurationName = Release; 484 | }; 485 | /* End XCConfigurationList section */ 486 | }; 487 | rootObject = A4E86B6A1B4A374300F204DA /* Project object */; 488 | } 489 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.xcworkspace/xcshareddata/GSDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 92D76091-C7C6-4DDD-AD58-9CB4FDF3B3E8 9 | IDESourceControlProjectName 10 | project 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 1C27C03A972FDE043626CF8F280C89E97069D293 14 | github.com:DJI-Mobile-SDK/iOS-GSDemo.git 15 | 16 | IDESourceControlProjectPath 17 | GSDemo.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 1C27C03A972FDE043626CF8F280C89E97069D293 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:DJI-Mobile-SDK/iOS-GSDemo.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 1C27C03A972FDE043626CF8F280C89E97069D293 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 1C27C03A972FDE043626CF8F280C89E97069D293 36 | IDESourceControlWCCName 37 | iOS-GSDemo 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.xcworkspace/xcshareddata/GSDemo.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "1C27C03A972FDE043626CF8F280C89E97069D293", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "1C27C03A972FDE043626CF8F280C89E97069D293" : 0, 8 | "F242303504B8CDD3CE213C5B3FFB052B596793AF" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "92D76091-C7C6-4DDD-AD58-9CB4FDF3B3E8", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "1C27C03A972FDE043626CF8F280C89E97069D293" : "iOS-GSDemo\/", 13 | "F242303504B8CDD3CE213C5B3FFB052B596793AF" : "" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "GSDemo", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "GSDemo.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:DJI-Mobile-SDK\/iOS-GSDemo.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1C27C03A972FDE043626CF8F280C89E97069D293" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/oliver.ou@us003.fly-access.com\/scm\/msdk\/documentation.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "F242303504B8CDD3CE213C5B3FFB052B596793AF" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.xcworkspace/xcuserdata/DJI.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/iOS-GSDemo/2e0c422391d8193615404c53ebce038bd268912d/GSDemo.xcodeproj/project.xcworkspace/xcuserdata/DJI.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.xcworkspace/xcuserdata/ares.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/iOS-GSDemo/2e0c422391d8193615404c53ebce038bd268912d/GSDemo.xcodeproj/project.xcworkspace/xcuserdata/ares.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /GSDemo.xcodeproj/project.xcworkspace/xcuserdata/zlinoliver.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/iOS-GSDemo/2e0c422391d8193615404c53ebce038bd268912d/GSDemo.xcodeproj/project.xcworkspace/xcuserdata/zlinoliver.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/DJI.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/DJI.xcuserdatad/xcschemes/GSDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/DJI.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | GSDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | A4E86B711B4A374300F204DA 16 | 17 | primary 18 | 19 | 20 | A4E86B8A1B4A374300F204DA 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/ares.xcuserdatad/xcschemes/GSDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/ares.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | GSDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | A4E86B711B4A374300F204DA 16 | 17 | primary 18 | 19 | 20 | A4E86B8A1B4A374300F204DA 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/zlinoliver.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/zlinoliver.xcuserdatad/xcschemes/GSDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /GSDemo.xcodeproj/xcuserdata/zlinoliver.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | GSDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | A4E86B711B4A374300F204DA 16 | 17 | primary 18 | 19 | 20 | A4E86B8A1B4A374300F204DA 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /GSDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GSDemo 4 | // 5 | // Created by DJI on 6/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /GSDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 6/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 18 | 19 | return YES; 20 | } 21 | 22 | - (void)applicationWillResignActive:(UIApplication *)application { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | - (void)applicationDidEnterBackground:(UIApplication *)application { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | - (void)applicationWillEnterForeground:(UIApplication *)application { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | - (void)applicationWillTerminate:(UIApplication *)application { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /GSDemo/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /GSDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 | 47 | 54 | 61 | 68 | 75 | 82 | 89 | 96 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /GSDemo/DJIAircraftAnnotation.h: -------------------------------------------------------------------------------- 1 | // 2 | // DJIAircraftAnnotation.h 3 | // DJISdkDemo 4 | // 5 | // Created by Ares on 15/4/27. 6 | // Copyright (c) 2015年 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "DJIAircraftAnnotationView.h" 11 | 12 | @interface DJIAircraftAnnotation : NSObject 13 | 14 | @property(nonatomic, readonly) CLLocationCoordinate2D coordinate; 15 | @property(nonatomic, weak) DJIAircraftAnnotationView* annotationView; 16 | 17 | -(id) initWithCoordiante:(CLLocationCoordinate2D)coordinate; 18 | 19 | - (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate; 20 | 21 | -(void) updateHeading:(float)heading; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /GSDemo/DJIAircraftAnnotation.m: -------------------------------------------------------------------------------- 1 | // 2 | // DJIAircraftAnnotation.m 3 | // DJISdkDemo 4 | // 5 | // Created by Ares on 15/4/27. 6 | // Copyright (c) 2015年 DJI. All rights reserved. 7 | // 8 | 9 | #import "DJIAircraftAnnotation.h" 10 | 11 | @implementation DJIAircraftAnnotation 12 | 13 | -(id) initWithCoordiante:(CLLocationCoordinate2D)coordinate 14 | { 15 | self = [super init]; 16 | if (self) { 17 | _coordinate = coordinate; 18 | } 19 | 20 | return self; 21 | } 22 | 23 | - (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate 24 | { 25 | _coordinate = newCoordinate; 26 | } 27 | 28 | -(void) updateHeading:(float)heading 29 | { 30 | if (self.annotationView) { 31 | [self.annotationView updateHeading:heading]; 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /GSDemo/DJIAircraftAnnotationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DJIAircraftAnnotationView.h 3 | // DJISdkDemo 4 | // 5 | // Created by Ares on 15/4/27. 6 | // Copyright (c) 2015年 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DJIAircraftAnnotationView : MKAnnotationView 12 | 13 | -(void) updateHeading:(float)heading; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /GSDemo/DJIAircraftAnnotationView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DJIAircraftAnnotationView.m 3 | // DJISdkDemo 4 | // 5 | // Created by Ares on 15/4/27. 6 | // Copyright (c) 2015年 DJI. All rights reserved. 7 | // 8 | 9 | #import "DJIAircraftAnnotationView.h" 10 | 11 | @implementation DJIAircraftAnnotationView 12 | 13 | - (instancetype)initWithAnnotation:(id )annotation reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | self = [super initWithAnnotation:annotation reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | self.enabled = NO; 18 | self.draggable = NO; 19 | self.image = [UIImage imageNamed:@"aircraft.png"]; 20 | } 21 | 22 | return self; 23 | } 24 | 25 | -(void) updateHeading:(float)heading 26 | { 27 | self.transform = CGAffineTransformIdentity; 28 | self.transform = CGAffineTransformMakeRotation(heading); 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /GSDemo/DJIGSButtonViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DJIGSButtonViewController.h 3 | // GSDemo 4 | // 5 | // Created by DJI on 10/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger, DJIGSViewMode) { 12 | DJIGSViewMode_ViewMode, 13 | DJIGSViewMode_EditMode, 14 | }; 15 | 16 | @class DJIGSButtonViewController; 17 | 18 | @protocol DJIGSButtonViewControllerDelegate 19 | 20 | - (void)stopBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 21 | - (void)clearBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 22 | - (void)focusMapBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 23 | - (void)startBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 24 | - (void)addBtn:(UIButton *)button withActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 25 | - (void)configBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 26 | - (void)switchToMode:(DJIGSViewMode)mode inGSButtonVC:(DJIGSButtonViewController *)GSBtnVC; 27 | 28 | @end 29 | 30 | @interface DJIGSButtonViewController : UIViewController 31 | 32 | @property (weak, nonatomic) IBOutlet UIButton *backBtn; 33 | @property (weak, nonatomic) IBOutlet UIButton *stopBtn; 34 | @property (weak, nonatomic) IBOutlet UIButton *clearBtn; 35 | @property (weak, nonatomic) IBOutlet UIButton *focusMapBtn; 36 | @property (weak, nonatomic) IBOutlet UIButton *editBtn; 37 | @property (weak, nonatomic) IBOutlet UIButton *startBtn; 38 | @property (weak, nonatomic) IBOutlet UIButton *addBtn; 39 | @property (weak, nonatomic) IBOutlet UIButton *configBtn; 40 | 41 | @property (assign, nonatomic) DJIGSViewMode mode; 42 | @property (weak, nonatomic) id delegate; 43 | 44 | - (IBAction)backBtnAction:(id)sender; 45 | - (IBAction)stopBtnAction:(id)sender; 46 | - (IBAction)clearBtnAction:(id)sender; 47 | - (IBAction)focusMapBtnAction:(id)sender; 48 | - (IBAction)editBtnAction:(id)sender; 49 | - (IBAction)startBtnAction:(id)sender; 50 | - (IBAction)addBtnAction:(id)sender; 51 | - (IBAction)configBtnAction:(id)sender; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /GSDemo/DJIGSButtonViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DJIGSButtonViewController.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 10/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import "DJIGSButtonViewController.h" 10 | 11 | @implementation DJIGSButtonViewController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | [self setMode:DJIGSViewMode_ViewMode]; 17 | 18 | } 19 | 20 | - (void)didReceiveMemoryWarning { 21 | [super didReceiveMemoryWarning]; 22 | // Dispose of any resources that can be recreated. 23 | } 24 | 25 | #pragma mark - Property Method 26 | 27 | - (void)setMode:(DJIGSViewMode)mode 28 | { 29 | 30 | _mode = mode; 31 | [_editBtn setHidden:(mode == DJIGSViewMode_EditMode)]; 32 | [_focusMapBtn setHidden:(mode == DJIGSViewMode_EditMode)]; 33 | [_backBtn setHidden:(mode == DJIGSViewMode_ViewMode)]; 34 | [_clearBtn setHidden:(mode == DJIGSViewMode_ViewMode)]; 35 | [_startBtn setHidden:(mode == DJIGSViewMode_ViewMode)]; 36 | [_stopBtn setHidden:(mode == DJIGSViewMode_ViewMode)]; 37 | [_addBtn setHidden:(mode == DJIGSViewMode_ViewMode)]; 38 | [_configBtn setHidden:(mode == DJIGSViewMode_ViewMode)]; 39 | } 40 | 41 | #pragma mark - IBAction Methods 42 | 43 | - (IBAction)backBtnAction:(id)sender { 44 | [self setMode:DJIGSViewMode_ViewMode]; 45 | if ([_delegate respondsToSelector:@selector(switchToMode:inGSButtonVC:)]) { 46 | [_delegate switchToMode:self.mode inGSButtonVC:self]; 47 | } 48 | } 49 | 50 | - (IBAction)stopBtnAction:(id)sender { 51 | 52 | if ([_delegate respondsToSelector:@selector(stopBtnActionInGSButtonVC:)]) { 53 | [_delegate stopBtnActionInGSButtonVC:self]; 54 | } 55 | 56 | } 57 | 58 | - (IBAction)clearBtnAction:(id)sender { 59 | 60 | if ([_delegate respondsToSelector:@selector(clearBtnActionInGSButtonVC:)]) { 61 | [_delegate clearBtnActionInGSButtonVC:self]; 62 | } 63 | 64 | } 65 | 66 | - (IBAction)focusMapBtnAction:(id)sender { 67 | 68 | if ([_delegate respondsToSelector:@selector(focusMapBtnActionInGSButtonVC:)]) { 69 | [_delegate focusMapBtnActionInGSButtonVC:self]; 70 | } 71 | } 72 | 73 | - (IBAction)editBtnAction:(id)sender { 74 | 75 | [self setMode:DJIGSViewMode_EditMode]; 76 | if ([_delegate respondsToSelector:@selector(switchToMode:inGSButtonVC:)]) { 77 | [_delegate switchToMode:self.mode inGSButtonVC:self]; 78 | } 79 | 80 | } 81 | 82 | - (IBAction)startBtnAction:(id)sender { 83 | 84 | if ([_delegate respondsToSelector:@selector(startBtnActionInGSButtonVC:)]) { 85 | [_delegate startBtnActionInGSButtonVC:self]; 86 | } 87 | } 88 | 89 | - (IBAction)addBtnAction:(id)sender { 90 | 91 | if ([_delegate respondsToSelector:@selector(addBtn:withActionInGSButtonVC:)]) { 92 | [_delegate addBtn:self.addBtn withActionInGSButtonVC:self]; 93 | } 94 | 95 | } 96 | 97 | - (IBAction)configBtnAction:(id)sender { 98 | 99 | if ([_delegate respondsToSelector:@selector(configBtnActionInGSButtonVC:)]) { 100 | [_delegate configBtnActionInGSButtonVC:self]; 101 | } 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /GSDemo/DJIGSButtonViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /GSDemo/DJIMapController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DJIMapViewController.h 3 | // GSDemo 4 | // 5 | // Created by DJI on 7/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "DJIAircraftAnnotation.h" 12 | 13 | @interface DJIMapController : NSObject 14 | 15 | @property (strong, nonatomic) NSMutableArray *editPoints; 16 | @property (nonatomic, strong) DJIAircraftAnnotation* aircraftAnnotation; 17 | 18 | /** 19 | * Add Waypoints in Map View 20 | */ 21 | - (void)addPoint:(CGPoint)point withMapView:(MKMapView *)mapView; 22 | 23 | /** 24 | * Clean All Waypoints in Map View 25 | */ 26 | - (void)cleanAllPointsWithMapView:(MKMapView *)mapView; 27 | 28 | /** 29 | * Update Aircraft's location in Map View 30 | */ 31 | -(void)updateAircraftLocation:(CLLocationCoordinate2D)location withMapView:(MKMapView *)mapView; 32 | 33 | /** 34 | * Update Aircraft's heading in Map View 35 | */ 36 | -(void)updateAircraftHeading:(float)heading; 37 | 38 | /** 39 | * Current Edit Points 40 | * 41 | * @return Return an NSArray contains multiple CCLocation objects 42 | */ 43 | - (NSArray *)wayPoints; 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /GSDemo/DJIMapController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DJIMapController.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 7/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import "DJIMapController.h" 10 | 11 | @interface DJIMapController () 12 | 13 | @end 14 | 15 | @implementation DJIMapController 16 | 17 | - (instancetype)init 18 | { 19 | if (self = [super init]) { 20 | 21 | self.editPoints = [[NSMutableArray alloc] init]; 22 | 23 | } 24 | 25 | return self; 26 | } 27 | 28 | - (void)addPoint:(CGPoint)point withMapView:(MKMapView *)mapView 29 | { 30 | 31 | CLLocationCoordinate2D coordinate = [mapView convertPoint:point toCoordinateFromView:mapView]; 32 | CLLocation *location = [[CLLocation alloc] initWithLatitude:coordinate.latitude longitude:coordinate.longitude]; 33 | [_editPoints addObject:location]; 34 | MKPointAnnotation* annotation = [[MKPointAnnotation alloc] init]; 35 | annotation.coordinate = location.coordinate; 36 | [mapView addAnnotation:annotation]; 37 | 38 | } 39 | 40 | - (void)cleanAllPointsWithMapView:(MKMapView *)mapView 41 | { 42 | [_editPoints removeAllObjects]; 43 | NSArray* annos = [NSArray arrayWithArray:mapView.annotations]; 44 | for (int i = 0; i < annos.count; i++) { 45 | id ann = [annos objectAtIndex:i]; 46 | 47 | if (![ann isEqual:self.aircraftAnnotation]) { //Add it to check if the annotation is the aircraft's and prevent it from removing 48 | [mapView removeAnnotation:ann]; 49 | } 50 | 51 | } 52 | } 53 | 54 | - (NSArray *)wayPoints 55 | { 56 | return self.editPoints; 57 | } 58 | 59 | -(void)updateAircraftLocation:(CLLocationCoordinate2D)location withMapView:(MKMapView *)mapView 60 | { 61 | if (self.aircraftAnnotation == nil) { 62 | self.aircraftAnnotation = [[DJIAircraftAnnotation alloc] initWithCoordiante:location]; 63 | [mapView addAnnotation:self.aircraftAnnotation]; 64 | } 65 | 66 | [self.aircraftAnnotation setCoordinate:location]; 67 | } 68 | 69 | -(void)updateAircraftHeading:(float)heading 70 | { 71 | if (self.aircraftAnnotation) { 72 | [self.aircraftAnnotation updateHeading:heading]; 73 | } 74 | } 75 | 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /GSDemo/DJIRootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DJIRootViewController.h 3 | // GSDemo 4 | // 5 | // Created by DJI on 7/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DJIRootViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GSDemo/DJIRootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DJIRootViewController.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 7/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import "DJIRootViewController.h" 10 | #import 11 | #import 12 | #import 13 | #import "DJIMapController.h" 14 | #import "DJIGSButtonViewController.h" 15 | #import "DJIWaypointConfigViewController.h" 16 | #import "DemoUtility.h" 17 | 18 | #define ENTER_DEBUG_MODE 0 19 | 20 | @interface DJIRootViewController () 21 | 22 | @property (nonatomic, assign) BOOL isEditingPoints; 23 | @property (nonatomic, strong) DJIGSButtonViewController *gsButtonVC; 24 | @property (nonatomic, strong) DJIWaypointConfigViewController *waypointConfigVC; 25 | @property (nonatomic, strong) DJIMapController *mapController; 26 | 27 | @property(nonatomic, strong) CLLocationManager* locationManager; 28 | @property(nonatomic, assign) CLLocationCoordinate2D userLocation; 29 | @property(nonatomic, assign) CLLocationCoordinate2D droneLocation; 30 | @property (nonatomic, strong) UITapGestureRecognizer *tapGesture; 31 | 32 | @property (weak, nonatomic) IBOutlet MKMapView *mapView; 33 | @property (weak, nonatomic) IBOutlet UIView *topBarView; 34 | @property(nonatomic, strong) IBOutlet UILabel* modeLabel; 35 | @property(nonatomic, strong) IBOutlet UILabel* gpsLabel; 36 | @property(nonatomic, strong) IBOutlet UILabel* hsLabel; 37 | @property(nonatomic, strong) IBOutlet UILabel* vsLabel; 38 | @property(nonatomic, strong) IBOutlet UILabel* altitudeLabel; 39 | 40 | @property(nonatomic, strong) DJIMutableWaypointMission* waypointMission; 41 | @end 42 | 43 | @implementation DJIRootViewController 44 | 45 | - (void)viewWillAppear:(BOOL)animated 46 | { 47 | [super viewWillAppear:animated]; 48 | [self startUpdateLocation]; 49 | } 50 | 51 | - (void)viewWillDisappear:(BOOL)animated 52 | { 53 | [super viewWillDisappear:animated]; 54 | [self.locationManager stopUpdatingLocation]; 55 | } 56 | 57 | - (void)viewDidLoad { 58 | [super viewDidLoad]; 59 | 60 | [self registerApp]; 61 | 62 | [self initUI]; 63 | [self initData]; 64 | } 65 | 66 | - (void)didReceiveMemoryWarning { 67 | [super didReceiveMemoryWarning]; 68 | // Dispose of any resources that can be recreated. 69 | } 70 | 71 | - (BOOL)prefersStatusBarHidden { 72 | return NO; 73 | } 74 | 75 | #pragma mark Init Methods 76 | -(void)initData 77 | { 78 | self.userLocation = kCLLocationCoordinate2DInvalid; 79 | self.droneLocation = kCLLocationCoordinate2DInvalid; 80 | 81 | self.mapController = [[DJIMapController alloc] init]; 82 | self.tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(addWaypoints:)]; 83 | [self.mapView addGestureRecognizer:self.tapGesture]; 84 | } 85 | 86 | -(void) initUI 87 | { 88 | self.modeLabel.text = @"N/A"; 89 | self.gpsLabel.text = @"0"; 90 | self.vsLabel.text = @"0.0 M/S"; 91 | self.hsLabel.text = @"0.0 M/S"; 92 | self.altitudeLabel.text = @"0 M"; 93 | 94 | self.gsButtonVC = [[DJIGSButtonViewController alloc] initWithNibName:@"DJIGSButtonViewController" bundle:[NSBundle mainBundle]]; 95 | [self.gsButtonVC.view setFrame:CGRectMake(0, self.topBarView.frame.origin.y + self.topBarView.frame.size.height, self.gsButtonVC.view.frame.size.width, self.gsButtonVC.view.frame.size.height)]; 96 | self.gsButtonVC.delegate = self; 97 | [self.view addSubview:self.gsButtonVC.view]; 98 | 99 | self.waypointConfigVC = [[DJIWaypointConfigViewController alloc] initWithNibName:@"DJIWaypointConfigViewController" bundle:[NSBundle mainBundle]]; 100 | self.waypointConfigVC.view.alpha = 0; 101 | self.waypointConfigVC.view.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin; 102 | 103 | [self.waypointConfigVC.view setCenter:self.view.center]; 104 | 105 | if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) //Check if it's using iPad and center the config view 106 | { 107 | self.waypointConfigVC.view.center = self.view.center; 108 | } 109 | 110 | self.waypointConfigVC.delegate = self; 111 | [self.view addSubview:self.waypointConfigVC.view]; 112 | } 113 | 114 | -(void) registerApp 115 | { 116 | //Please enter your App key in the info.plist file to register the app. 117 | [DJISDKManager registerAppWithDelegate:self]; 118 | } 119 | 120 | #pragma mark DJISDKManagerDelegate Methods 121 | - (void)appRegisteredWithError:(NSError *)error 122 | { 123 | if (error){ 124 | NSString *registerResult = [NSString stringWithFormat:@"Registration Error:%@", error.description]; 125 | ShowMessage(@"Registration Result", registerResult, nil, @"OK"); 126 | } 127 | else{ 128 | #if ENTER_DEBUG_MODE 129 | [DJISDKManager enableBridgeModeWithBridgeAppIP:@"Please Enter Your Debug ID"]; 130 | #else 131 | [DJISDKManager startConnectionToProduct]; 132 | #endif 133 | } 134 | } 135 | 136 | - (void)productConnected:(DJIBaseProduct *)product 137 | { 138 | if (product){ 139 | DJIFlightController* flightController = [DemoUtility fetchFlightController]; 140 | if (flightController) { 141 | flightController.delegate = self; 142 | } 143 | }else{ 144 | ShowMessage(@"Product disconnected", nil, nil, @"OK"); 145 | } 146 | 147 | //If this demo is used in China, it's required to login to your DJI account to activate the application. Also you need to use DJI Go app to bind the aircraft to your DJI account. For more details, please check this demo's tutorial. 148 | [[DJISDKManager userAccountManager] logIntoDJIUserAccountWithAuthorizationRequired:NO withCompletion:^(DJIUserAccountState state, NSError * _Nullable error) { 149 | if (error) { 150 | NSLog(@"Login failed: %@", error.description); 151 | } 152 | }]; 153 | 154 | } 155 | 156 | #pragma mark action Methods 157 | 158 | -(DJIWaypointMissionOperator *)missionOperator { 159 | return [DJISDKManager missionControl].waypointMissionOperator; 160 | } 161 | 162 | - (void)focusMap 163 | { 164 | if (CLLocationCoordinate2DIsValid(self.droneLocation)) { 165 | MKCoordinateRegion region = {0}; 166 | region.center = self.droneLocation; 167 | region.span.latitudeDelta = 0.001; 168 | region.span.longitudeDelta = 0.001; 169 | 170 | [self.mapView setRegion:region animated:YES]; 171 | } 172 | } 173 | 174 | #pragma mark CLLocation Methods 175 | -(void) startUpdateLocation 176 | { 177 | if ([CLLocationManager locationServicesEnabled]) { 178 | if (self.locationManager == nil) { 179 | self.locationManager = [[CLLocationManager alloc] init]; 180 | self.locationManager.delegate = self; 181 | self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; 182 | self.locationManager.distanceFilter = 0.1; 183 | if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) { 184 | [self.locationManager requestAlwaysAuthorization]; 185 | } 186 | [self.locationManager startUpdatingLocation]; 187 | } 188 | }else 189 | { 190 | ShowMessage(@"Location Service is not available", @"", nil, @"OK"); 191 | } 192 | } 193 | 194 | #pragma mark UITapGestureRecognizer Methods 195 | - (void)addWaypoints:(UITapGestureRecognizer *)tapGesture 196 | { 197 | CGPoint point = [tapGesture locationInView:self.mapView]; 198 | 199 | if(tapGesture.state == UIGestureRecognizerStateEnded){ 200 | if (self.isEditingPoints) 201 | [self.mapController addPoint:point withMapView:self.mapView]; 202 | } 203 | } 204 | 205 | #pragma mark - DJIWaypointConfigViewControllerDelegate Methods 206 | 207 | - (void)cancelBtnActionInDJIWaypointConfigViewController:(DJIWaypointConfigViewController *)waypointConfigVC 208 | { 209 | WeakRef(weakSelf); 210 | 211 | [UIView animateWithDuration:0.25 animations:^{ 212 | WeakReturn(weakSelf); 213 | weakSelf.waypointConfigVC.view.alpha = 0; 214 | }]; 215 | 216 | } 217 | 218 | - (void)showAlertViewWithTitle:(NSString *)title withMessage:(NSString *)message 219 | { 220 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; 221 | UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; 222 | [alert addAction:okAction]; 223 | [self presentViewController:alert animated:YES completion:nil]; 224 | } 225 | 226 | - (void)finishBtnActionInDJIWaypointConfigViewController:(DJIWaypointConfigViewController *)waypointConfigVC 227 | { 228 | WeakRef(weakSelf); 229 | 230 | [UIView animateWithDuration:0.25 animations:^{ 231 | WeakReturn(weakSelf); 232 | weakSelf.waypointConfigVC.view.alpha = 0; 233 | }]; 234 | 235 | for (int i = 0; i < self.waypointMission.waypointCount; i++) { 236 | DJIWaypoint* waypoint = [self.waypointMission waypointAtIndex:i]; 237 | waypoint.altitude = [self.waypointConfigVC.altitudeTextField.text floatValue]; 238 | } 239 | 240 | self.waypointMission.maxFlightSpeed = [self.waypointConfigVC.maxFlightSpeedTextField.text floatValue]; 241 | self.waypointMission.autoFlightSpeed = [self.waypointConfigVC.autoFlightSpeedTextField.text floatValue]; 242 | self.waypointMission.headingMode = (DJIWaypointMissionHeadingMode)self.waypointConfigVC.headingSegmentedControl.selectedSegmentIndex; 243 | [self.waypointMission setFinishedAction:(DJIWaypointMissionFinishedAction)self.waypointConfigVC.actionSegmentedControl.selectedSegmentIndex]; 244 | 245 | [[self missionOperator] loadMission:self.waypointMission]; 246 | 247 | WeakRef(target); 248 | 249 | [[self missionOperator] addListenerToFinished:self withQueue:dispatch_get_main_queue() andBlock:^(NSError * _Nullable error) { 250 | 251 | WeakReturn(target); 252 | 253 | if (error) { 254 | [target showAlertViewWithTitle:@"Mission Execution Failed" withMessage:[NSString stringWithFormat:@"%@", error.description]]; 255 | } 256 | else { 257 | [target showAlertViewWithTitle:@"Mission Execution Finished" withMessage:nil]; 258 | } 259 | }]; 260 | 261 | [[self missionOperator] uploadMissionWithCompletion:^(NSError * _Nullable error) { 262 | if (error){ 263 | NSString* uploadError = [NSString stringWithFormat:@"Upload Mission failed:%@", error.description]; 264 | ShowMessage(@"", uploadError, nil, @"OK"); 265 | }else { 266 | ShowMessage(@"", @"Upload Mission Finished", nil, @"OK"); 267 | } 268 | }]; 269 | 270 | } 271 | 272 | #pragma mark - DJIGSButtonViewController Delegate Methods 273 | 274 | - (void)stopBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 275 | { 276 | [[self missionOperator] stopMissionWithCompletion:^(NSError * _Nullable error) { 277 | if (error){ 278 | NSString* failedMessage = [NSString stringWithFormat:@"Stop Mission Failed: %@", error.description]; 279 | ShowMessage(@"", failedMessage, nil, @"OK"); 280 | }else 281 | { 282 | ShowMessage(@"", @"Stop Mission Finished", nil, @"OK"); 283 | } 284 | 285 | }]; 286 | 287 | } 288 | 289 | - (void)clearBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 290 | { 291 | [self.mapController cleanAllPointsWithMapView:self.mapView]; 292 | } 293 | 294 | - (void)focusMapBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 295 | { 296 | [self focusMap]; 297 | } 298 | 299 | - (void)configBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 300 | { 301 | WeakRef(weakSelf); 302 | 303 | NSArray* wayPoints = self.mapController.wayPoints; 304 | if (wayPoints == nil || wayPoints.count < 2) { //DJIWaypointMissionMinimumWaypointCount is 2. 305 | ShowMessage(@"No or not enough waypoints for mission", @"", nil, @"OK"); 306 | return; 307 | } 308 | 309 | [UIView animateWithDuration:0.25 animations:^{ 310 | WeakReturn(weakSelf); 311 | weakSelf.waypointConfigVC.view.alpha = 1.0; 312 | }]; 313 | 314 | if (self.waypointMission){ 315 | [self.waypointMission removeAllWaypoints]; 316 | } 317 | else{ 318 | self.waypointMission = [[DJIMutableWaypointMission alloc] init]; 319 | } 320 | 321 | for (int i = 0; i < wayPoints.count; i++) { 322 | CLLocation* location = [wayPoints objectAtIndex:i]; 323 | if (CLLocationCoordinate2DIsValid(location.coordinate)) { 324 | DJIWaypoint* waypoint = [[DJIWaypoint alloc] initWithCoordinate:location.coordinate]; 325 | [self.waypointMission addWaypoint:waypoint]; 326 | } 327 | } 328 | 329 | } 330 | 331 | - (void)startBtnActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 332 | { 333 | [[self missionOperator] startMissionWithCompletion:^(NSError * _Nullable error) { 334 | if (error){ 335 | ShowMessage(@"Start Mission Failed", error.description, nil, @"OK"); 336 | }else 337 | { 338 | ShowMessage(@"", @"Mission Started", nil, @"OK"); 339 | } 340 | }]; 341 | 342 | } 343 | 344 | - (void)switchToMode:(DJIGSViewMode)mode inGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 345 | { 346 | if (mode == DJIGSViewMode_EditMode) { 347 | [self focusMap]; 348 | } 349 | 350 | } 351 | 352 | - (void)addBtn:(UIButton *)button withActionInGSButtonVC:(DJIGSButtonViewController *)GSBtnVC 353 | { 354 | if (self.isEditingPoints) { 355 | self.isEditingPoints = NO; 356 | [button setTitle:@"Add" forState:UIControlStateNormal]; 357 | }else 358 | { 359 | self.isEditingPoints = YES; 360 | [button setTitle:@"Finished" forState:UIControlStateNormal]; 361 | } 362 | } 363 | 364 | #pragma mark - CLLocationManagerDelegate 365 | - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations 366 | { 367 | CLLocation* location = [locations lastObject]; 368 | self.userLocation = location.coordinate; 369 | } 370 | 371 | #pragma mark MKMapViewDelegate Method 372 | - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation 373 | { 374 | if ([annotation isKindOfClass:[MKPointAnnotation class]]) { 375 | MKPinAnnotationView* pinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"Pin_Annotation"]; 376 | pinView.pinTintColor = [UIColor purpleColor]; 377 | return pinView; 378 | 379 | }else if ([annotation isKindOfClass:[DJIAircraftAnnotation class]]) 380 | { 381 | DJIAircraftAnnotationView* annoView = [[DJIAircraftAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"Aircraft_Annotation"]; 382 | ((DJIAircraftAnnotation*)annotation).annotationView = annoView; 383 | return annoView; 384 | } 385 | 386 | return nil; 387 | } 388 | 389 | #pragma mark DJIFlightControllerDelegate 390 | 391 | - (void)flightController:(DJIFlightController *)fc didUpdateState:(DJIFlightControllerState *)state 392 | { 393 | self.droneLocation = state.aircraftLocation.coordinate; 394 | self.modeLabel.text = state.flightModeString; 395 | self.gpsLabel.text = [NSString stringWithFormat:@"%lu", (unsigned long)state.satelliteCount]; 396 | self.vsLabel.text = [NSString stringWithFormat:@"%0.1f M/S",state.velocityZ]; 397 | self.hsLabel.text = [NSString stringWithFormat:@"%0.1f M/S",(sqrtf(state.velocityX*state.velocityX + state.velocityY*state.velocityY))]; 398 | self.altitudeLabel.text = [NSString stringWithFormat:@"%0.1f M",state.altitude]; 399 | 400 | [self.mapController updateAircraftLocation:self.droneLocation withMapView:self.mapView]; 401 | double radianYaw = RADIAN(state.attitude.yaw); 402 | [self.mapController updateAircraftHeading:radianYaw]; 403 | } 404 | 405 | 406 | @end 407 | -------------------------------------------------------------------------------- /GSDemo/DJIWaypointConfigViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DJIWaypointConfigViewController.h 3 | // GSDemo 4 | // 5 | // Created by DJI on 12/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DJIWaypointConfigViewController; 12 | 13 | @protocol DJIWaypointConfigViewControllerDelegate 14 | 15 | - (void)cancelBtnActionInDJIWaypointConfigViewController:(DJIWaypointConfigViewController *)waypointConfigVC; 16 | - (void)finishBtnActionInDJIWaypointConfigViewController:(DJIWaypointConfigViewController *)waypointConfigVC; 17 | 18 | @end 19 | 20 | @interface DJIWaypointConfigViewController : UIViewController 21 | 22 | @property (weak, nonatomic) IBOutlet UITextField *altitudeTextField; 23 | @property (weak, nonatomic) IBOutlet UITextField *autoFlightSpeedTextField; 24 | @property (weak, nonatomic) IBOutlet UITextField *maxFlightSpeedTextField; 25 | @property (weak, nonatomic) IBOutlet UISegmentedControl *actionSegmentedControl; 26 | @property (weak, nonatomic) IBOutlet UISegmentedControl *headingSegmentedControl; 27 | 28 | @property (weak, nonatomic) id delegate; 29 | 30 | - (IBAction)cancelBtnAction:(id)sender; 31 | - (IBAction)finishBtnAction:(id)sender; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /GSDemo/DJIWaypointConfigViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DJIWaypointConfigViewController.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 12/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import "DJIWaypointConfigViewController.h" 10 | 11 | @interface DJIWaypointConfigViewController () 12 | 13 | @end 14 | 15 | @implementation DJIWaypointConfigViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | [self initUI]; 21 | 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (void)initUI 30 | { 31 | self.altitudeTextField.text = @"20"; //Set the altitude to 20 32 | self.autoFlightSpeedTextField.text = @"8"; //Set the autoFlightSpeed to 8 33 | self.maxFlightSpeedTextField.text = @"10"; //Set the maxFlightSpeed to 10 34 | [self.actionSegmentedControl setSelectedSegmentIndex:1]; //Set the finishAction to DJIWaypointMissionFinishedGoHome 35 | [self.headingSegmentedControl setSelectedSegmentIndex:0]; //Set the headingMode to DJIWaypointMissionHeadingAuto 36 | 37 | } 38 | 39 | - (IBAction)cancelBtnAction:(id)sender { 40 | 41 | if ([_delegate respondsToSelector:@selector(cancelBtnActionInDJIWaypointConfigViewController:)]) { 42 | [_delegate cancelBtnActionInDJIWaypointConfigViewController:self]; 43 | } 44 | } 45 | 46 | - (IBAction)finishBtnAction:(id)sender { 47 | 48 | if ([_delegate respondsToSelector:@selector(finishBtnActionInDJIWaypointConfigViewController:)]) { 49 | [_delegate finishBtnActionInDJIWaypointConfigViewController:self]; 50 | } 51 | 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /GSDemo/DJIWaypointConfigViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 41 | 55 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /GSDemo/DemoUtility/DemoUtility.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoUtility.h 3 | // DJISdkDemo 4 | // 5 | // Copyright © 2015 DJI. All rights reserved. 6 | // 7 | 8 | #ifndef DemoUtility_h 9 | #define DemoUtility_h 10 | 11 | #define WeakRef(__obj) __weak typeof(self) __obj = self 12 | #define WeakReturn(__obj) if(__obj ==nil)return; 13 | 14 | #define DEGREE(x) ((x)*180.0/M_PI) 15 | #define RADIAN(x) ((x)*M_PI/180.0) 16 | 17 | #endif 18 | 19 | extern void ShowMessage(NSString *title, NSString *message, id target, NSString *cancleBtnTitle); 20 | 21 | @class DJIFlightController; 22 | 23 | @interface DemoUtility : NSObject 24 | 25 | +(DJIFlightController*) fetchFlightController; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /GSDemo/DemoUtility/DemoUtility.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoUtility.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 3/21/16. 6 | // Copyright © 2016 DJI. All rights reserved. 7 | // 8 | 9 | #import "DemoUtility.h" 10 | #import 11 | 12 | inline void ShowMessage(NSString *title, NSString *message, id target, NSString *cancleBtnTitle) 13 | { 14 | dispatch_async(dispatch_get_main_queue(), ^{ 15 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:target cancelButtonTitle:cancleBtnTitle otherButtonTitles:nil]; 16 | [alert show]; 17 | }); 18 | } 19 | 20 | @implementation DemoUtility 21 | 22 | +(DJIFlightController*) fetchFlightController { 23 | if (![DJISDKManager product]) { 24 | return nil; 25 | } 26 | 27 | if ([[DJISDKManager product] isKindOfClass:[DJIAircraft class]]) { 28 | return ((DJIAircraft*)[DJISDKManager product]).flightController; 29 | } 30 | 31 | return nil; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /GSDemo/GSDemo-pch.pch: -------------------------------------------------------------------------------- 1 | // 2 | // GSDemo-pch.pch 3 | // GSDemo 4 | // 5 | // Created by DJI on 3/17/16. 6 | // Copyright © 2016 DJI. All rights reserved. 7 | // 8 | 9 | #ifndef GSDemo_pch_pch 10 | #define GSDemo_pch_pch 11 | 12 | #ifdef __OBJC__ 13 | #import 14 | #import 15 | #endif 16 | 17 | #endif /* GSDemo_pch_pch */ 18 | -------------------------------------------------------------------------------- /GSDemo/GSDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.default-data-protection 6 | NSFileProtectionComplete 7 | 8 | 9 | -------------------------------------------------------------------------------- /GSDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /GSDemo/Images.xcassets/aircraft.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "aircraft@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /GSDemo/Images.xcassets/aircraft.imageset/aircraft@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/iOS-GSDemo/2e0c422391d8193615404c53ebce038bd268912d/GSDemo/Images.xcassets/aircraft.imageset/aircraft@2x.png -------------------------------------------------------------------------------- /GSDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | DJISDKAppKey 24 | 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | 32 | NSBluetoothAlwaysUsageDescription 33 | use bluetooth 34 | NSLocationAlwaysUsageDescription 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIMainStoryboardFile 41 | Main 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedExternalAccessoryProtocols 47 | 48 | com.dji.video 49 | com.dji.protocol 50 | com.dji.common 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | UISupportedInterfaceOrientations~ipad 58 | 59 | UIInterfaceOrientationPortrait 60 | UIInterfaceOrientationPortraitUpsideDown 61 | UIInterfaceOrientationLandscapeLeft 62 | UIInterfaceOrientationLandscapeRight 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /GSDemo/aircraft@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJI-Mobile-SDK-Tutorials/iOS-GSDemo/2e0c422391d8193615404c53ebce038bd268912d/GSDemo/aircraft@2x.png -------------------------------------------------------------------------------- /GSDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GSDemo 4 | // 5 | // Created by DJI on 6/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /GSDemoTests/GSDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GSDemoTests.m 3 | // GSDemoTests 4 | // 5 | // Created by DJI on 6/7/15. 6 | // Copyright (c) 2015 DJI. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GSDemoTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation GSDemoTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /GSDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.dji.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | Copyright (c) 2018 DJI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | 3 | target 'GSDemo' do 4 | pod 'DJI-SDK-iOS', '~> 4.16.1' 5 | end 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOS-GSDemo 2 | 3 | ## Introduction 4 | 5 | From this demo, you will learn how to implement the DJIWaypoint Mission feature and get familiar with the usages of DJIMissionManager. Also, you will know how to test the Waypoint Mission API with DJI PC Simulator too. 6 | 7 | ## Requirements 8 | 9 | - iOS 9.0+ 10 | - Xcode 8.0+ 11 | - DJI iOS SDK 4.16.1 12 | 13 | ## SDK Installation with CocoaPods 14 | 15 | Since this project has been integrated with [DJI iOS SDK CocoaPods](https://cocoapods.org/pods/DJI-SDK-iOS) now, please check the following steps to install **DJISDK.framework** using CocoaPods after you downloading this project: 16 | 17 | **1.** Install CocoaPods 18 | 19 | Open Terminal and change to the download project's directory, enter the following command to install it: 20 | 21 | ~~~ 22 | sudo gem install cocoapods 23 | ~~~ 24 | 25 | The process may take a long time, please wait. For further installation instructions, please check [this guide](https://guides.cocoapods.org/using/getting-started.html#getting-started). 26 | 27 | **2.** Install SDK with CocoaPods in the Project 28 | 29 | Run the following command in the project's path: 30 | 31 | ~~~ 32 | pod install 33 | ~~~ 34 | 35 | If you install it successfully, you should get the messages similar to the following: 36 | 37 | ~~~ 38 | Analyzing dependencies 39 | Downloading dependencies 40 | Installing DJI-SDK-iOS (4.16.1) 41 | Generating Pods project 42 | Integrating client project 43 | 44 | [!] Please close any current Xcode sessions and use `GSDemo.xcworkspace` for this project from now on. 45 | Pod installation complete! There is 1 dependency from the Podfile and 1 total pod 46 | installed. 47 | ~~~ 48 | 49 | > **Note**: If you saw "Unable to satisfy the following requirements" issue during pod install, please run the following commands to update your pod repo and install the pod again: 50 | > 51 | > ~~~ 52 | > pod repo update 53 | > pod install 54 | > ~~~ 55 | 56 | ## Tutorial 57 | 58 | For this demo's tutorial: **Creating a MapView and Waypoint Application**, please refer to . 59 | 60 | ## Feedback 61 | 62 | We’d love to hear your feedback on this demo and tutorial. 63 | 64 | Please use **DJI Developer Forum** [dji-forum](https://forum.dji.com/forum-139-1.html?from=developer) or **email** [dev@dji.com](dev@dji.com) when you meet any problems of using this demo. At a minimum please let us know: 65 | 66 | * Which DJI Product you are using? 67 | * Which iOS Device and iOS version you are using? 68 | * A short description of your problem includes debugging logs or screenshots. 69 | * Any bugs or typos you come across. 70 | 71 | ## License 72 | 73 | iOS-GSDemo is available under the MIT license. Please see the LICENSE file for more info. 74 | 75 | 76 | ## Join Us 77 | 78 | DJI is looking for all kinds of Software Engineers to continue building the Future of Possible. Available positions in Shenzhen, China and around the world. If you are interested, please send your resume to . For more details, and list of all our global offices, please check . 79 | 80 | DJI 招软件工程师啦,based在深圳,如果你想和我们一起把DJI产品做得更好,请发送简历到 . 详情请浏览 . 81 | --------------------------------------------------------------------------------