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

[ios][camera] Fix path where camera saves picture on simulator #20872

Merged
merged 2 commits into from
Jan 19, 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: 2 additions & 0 deletions packages/expo-camera/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 🐛 Bug fixes

- Fix path where simulator saves photos ([#20872](https://github.com/expo/expo/pull/20872) by [@pettomartino](https://github.com/pettomartino))

### 💡 Others

## 13.1.0 - 2022-11-23
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-camera/ios/EXCamera/CameraViewModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ private func generatePictureForSimulator(appContext: AppContext?, options: TakeP
guard let fs = appContext?.fileSystem else {
throw Exceptions.FileSystemModuleNotFound()
}
let path = fs.generatePath(inDirectory: fs.cachesDirectory.appending("Camera"), withExtension: ".jpg")
let path = fs.generatePath(inDirectory: fs.cachesDirectory.appending("/Camera"), withExtension: ".jpg")
let generatedPhoto = EXCameraUtils.generatePhoto(of: CGSize(width: 200, height: 200))
let photoData = generatedPhoto.jpegData(compressionQuality: options.quality)

Expand Down