Skip to content

Commit

Permalink
Merge pull request #2 from apivideo/set-application-name
Browse files Browse the repository at this point in the history
chore: call setApplicationName() of native upload libs
  • Loading branch information
olivierapivideo committed Jan 26, 2022
2 parents 969d612 + f88fea2 commit 13369de
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [0.2.2] - 2022-01-21
- Define the application name when instanciating native uploader libraries

## [0.2.1] - 2022-01-21
- Remove jcenter as a dependency repository
- Update dependencies (react-native)
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ dependencies {
// noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'video.api:android-video-uploader:0.2.2'
implementation 'video.api:android-video-uploader:0.2.3'
implementation 'com.google.code.gson:gson:2.8.8'
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class UploaderModule(reactContext: ReactApplicationContext) :
private var videosApi = VideosApi()
private val json = JSON()

init {
videosApi.apiClient.setApplicationName("reactnative-uploader")
}

override fun getName(): String {
return "ApiVideoUploader"
}
Expand Down
1 change: 0 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ target 'Example' do
use_react_native!(:path => config["reactNativePath"])

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

# Enables Flipper.
#
Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- Alamofire (5.4.4)
- AnyCodable-FlightSchool (0.6.2)
- ApiVideoUploader (0.1.2):
- ApiVideoUploader (0.1.3):
- Alamofire (~> 5.4.3)
- AnyCodable-FlightSchool (~> 0.6.1)
- boost (1.76.0)
Expand Down Expand Up @@ -282,8 +282,8 @@ PODS:
- React-Core
- react-native-image-picker (4.0.6):
- React-Core
- react-native-video-uploader (0.2.1):
- ApiVideoUploader (= 0.1.2)
- react-native-video-uploader (0.2.2):
- ApiVideoUploader (= 0.1.3)
- React-Core
- React-perflogger (0.66.4)
- React-RCTActionSheet (0.66.4):
Expand Down Expand Up @@ -505,7 +505,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9
AnyCodable-FlightSchool: ac75ed9bae659e16a41ebfa6c71a663d6f2c111c
ApiVideoUploader: 8dbc46c2c413ce528b69bd5697ef97d2811530ab
ApiVideoUploader: 1f074ca39f837883c41d93da5aeabfae96facf35
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
Expand Down Expand Up @@ -538,7 +538,7 @@ SPEC CHECKSUMS:
React-logger: 933f80c97c633ee8965d609876848148e3fef438
react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9
react-native-image-picker: a6e56460d34905c849ada551db30897dc7f3d535
react-native-video-uploader: d5f3510ec4096d8c23412a45dd8658b947e0ec03
react-native-video-uploader: 5abfb9b2d6aa313bb3463c6d7c8200cfa8a0e25b
React-perflogger: 93075d8931c32cd1fce8a98c15d2d5ccc4d891bd
React-RCTActionSheet: 7d3041e6761b4f3044a37079ddcb156575fb6d89
React-RCTAnimation: 743e88b55ac62511ae5c2e22803d4f503f2a3a13
Expand All @@ -555,6 +555,6 @@ SPEC CHECKSUMS:
Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: d8153c7f6b15c518a48fd8fe235718d4efc0b01a
PODFILE CHECKSUM: 68e171f73bb24f3d1ce484df214c66e4e3e5e444

COCOAPODS: 1.11.2
5 changes: 5 additions & 0 deletions ios/RCTUploader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import ApiVideoUploader

@objc(RCTUploader)
class RCTUploader: NSObject {

override init() {
try? ApiVideoUploader.setApplicationName(applicationName: "reactnative-uploader")
}

@objc(setEnvironment:)
func setEnvironment(environment: String) -> Void {
ApiVideoUploader.basePath = environment
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@api.video/react-native-video-uploader",
"version": "0.2.1",
"version": "0.2.2",
"description": "The official React Native video uploader for api.video",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
2 changes: 1 addition & 1 deletion react-native-video-uploader.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "React-Core"
s.dependency 'ApiVideoUploader', '0.1.2'
s.dependency 'ApiVideoUploader', '0.1.3'
end

0 comments on commit 13369de

Please sign in to comment.