start new project
npx @react-native-community/cli@latest init TCrnBasic
✔ Do you want to install CocoaPods now? Only needed if you run your project in Xcode directly … yes
⠦ Installing Ruby Gems
install theta-client
cd TCrnBasic
npm install theta-client-react-native
pod repo update
Updating spec repo `trunk`
pod search THETAClient --simple
-> THETAClient (1.12.0)
THETA Client
pod 'THETAClient', '~> 1.12.0'
- Homepage: https://github.com/ricohapi/theta-client
- Source:
https://github.com/ricohapi/theta-client/releases/download/1.12.0/THETAClient.xcframework.zip
- Versions: 1.12.0, 1.11.1, 1.11.0, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.9.0,
1.8.0, 1.7.1, 1.7.0, 1.6.0, 1.5.0, 1.4.0, 1.3.1, 1.3.0, 1.2.0, 1.1.0, 1.0.0
[trunk repo]
(END)
Steps below no longer needed as I forgot to run pod repo update
initially
install pod for iOS - not needed
I built the pod from source as I originally couldn’t find the pod in cocoapods
build ios pod
Download theta-client into a different directory. This is not inside of your project.
./gradlew podPublishXCFramework
copy pod from theta-client into new project
cd kotlin-multiplatform/build/cocoapods/publish
cp -r * /Users/craig/Development/ricoh/2025/TCrnBasic/ios/Vendor/theta-client
modify Podfile
in ios
target 'TCrnBasic' do
config = use_native_modules!
pod "THETAClient", :path => "./Vendor/theta-client/debug"
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
install pod
in the ios
directory
pod install
Found 1 module for target `TCrnBasic`
...
...
Downloading dependencies
Installing React-Codegen (0.1.0)
Installing THETAClient (1.12.0)
Installing theta-client-react-native (1.12.0)
add skeleton code
In App.jsx.
import React from 'react';
import {Button, SafeAreaView, ScrollView, Text} from 'react-native';
import {FileTypeEnum, initialize} from 'theta-client-react-native';
import {getThetaInfo} from 'theta-client-react-native';
import {listFiles} from 'theta-client-react-native';
function App(): React.JSX.Element {
const [thetaInfo, setThetaInfo] = React.useState('');
React.useEffect(() => {
const initTheta = async () => {
try {
await initialize('http://192.168.1.1', {});
} catch (error) {
console.error('Failed to initialize THETA:', error);
}
};
initTheta();
}, []);
return (
<SafeAreaView>
<ScrollView>
<Button
title="info"
onPress={async () => {
try {
const info = await getThetaInfo();
setThetaInfo(JSON.stringify(info, null, 2));
} catch (error) {
console.error('Failed to get THETA info:', error);
setThetaInfo('Error getting THETA info');
}
}}
/>
<Button
title="list files"
onPress={async () => {
try {
const files = await listFiles(FileTypeEnum.IMAGE, 1, 10);
setThetaInfo(JSON.stringify(files, null, 2));
} catch (error) {
console.error('Failed to get file listing:', error);
setThetaInfo('Error getting file listing');
}
}}
/>
<Text>{thetaInfo}</Text>
</ScrollView>
</SafeAreaView>
);
}
export default App;
connect computer to camera and run
Connect with WiFi. The red USB cable is only for power. The RICOH THETA is at 192.168.1.1. Your computer must connect to the THETA as a hotspot.
npm run ios