Skip to content

Commit 13369de

Browse files
Merge pull request #2 from apivideo/set-application-name
chore: call setApplicationName() of native upload libs
2 parents 969d612 + f88fea2 commit 13369de

File tree

8 files changed

+21
-10
lines changed

8 files changed

+21
-10
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [0.2.2] - 2022-01-21
5+
- Define the application name when instanciating native uploader libraries
6+
47
## [0.2.1] - 2022-01-21
58
- Remove jcenter as a dependency repository
69
- Update dependencies (react-native)

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ dependencies {
127127
// noinspection GradleDynamicVersion
128128
api 'com.facebook.react:react-native:+'
129129
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
130-
implementation 'video.api:android-video-uploader:0.2.2'
130+
implementation 'video.api:android-video-uploader:0.2.3'
131131
implementation 'com.google.code.gson:gson:2.8.8'
132132
}

android/src/main/java/video/api/reactnative/uploader/UploaderModule.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ class UploaderModule(reactContext: ReactApplicationContext) :
1313
private var videosApi = VideosApi()
1414
private val json = JSON()
1515

16+
init {
17+
videosApi.apiClient.setApplicationName("reactnative-uploader")
18+
}
19+
1620
override fun getName(): String {
1721
return "ApiVideoUploader"
1822
}

example/ios/Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ target 'Example' do
99
use_react_native!(:path => config["reactNativePath"])
1010

1111
pod 'react-native-video-uploader', :path => '../..'
12-
pod 'react-native-blob-util', :path => '../node_modules/react-native-blob-util'
1312

1413
# Enables Flipper.
1514
#

example/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PODS:
22
- Alamofire (5.4.4)
33
- AnyCodable-FlightSchool (0.6.2)
4-
- ApiVideoUploader (0.1.2):
4+
- ApiVideoUploader (0.1.3):
55
- Alamofire (~> 5.4.3)
66
- AnyCodable-FlightSchool (~> 0.6.1)
77
- boost (1.76.0)
@@ -282,8 +282,8 @@ PODS:
282282
- React-Core
283283
- react-native-image-picker (4.0.6):
284284
- React-Core
285-
- react-native-video-uploader (0.2.1):
286-
- ApiVideoUploader (= 0.1.2)
285+
- react-native-video-uploader (0.2.2):
286+
- ApiVideoUploader (= 0.1.3)
287287
- React-Core
288288
- React-perflogger (0.66.4)
289289
- React-RCTActionSheet (0.66.4):
@@ -505,7 +505,7 @@ EXTERNAL SOURCES:
505505
SPEC CHECKSUMS:
506506
Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9
507507
AnyCodable-FlightSchool: ac75ed9bae659e16a41ebfa6c71a663d6f2c111c
508-
ApiVideoUploader: 8dbc46c2c413ce528b69bd5697ef97d2811530ab
508+
ApiVideoUploader: 1f074ca39f837883c41d93da5aeabfae96facf35
509509
boost: a7c83b31436843459a1961bfd74b96033dc77234
510510
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
511511
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
@@ -538,7 +538,7 @@ SPEC CHECKSUMS:
538538
React-logger: 933f80c97c633ee8965d609876848148e3fef438
539539
react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9
540540
react-native-image-picker: a6e56460d34905c849ada551db30897dc7f3d535
541-
react-native-video-uploader: d5f3510ec4096d8c23412a45dd8658b947e0ec03
541+
react-native-video-uploader: 5abfb9b2d6aa313bb3463c6d7c8200cfa8a0e25b
542542
React-perflogger: 93075d8931c32cd1fce8a98c15d2d5ccc4d891bd
543543
React-RCTActionSheet: 7d3041e6761b4f3044a37079ddcb156575fb6d89
544544
React-RCTAnimation: 743e88b55ac62511ae5c2e22803d4f503f2a3a13
@@ -555,6 +555,6 @@ SPEC CHECKSUMS:
555555
Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280
556556
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
557557

558-
PODFILE CHECKSUM: d8153c7f6b15c518a48fd8fe235718d4efc0b01a
558+
PODFILE CHECKSUM: 68e171f73bb24f3d1ce484df214c66e4e3e5e444
559559

560560
COCOAPODS: 1.11.2

ios/RCTUploader.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import ApiVideoUploader
22

33
@objc(RCTUploader)
44
class RCTUploader: NSObject {
5+
6+
override init() {
7+
try? ApiVideoUploader.setApplicationName(applicationName: "reactnative-uploader")
8+
}
9+
510
@objc(setEnvironment:)
611
func setEnvironment(environment: String) -> Void {
712
ApiVideoUploader.basePath = environment

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@api.video/react-native-video-uploader",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "The official React Native video uploader for api.video",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

react-native-video-uploader.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm,swift}"
1717

1818
s.dependency "React-Core"
19-
s.dependency 'ApiVideoUploader', '0.1.2'
19+
s.dependency 'ApiVideoUploader', '0.1.3'
2020
end

0 commit comments

Comments
 (0)