Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix CI #1475

Merged
merged 8 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for android/
run: cd android && ./gradlew assembleDebug --build-cache && cd ..
- name: Run Gradle Build for example/android/
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..
2 changes: 1 addition & 1 deletion .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 2.6.8
bundler-cache: true
working-directory: example/ios

Expand Down
1 change: 0 additions & 1 deletion android/src/main/cpp/CameraView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <memory>
#include <string>
#include <regex>

namespace vision {

Expand Down
2 changes: 0 additions & 2 deletions android/src/main/cpp/JSIJNIConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,13 @@ jobject JSIJNIConversion::convertJSIValueToJNIObject(jsi::Runtime &runtime, cons
auto dynamic = jsi::dynamicFromValue(runtime, value);
auto map = react::ReadableNativeMap::createWithContents(std::move(dynamic));
return map.release();

}
} else {
// unknown jsi type!

auto stringRepresentation = value.toString(runtime).utf8(runtime);
auto message = "Received unknown JSI value! (" + stringRepresentation + ") Cannot convert to a JNI value.";
throw std::runtime_error(message);

}
}

Expand Down
2 changes: 1 addition & 1 deletion android/src/main/cpp/VisionCameraScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ void VisionCameraScheduler::registerNatives() {
});
}

} // namespace vision
} // namespace vision
6 changes: 3 additions & 3 deletions android/src/main/cpp/VisionCameraScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ using namespace facebook;
* 4. `trigger()` is a C++ function here that just calls the passed C++ Method from step 1.
*/
class VisionCameraScheduler : public jni::HybridClass<VisionCameraScheduler> {
public:
public:
static auto constexpr kJavaDescriptor = "Lcom/mrousavy/camera/frameprocessor/VisionCameraScheduler;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
static void registerNatives();

// schedules the given job to be run on the VisionCamera FP Thread at some future point in time
void dispatchAsync(std::function<void()> job);

private:
private:
friend HybridBase;
jni::global_ref<VisionCameraScheduler::javaobject> javaPart_;
std::queue<std::function<void()>> _jobs;
Expand All @@ -47,4 +47,4 @@ class VisionCameraScheduler : public jni::HybridClass<VisionCameraScheduler> {
void trigger();
};

} // namespace vision
} // namespace vision
2 changes: 1 addition & 1 deletion example/ios/Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"

gem 'cocoapods', '1.10.2'
gem 'cocoapods', '1.11.3'
gem 'cocoapods-check'
67 changes: 34 additions & 33 deletions example/ios/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
CFPropertyList (3.0.6)
rexml
activesupport (5.2.6)
activesupport (6.1.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.10.2)
addressable (~> 2.6)
claide (1.1.0)
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.2)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -29,24 +30,24 @@ GEM
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.19.0, < 2.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-check (1.1.0)
cocoapods (~> 1.0)
cocoapods-core (1.10.2)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -55,45 +56,45 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.9)
concurrent-ruby (1.2.0)
escape (0.0.4)
ethon (0.14.0)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.4)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.10)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.14.4)
molinillo (0.6.6)
json (2.6.3)
minitest (5.17.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
rexml (3.2.5)
ruby-macho (1.4.0)
thread_safe (0.3.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
xcodeproj (1.21.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.7)

PLATFORMS
ruby
x86_64-darwin-19

DEPENDENCIES
cocoapods (= 1.10.2)
cocoapods (= 1.11.3)
cocoapods-check

BUNDLED WITH
Expand Down
5 changes: 3 additions & 2 deletions ios/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ opt_in_rules:
- vertical_whitespace_opening_braces
- vertical_whitespace_closing_braces
- vertical_parameter_alignment_on_call
- unused_import
- unused_declaration
- untyped_error_in_catch
- unowned_variable_capture
- unavailable_function
Expand All @@ -37,7 +35,10 @@ opt_in_rules:
- redundant_nil_coalescing
- attributes
- convenience_type
analyzer_rules:
- explicit_self
- unused_declaration
- unused_import

excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
Expand Down
3 changes: 2 additions & 1 deletion ios/CameraView+AVAudioSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ extension CameraView {
} else {
ReactLogger.log(level: .error, message: "Cannot resume interrupted Audio Session!")
}
@unknown default: ()
@unknown default:
()
}
}
}
2 changes: 1 addition & 1 deletion ios/CameraView+RecordVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ extension CameraView: AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureAud

if let frameProcessor = frameProcessorCallback, captureOutput is AVCaptureVideoDataOutput {
// Call the JavaScript Frame Processor func (worklet)
let frame = Frame(buffer: sampleBuffer, orientation: self.bufferOrientation)
let frame = Frame(buffer: sampleBuffer, orientation: bufferOrientation)
frameProcessor(frame)
}
}
Expand Down
2 changes: 1 addition & 1 deletion ios/CameraViewManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class CameraViewManager: RCTViewManager {
// Runs on JS Thread
runtimeManager = FrameProcessorRuntimeManager()
runtimeManager!.installFrameProcessorBindings()
return NSNumber(booleanLiteral: true)
return true as NSNumber
}

@objc
Expand Down