Skip to content
Open
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### 🎉 New features

- Add Simulator camera streaming on macOS. ([#369](https://github.com/expo/orbit/pull/369) by [@gabrieldonadel](https://github.com/gabrieldonadel))

### 🐛 Bug fixes

- Fix Android code pairing input width on Windows and Linux. ([#357](https://github.com/expo/orbit/pull/357) by [@gabrieldonadel](https://github.com/gabrieldonadel))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>com.apple.security.device.camera</key>
<true/>
</dict>
</plist>
10 changes: 10 additions & 0 deletions apps/menu-bar/macos/ExpoMenuBar-macOS/ExpoMenuBar.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.temporary-exception.files.home-relative-path.read-write</key>
<array>
<string>/.lldbinit-Xcode</string>
</array>
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
<array>
<string>/private/tmp/dev.expo.orbit.simulator-camera.frames</string>
</array>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>
Expand Down
4 changes: 3 additions & 1 deletion apps/menu-bar/macos/ExpoMenuBar-macOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
</dict>
</dict>
</dict>
<key>NSCameraUsageDescription</key>
<string>Expo Orbit uses your Mac camera when streaming it to an iOS Simulator app.</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
Expand All @@ -103,4 +105,4 @@
<key>SUFeedURL</key>
<string>https://raw.githubusercontent.com/expo/orbit/main/appcast.xml</string>
</dict>
</plist>
</plist>
23 changes: 23 additions & 0 deletions apps/menu-bar/macos/ExpoMenuBar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
C091563F2D7787B200FC1EB6 /* Archive and sign CLI */,
381D8A6F24576A6C00465D17 /* Start Packager */,
63FA8EA00DD165DC6FA0B487 /* [Expo] Configure project */,
A1B2C3D4E5F60718293A4B5C /* Build Simulator Camera payload */,
514201452437B4B30078DB4F /* Sources */,
514201462437B4B30078DB4F /* Frameworks */,
514201472437B4B30078DB4F /* Resources */,
Expand Down Expand Up @@ -473,6 +474,28 @@
shellPath = /bin/sh;
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-ExpoMenuBar-macOS/expo-configure-project.sh\"\n";
};
A1B2C3D4E5F60718293A4B5C /* Build Simulator Camera payload */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/../simulator-camera/build-payload.sh",
"$(SRCROOT)/../simulator-camera/OrbitSimulatorCamera.m",
"$(SRCROOT)/../simulator-camera/OrbitSimulatorCameraProtocol.h",
);
name = "Build Simulator Camera payload";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/OrbitSimulatorCamera.dylib",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "\"$SRCROOT/../simulator-camera/build-payload.sh\" \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\n";
};
C091563F2D7787B200FC1EB6 /* Archive and sign CLI */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand Down
6 changes: 6 additions & 0 deletions apps/menu-bar/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2440,6 +2440,8 @@ PODS:
- SocketRocket
- Yoga
- Rudder (2.4.3)
- SimulatorCamera (1.0.0):
- ExpoModulesCore
- SocketRocket (0.7.1)
- Sparkle (2.5.2)
- Swifter (1.5.0)
Expand Down Expand Up @@ -2538,6 +2540,7 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../../../node_modules/react-native-macos/ReactCommon`)
- RNRudder (from `../modules/rudder/ios`)
- RNSVG (from `../../../node_modules/react-native-svg`)
- SimulatorCamera (from `../modules/simulator-camera/ios`)
- SocketRocket (~> 0.7.1)
- Swifter (~> 1.5.0)
- Yoga (from `../../../node_modules/react-native-macos/ReactCommon/yoga`)
Expand Down Expand Up @@ -2733,6 +2736,8 @@ EXTERNAL SOURCES:
:path: "../modules/rudder/ios"
RNSVG:
:path: "../../../node_modules/react-native-svg"
SimulatorCamera:
:path: "../modules/simulator-camera/ios"
Yoga:
:path: "../../../node_modules/react-native-macos/ReactCommon/yoga"

Expand Down Expand Up @@ -2829,6 +2834,7 @@ SPEC CHECKSUMS:
RNRudder: 43aceecc499fe6b69df88f5fb549bc344e4c9894
RNSVG: 681be694d501c0af971615811d4f2ea9baf58966
Rudder: 6d2c0775d5b606e05e00670615ee7f9c0c6d2813
SimulatorCamera: 215ea0bef47b2e24e66c2f51bc6cd18f591ff7d0
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Sparkle: 0e335e5c704ac28dbea18cc0383e15a3927c28dc
Swifter: e71dd674404923d7f03ebb03f3f222d1c570bc8e
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"platforms": ["apple", "web"],
"apple": {
"modules": ["SimulatorCameraModule"]
}
}
24 changes: 24 additions & 0 deletions apps/menu-bar/modules/simulator-camera/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import SimulatorCameraModule from './src/SimulatorCameraModule';
import { SimulatorCameraStatus } from './src/types';

export type { SimulatorCameraStatus } from './src/types';

export function getStatusAsync(): Promise<SimulatorCameraStatus> {
return SimulatorCameraModule.getStatus();
}

export function installAsync(): Promise<SimulatorCameraStatus> {
return SimulatorCameraModule.install();
}

export function uninstallAsync(): Promise<SimulatorCameraStatus> {
return SimulatorCameraModule.uninstall();
}

export function startAsync(): Promise<SimulatorCameraStatus> {
return SimulatorCameraModule.start();
}

export function stopAsync(): Promise<SimulatorCameraStatus> {
return SimulatorCameraModule.stop();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Pod::Spec.new do |s|
s.name = 'SimulatorCamera'
s.version = '1.0.0'
s.summary = 'Streams a Mac camera into iOS Simulator apps'
s.description = 'Orbit host and LLDB integration for the Simulator Camera feature.'
s.author = 'Expo'
s.homepage = 'https://github.com/expo/orbit'
s.platform = :osx, '14.0'
s.source = { git: '' }
s.static_framework = true

s.dependency 'ExpoModulesCore'
s.frameworks = 'AVFoundation', 'CoreMedia', 'CoreVideo'

s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}

s.source_files = '**/*.{h,m,mm,swift,hpp,cpp}'
end
Loading
Loading