Skip to content

Commit 35f2ae6

Browse files
Merge pull request #8 from dji-sdk/dji-sdk/dji_uxsdk_5.0_beta_3
UXSDK 5.0b3 release code
2 parents e987dab + 2eccdf4 commit 35f2ae6

File tree

325 files changed

+11386
-4533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+11386
-4533
lines changed

DJI-UXSDK-iOS-Beta-Communication.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Pod::Spec.new do |s|
22
s.name = 'DJI-UXSDK-iOS-Beta-Communication'
3-
s.version = '0.2'
3+
s.version = '0.3'
44
s.license = 'MIT'
55
s.summary = 'Intra-framework, and system communication infrastructure for DJI iOS UX SDK.'
66
s.homepage = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS'
77
s.authors = { 'DJI' => 'dev@dji.com' }
88
s.documentation_url = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS/wiki'
99
s.ios.deployment_target = '11.0'
10-
s.swift_version = '5.0'
1110
s.requires_arc = true
11+
s.swift_version = '5.0'
1212
s.module_name = 'DJIUXSDKCommunication'
1313
s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load' }
1414
s.source = { :git => 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS.git', :tag => s.version.to_s }

DJI-UXSDK-iOS-Beta-Core.podspec

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
Pod::Spec.new do |s|
22
s.name = 'DJI-UXSDK-iOS-Beta-Core'
3-
s.version = '0.2'
3+
s.version = '0.3'
44
s.license = 'MIT'
55
s.summary = 'Core utilities for DJI iOS UX SDK.'
66
s.homepage = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS'
77
s.authors = { 'DJI' => 'dev@dji.com' }
8-
s.documentation_url = 'https:/github.com//dji-sdk/Mobile-UXSDK-Beta-iOS/wiki'
8+
s.documentation_url = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS/wiki'
99
s.ios.deployment_target = '11.0'
1010
s.requires_arc = true
11+
s.swift_version = '5.0'
1112
s.module_name = 'DJIUXSDKCore'
1213
s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load' }
1314
s.source = { :git => 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS.git', :tag => s.version.to_s }
1415
s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO', 'DEFINES_MODULE' => 'YES'}
1516
s.cocoapods_version = '>= 1.7.1'
1617
s.source_files = 'DJIUXSDKCore/**/*.{h,m,swift}'
17-
s.dependency 'DJI-SDK-iOS', '~> 4.12'
18-
s.dependency 'DJI-UXSDK-iOS-Beta-Communication', '0.2'
18+
s.dependency 'DJI-SDK-iOS', '~> 4.13'
19+
s.dependency 'DJI-UXSDK-iOS-Beta-Communication', '0.3'
1920
end

DJI-UXSDK-iOS-Beta-Widgets.podspec

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
Pod::Spec.new do |s|
22
s.name = 'DJI-UXSDK-iOS-Beta-Widgets'
3-
s.version = '0.2'
3+
s.version = '0.3'
44
s.license = 'MIT'
5-
s.summary = 'A collection of widget, widget model, and related helpers for DJI iOS UX SDK 5.0 Open Source (Beta 2).'
5+
s.summary = 'A collection of widget, widget model, and related helpers for DJI iOS UX SDK.'
66
s.homepage = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS'
77
s.authors = { 'DJI' => 'dev@dji.com' }
88
s.documentation_url = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS/wiki'
99
s.ios.deployment_target = '11.0'
1010
s.requires_arc = true
11+
s.swift_version = '5.0'
1112
s.module_name = 'DJIUXSDKWidgets'
1213
s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load' }
1314
s.source = { :git => 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS.git', :tag => s.version.to_s }
1415
s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO', 'DEFINES_MODULE' => 'YES' }
1516
s.cocoapods_version = '>= 1.7.1'
1617
s.source_files = 'DJIUXSDKWidgets/**/*.{h,m,swift}'
1718
s.resource_bundle = { 'DUXBetaAssets' => 'DJIUXSDKWidgets/**/*.{xcassets,html,otf}' }
18-
s.dependency 'DJI-SDK-iOS', '~> 4.12'
19-
s.dependency 'DJIWidget', '~> 1.6.2'
20-
s.dependency 'DJI-UXSDK-iOS-Beta-Core', '0.2'
21-
s.dependency 'DJI-UXSDK-iOS-Beta-Communication', '0.2'
19+
s.dependency 'DJI-SDK-iOS', '~> 4.13'
20+
s.dependency 'DJIWidget', '~> 1.6.3'
21+
s.dependency 'DJI-UXSDK-iOS-Beta-Core', '0.3'
22+
s.dependency 'DJI-UXSDK-iOS-Beta-Communication', '0.3'
2223
end

DJI-UXSDK-iOS-Beta.podspec

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
Pod::Spec.new do |s|
22
s.name = 'DJI-UXSDK-iOS-Beta'
3-
s.version = '0.2'
3+
s.version = '0.3'
44
s.license = 'MIT'
55
s.summary = 'DJI iOS UX SDK'
66
s.homepage = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS'
77
s.authors = { 'DJI' => 'dev@dji.com' }
88
s.documentation_url = 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS/wiki'
99
s.ios.deployment_target = '11.0'
1010
s.requires_arc = true
11+
s.swift_version = '5.0'
1112
s.module_name = 'DJIUXSDKBeta'
1213
s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load' }
1314
s.source = { :git => 'https://github.com/dji-sdk/Mobile-UXSDK-Beta-iOS.git', :tag => s.version.to_s }
1415
s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO', 'DEFINES_MODULE' => 'YES'}
1516
s.cocoapods_version = '>= 1.7.1'
1617
s.source_files = 'DJIUXSDKBeta/**/*.{h,m,swift}'
17-
s.dependency 'DJI-UXSDK-iOS-Beta-Core', '0.2'
18-
s.dependency 'DJI-UXSDK-iOS-Beta-Communication', '0.2'
19-
s.dependency 'DJI-UXSDK-iOS-Beta-Widgets', '0.2'
18+
s.dependency 'DJI-UXSDK-iOS-Beta-Core', '0.3'
19+
s.dependency 'DJI-UXSDK-iOS-Beta-Communication', '0.3'
20+
s.dependency 'DJI-UXSDK-iOS-Beta-Widgets', '0.3'
2021
end

DJIUXSDKBeta/DJIUXSDK.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@
22
// DJIUXSDK.h
33
// DJIUXSDK
44
//
5-
// Copyright © 2018-2020 DJI. All rights reserved.
5+
// MIT License
6+
//
7+
// Copyright © 2018-2020 DJI
8+
//
9+
// Permission is hereby granted, free of charge, to any person obtaining a copy
10+
// of this software and associated documentation files (the "Software"), to deal
11+
// in the Software without restriction, including without limitation the rights
12+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the Software is
14+
// furnished to do so, subject to the following conditions:
15+
16+
// The above copyright notice and this permission notice shall be included in all
17+
// copies or substantial portions of the Software.
18+
19+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
// SOFTWARE.
626
//
727

828
#import <UIKit/UIKit.h>

DJIUXSDKBeta/DUXBetaSDKAttributes.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// MIT License
66
//
7-
// Copyright © 2018-2019 DJI
7+
// Copyright © 2018-2020 DJI
88
//
99
// Permission is hereby granted, free of charge, to any person obtaining a copy
1010
// of this software and associated documentation files (the "Software"), to deal

DJIUXSDKCommunication/GlobalPreferences.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,28 @@
2727

2828
import Foundation
2929

30-
@objc(DUXMeasureUnitType) public enum MeasureUnitType: Int {
30+
@objc(DUXBetaMeasureUnitType) public enum MeasureUnitType: Int {
3131
case Metric = 1, Imperial = 2, Unknown = 3
3232
}
3333

34-
@objc(DUXFPVCenterViewType) public enum FPVCenterViewType: Int {
35-
case Standard = 1, Cross, NarrowCross, Frame, FrameAndCross, Square, SquareAndCross, Unknown
34+
@objc(DUXBetaFPVCenterViewType) public enum FPVCenterViewType: Int {
35+
case None = 0, Standard, Cross, NarrowCross, Frame, FrameAndCross, Square, SquareAndCross, Unknown
3636
}
3737

38-
@objc(DUXFPVCenterViewColor) public enum FPVCenterViewColor: Int {
39-
case White = 1, Yellow, Red, Green, Blue, Black, Unknown
38+
@objc(DUXBetaFPVCenterViewColor) public enum FPVCenterViewColor: Int {
39+
case None = 0, White, Yellow, Red, Green, Blue, Black, Unknown
4040
}
4141

42-
@objc(DUXFPVGridViewType) public enum FPVGridViewType: Int {
43-
case Parallel = 1, ParallelDiagonal, Unknown
42+
@objc(DUXBetaFPVGridViewType) public enum FPVGridViewType: Int {
43+
case None = 0, Parallel, ParallelDiagonal, Unknown
4444
}
4545

4646
enum GlobalPreference: RawRepresentable {
4747
typealias RawValue = String
4848

4949
case MeasureUnitType, AFCEnabled, FPVCenterViewType, FPVCenterViewColor, FPVGridViewType, Unknown
5050

51-
static let Prefix = "DUXGlobalPreference"
51+
static let Prefix = "DUXBetaGlobalPreference"
5252

5353
var rawValue: GlobalPreference.RawValue {
5454
switch self {
@@ -86,7 +86,7 @@ enum GlobalPreference: RawRepresentable {
8686
}
8787

8888
// To create a custom storage mechanism, implement this protocol then call setSharedGlobalPreferences:
89-
// on DUXSingleton to replace the default implementation with a custom one
89+
// on DUXBetaSingleton to replace the default implementation with a custom one
9090
@objc public protocol GlobalPreferences {
9191
func set(measureUnitType:MeasureUnitType)
9292
func measureUnitType() -> MeasureUnitType

DJIUXSDKCommunication/ObservableInMemoryKeyedStore.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// DUXBroadcaster.swift
2+
// DUXBetaBroadcaster.swift
33
// DJIUXSDK
44
//
55
// MIT License
@@ -141,7 +141,7 @@ enum Type {
141141
}
142142

143143
// ExternalKey bridges to the Key / ConcreteKey types that cannot be used in obj-c
144-
@objc(DUXKey) public class ExternalKey : NSObject {
144+
@objc(DUXBetaKey) public class ExternalKey : NSObject {
145145
var concreteKey:ConcreteKey {
146146
get {
147147
return ConcreteKey(index:self.index, parameter:self.internalParameter)
@@ -179,12 +179,12 @@ enum Type {
179179
// 4. Make sure it is mapped by the appropriate conversion method back to the public type
180180
// 5. You're done!
181181

182-
@objc(DUXCameraParameter) public enum CameraParameter : UInt {
182+
@objc(DUXBetaCameraParameter) public enum CameraParameter : UInt {
183183
case AFCEnabled = 1,
184184
Unknown = 2
185185
}
186186

187-
@objc(DUXCameraKey) public class CameraKey : ExternalKey {
187+
@objc(DUXBetaCameraKey) public class CameraKey : ExternalKey {
188188
public var param:CameraParameter {
189189
return self.internalParameter.cameraParameter()
190190
}
@@ -195,13 +195,13 @@ enum Type {
195195
}
196196
}
197197

198-
@objc(DUXVideoParameter) public enum VideoParameter : UInt {
198+
@objc(DUXBetaVideoParameter) public enum VideoParameter : UInt {
199199
case DecoderStatus = 1,
200200
PeakingThreshold = 2,
201201
Unknown = 3
202202
}
203203

204-
@objc(DUXVideoKey) public class VideoKey : ExternalKey {
204+
@objc(DUXBetaVideoKey) public class VideoKey : ExternalKey {
205205
@objc public init(index: Int, parameter: VideoParameter) {
206206
super.init(index: index,
207207
param: Parameter(videoParameter: parameter))
@@ -228,12 +228,12 @@ enum Type {
228228
}
229229
}
230230

231-
@objc(DUXVoiceNotificationParameter) public enum VoiceNotificationParameter : UInt {
231+
@objc(DUXBetaVoiceNotificationParameter) public enum VoiceNotificationParameter : UInt {
232232
case Attitude = 1,
233233
Unknown = 3
234234
}
235235

236-
@objc(DUXVoiceNotificationKey) public class VoiceNotificationKey : ExternalKey {
236+
@objc(DUXBetaVoiceNotificationKey) public class VoiceNotificationKey : ExternalKey {
237237
@objc public init(index: Int, parameter: VoiceNotificationParameter) {
238238
super.init(index: index,
239239
param: Parameter(voiceNotificationParameter: parameter))
@@ -268,7 +268,7 @@ typealias ModelValueCompletionBlock = (ModelValue?) -> Void
268268

269269
class FlatStore: NSObject {
270270
var underlyingStore:[ConcreteKey:ModelValue] = [:]
271-
var queue:DispatchQueue = DispatchQueue(label: "DUXFlatStoreSerialQueue")
271+
var queue:DispatchQueue = DispatchQueue(label: "DUXBetaFlatStoreSerialQueue")
272272

273273
func update(modelValue:ModelValue?, for key:ConcreteKey) {
274274
self.queue.async {

DJIUXSDKCore/Analytics/DUXStateChangeBaseData.h renamed to DJIUXSDKCore/Analytics/DUXBetaStateChangeBaseData.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// DUXStateChangeBaseData.h
2+
// DUXBetaStateChangeBaseData.h
33
// DJIUXSDKCore
44
//
55
// Copyright © 2018-2020 DJI
@@ -27,14 +27,14 @@
2727

2828
NS_ASSUME_NONNULL_BEGIN
2929
/**
30-
* This is DUXStateChangeBaseData, the base class for data transmitted by the UI and Model hooks supplied throughtout the UX SDK code base
30+
* This is DUXBetaStateChangeBaseData, the base class for data transmitted by the UI and Model hooks supplied throughtout the UX SDK code base
3131
* to notify developer of chaniging events.
3232
* Each instance of this class or it's descendents contains a key and a value for that key. It is dependent on the receiver to know what kind of data to expect
3333
* with the hook. Convenience methods have been supplied in this class for easy access to the contents.
3434
*
3535
* The key can be retrieved as a string, using the key method.
3636
*/
37-
@interface DUXStateChangeBaseData : NSObject
37+
@interface DUXBetaStateChangeBaseData : NSObject
3838
/**
3939
* Initialization methods for each of the types of data to be delivered.
4040
*/
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
4545
- (instancetype)initWithKey:(NSString*)key object:(id)object;
4646

4747
/**
48-
* Accessors for the contents of the DUXStateChangeBaseData instance.
48+
* Accessors for the contents of the DUXBetaStateChangeBaseData instance.
4949
*/
5050
- (NSString*)key;
5151
- (NSValue*)value;

DJIUXSDKCore/Analytics/DUXStateChangeBaseData.m renamed to DJIUXSDKCore/Analytics/DUXBetaStateChangeBaseData.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// DUXStateChangeBaseData.m
2+
// DUXBetaStateChangeBaseData.m
33
// DJIUXSDKCore
44
//
55
// Copyright © 2018-2020 DJI
@@ -23,13 +23,13 @@
2323
// SOFTWARE.
2424
//
2525

26-
#import "DUXStateChangeBaseData.h"
26+
#import "DUXBetaStateChangeBaseData.h"
2727

28-
@interface DUXStateChangeBaseData ()
28+
@interface DUXBetaStateChangeBaseData ()
2929
@property (nonatomic, strong) NSMutableDictionary *dict;
3030
@end
3131

32-
@implementation DUXStateChangeBaseData
32+
@implementation DUXBetaStateChangeBaseData
3333

3434
- (instancetype)initWithKey:(NSString*)key {
3535
if (self = [super init]) {

DJIUXSDKCore/Analytics/DUXStateChangeBroadcaster.h renamed to DJIUXSDKCore/Analytics/DUXBetaStateChangeBroadcaster.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// DUXStateChangeBroadcaster.h
2+
// DUXBetaStateChangeBroadcaster.h
33
// DJIUXSDKCore
44
//
55
// Copyright © 2018-2020 DJI
@@ -24,20 +24,20 @@
2424
//
2525

2626
#import <Foundation/Foundation.h>
27-
#import "DUXStateChangeBaseData.h"
27+
#import "DUXBetaStateChangeBaseData.h"
2828
NS_ASSUME_NONNULL_BEGIN
2929

30-
typedef void(^AnalyticsHandler)(DUXStateChangeBaseData *analyticsData);
30+
typedef void(^AnalyticsHandler)(DUXBetaStateChangeBaseData *analyticsData);
3131

32-
@interface DUXStateChangeBroadcaster : NSObject
33-
+ (DUXStateChangeBroadcaster*) instance;
34-
+ (void)send:(DUXStateChangeBaseData*)analyticsData; // Convenience method to just send
32+
@interface DUXBetaStateChangeBroadcaster : NSObject
33+
+ (DUXBetaStateChangeBroadcaster *)instance;
34+
+ (void)send:(DUXBetaStateChangeBaseData*)analyticsData; // Convenience method to just send
3535

3636
- (void)registerListener:(id)listener analyticsClassName:(NSString*)analyticsClassName handler:(AnalyticsHandler)block;
3737
- (void)unregisterListener:(id)listener;
3838
- (void)unregisterListener:(id)listener forClassName:(NSString*)analyticsClassNane;
3939

40-
- (void)send:(DUXStateChangeBaseData*)analyticsData;
40+
- (void)send:(DUXBetaStateChangeBaseData*)analyticsData;
4141
@end
4242

4343
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)