Skip to content

Refactoring mlchtCamera's Views#15

Closed
crystall1nedev wants to merge 77 commits intodev/mainfrom
dev/view-refactors
Closed

Refactoring mlchtCamera's Views#15
crystall1nedev wants to merge 77 commits intodev/mainfrom
dev/view-refactors

Conversation

@crystall1nedev
Copy link
Copy Markdown
Owner

@crystall1nedev crystall1nedev commented Aug 15, 2025

mlchtCamera's code is all over the place, and I'm dealing with the affects of this months after I've written it. I'd like to make it cleaner and more organized - and will need to in order to prepare for mlchtKit.

More details on mlchtKit and its purpose will be available once dev/mlchtkit is pushed to this repository.

- Removed various files from Copy Bundle Resources step
- Added Embed Build Information to the watchOS target
- Add CFBuildBran to show what branch Malachite is built from
- Add experimental DeveloperView from the DeveloperView/ folder
- Refactor MalachiteSettingsView into SettingsView/ folder
- Remove unnecessary code and comments
@crystall1nedev crystall1nedev self-assigned this Aug 15, 2025
@crystall1nedev crystall1nedev marked this pull request as draft August 15, 2025 09:12
- Refactor SettingsView into multiple files
- Refactor SettingsView+Help into QuickHelpView/
- Refactor SettingsView into multiple files
- Refactor SettingsView+Help into QuickHelpView/
- Move internal settings to DeveloperView+Internal
- Add Quick Help entries for Compatibility and Developer
So the availability clause isn't working... what.

(cherry picked from commit 4bf97b9)
- Added a few things to the DeveloperView
- Rename some localizations and functions
- Put CompatibilityView into sections for more clarity
- Switch to isFlashAvailable from hasFlash
- Remove some unnecessary code, formatting changes
Camera Control support for focus and zoom have been disabled for everyone as I work on keeping Camera Control + gestures synched.
Internal builds still have it force enabled
Took care of most of the setupView() function, updated PhotoPreviewView
use the functions I created there as well.

This commit also fixes generating iOS 18 and older app icons using an
(obviously undocumented) asset catalog compiler flag, and switches
NSLog a bit to show proper debug information.
These aren't stale, Xcode just can't find them anymore.
- Move initialization to its own class and out of viewDidLoad()
- Move preview layer building into CameraView+Preview.swift
- Move bringup to Camera+Bringup.swift
- Move UI hide/show to MalachiteViewUtils.swift
- Created a UIGestureRecognizer array for rewritten UI hide/show funcs
- Move various functions out of CameraView into classes that they fit into
- Move Camera Control init + delegate to CameraView+Controls
- Move Darwin notification init to CameraView+Notifications
- Moved overriden funcs to CameraView+Overrides

Other changes included in this commit:
- Create a .name property on UIGestureRecognizer to more easily manage them
- Rewrite dimensions argument for button building to generate corner radius
- Add option to block accidental gestures (swiping from the bottom), currently requires a restart
- Add option to disable Camera Control, currently requires a restart
- Add preference for Camera Control options + order, currently not customizable
- Rename localizations for internal options
- Fixed the game kit button logic in Preferences+Extension (intentionally broken elsewhere)
- Fixed various force unwrapping in bringup code to fix iOS simulator support
- Fixed crash on launch on (at least) iOS 17, probably fixes other versions too
Also some fixes in the Embed build information scripts
I'm committing this before what I am about to do breaks it. Currently,
everything is still working fine. If you are installing Malachite for the first
time, install the previous build first and then update. This build does not
have working requests for camera access or photo library additions, so the
app will die.
This should also fix any other permissions issues that I forgot to account for in the past.
- Moved deviceModel and deviceModelHasChanged into compatibilityPreferences
- Removed prefsVersion key, it was unused after the migratePreferences() rewrite
- Call compatibility.checkDeviceForHEICCompatibility() from Init
So this is awkward... I forgot that Apple's been using HEIC the entire time...
…iewView

Should have done this a while ago to be honest.
@crystall1nedev crystall1nedev force-pushed the dev/view-refactors branch 7 times, most recently from 46d1155 to 17d8e75 Compare April 2, 2026 02:15
@crystall1nedev crystall1nedev force-pushed the dev/view-refactors branch 6 times, most recently from e77c419 to 67c71a1 Compare April 2, 2026 06:07
This was a lot of work, mostly skill issues.

- Remove dependence on Xcode Cloud (and therefore, GitHub) for mlchtCamera.
    - No more ci_scripts directory for Xcode Cloud.
    - Personal access token for Forgejo -> GitHub sync can now be reset to 1 month as planned.
    - "Embed build information" step has been updated to remove MacVM1,1 check and not embed custom username or hostname information.
- Move to https://ci.crystall1ne.dev for self-hosted CI/CD (fully set up with Forgejo-wide integration, yay!)
    - Selfhosted setup uses asc-cli for App Store Connect uploads and changes.
    - Beta groups, configuration, and test notes are assigned based on branch name as previously done by Xcode Cloud automatically.
- Various project changes to support this (and because I was here anyway):
    - Set default provisioning profiles for manual codesigning. Not defined in Codesigning.xcconfig because automatic signing should be used most of the time.
    - Switch Codesigning.example.xcconfig back to my personal Team ID after SideStore org got canned.
    - Bump project version to Xcode 26.3. Requires macOS Sequoia 15.6 or later.

Reviewed-on: https://git.crystall1ne.dev/crystll1ne/mlchtCamera/pulls/1
@crystall1nedev crystall1nedev force-pushed the dev/view-refactors branch 2 times, most recently from d97d2e0 to 7cd2e38 Compare April 9, 2026 00:08
Continues #1 because I missed this beforehand.

This PR:

- Turns the provisioning profile specifiers, build number, and branch name into xcconfig variables
- Cleans up the Jenkinsfile (and add support for the previous)
- Fixes the pbxproj being too hardcoded again

Maybe followed by xcconfig rework stash I have locally, not too important at this time though.

Reviewed-on: https://enclave.crystall1ne.dev/crystll1ne/mlchtCamera/pulls/2
Still has geotagging gated to INTERNAL, but this should be enough to get the app to be "not broken"
…ented flag

The flag stopped working in Xcode 26.1, and I don't plan to downgrade
my copy. This change is mostly to make some higher quality assets, and
support the clear mode a bit better.
@crystall1nedev
Copy link
Copy Markdown
Owner Author

Closing here since this GitHub repository is now a temporary mirror.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant