Skip to content

Merge in recent changes to supporter newer macOS versions#1

Merged
sedwards merged 5 commits intosedwards:masterfrom
sedwards-ibowl:master
Dec 11, 2025
Merged

Merge in recent changes to supporter newer macOS versions#1
sedwards merged 5 commits intosedwards:masterfrom
sedwards-ibowl:master

Conversation

@sedwards
Copy link
Copy Markdown
Owner

No description provided.

sedwards and others added 2 commits December 10, 2025 03:42
Implement application delegate to automatically open MacDependency's own
binary as an example when launched without arguments, while supporting
command-line arguments to open specific files.

## New Features

* **Auto-open example**: When launched with no arguments, MacDependency
  automatically opens and displays its own binary, providing an immediate
  working example for users

* **Command-line support**: Users can now open specific files from the
  command line, supporting both absolute and relative paths

* **Multiple file support**: Open multiple files simultaneously, each in
  a separate document window

## Implementation Details

* Created `AppDelegate` class to handle application lifecycle:
  - `applicationDidFinishLaunching:` checks for command-line arguments
  - `openDefaultFile` opens MacDependency's own executable when no args
  - `openFilesFromCommandLine:` processes file paths from arguments
  - `application:openFile:` preserves normal Finder-based file opening

* Modified `MainMenu.xib` to connect NSApplication's delegate outlet to
  AppDelegate instance

* Updated Xcode project configuration to include new AppDelegate files
  in build phases

## Bug Fixes

* Fixed code signing issues by documenting proper build flags for
  ad-hoc signing on modern macOS versions

* Fixed `create_dmg_for_app.sh` script to properly quote variables
  containing spaces (create_dmg_for_app.sh:38)

## Documentation Updates

* Updated README.md with:
  - New Features section describing auto-open and CLI capabilities
  - Usage section with command-line examples
  - Updated build instructions including code signing requirements

* Enhanced .gitignore with comprehensive macOS and build artifact patterns

## Testing

Verified functionality:
- ✓ Auto-open works when launching with no arguments
- ✓ Command-line file opening works with absolute paths
- ✓ Relative path resolution works correctly
- ✓ Multiple files open in separate windows
- ✓ Normal Finder operations (double-click, drag-and-drop) unaffected
- ✓ Application builds and runs with proper code signing

## Files Changed

* MacDependency/AppDelegate.h (new)
* MacDependency/AppDelegate.m (new)
* MacDependency/Base.lproj/MainMenu.xib (modified)
* MacDependency/MacDependency.xcodeproj/project.pbxproj (modified)
* MacDependency/README.md (updated)
* README.md (updated)
* .gitignore (enhanced)
* create_dmg_for_app.sh (fixed)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add auto-open feature and command-line support
Copy link
Copy Markdown
Owner Author

@sedwards sedwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

sedwards and others added 3 commits December 10, 2025 19:19
Add necessary entitlements and documentation to enable access to system
frameworks and libraries protected by macOS System Integrity Protection.

## Changes

* **Created MacDependency.entitlements**: Defines app entitlements for file
  access permissions, including user-selected file read/write and unsigned
  executable memory access

* **Updated Info.plist**: Added permission usage descriptions for Apple Events
  and System Administration to explain why the app needs file access

* **Updated project.pbxproj**: Added CODE_SIGN_ENTITLEMENTS setting to both
  Debug and Release build configurations, and included entitlements file in
  project file references

* **Updated README.md**: Added "Accessing System Files" section with
  instructions for granting Full Disk Access in System Settings to access
  `/System` and `/usr/lib` protected files

## Why These Changes

Without these entitlements and Full Disk Access, MacDependency cannot analyze
system frameworks like:
- `/System/Library/Frameworks/Cocoa.framework`
- `/System/Library/Frameworks/Foundation.framework`
- `/usr/lib/libobjc.A.dylib`
- `/usr/lib/libSystem.B.dylib`

Users will receive "Couldn't open file" errors when trying to analyze system
binaries due to macOS SIP restrictions.

## Files Changed

* MacDependency/MacDependency.entitlements (new)
* MacDependency/Info.plist (modified)
* MacDependency/MacDependency.xcodeproj/project.pbxproj (modified)
* README.md (modified)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Explain that system frameworks and libraries are stored in dyld shared
cache and not available as individual files on macOS Big Sur and later.

Provide workaround using dyld_shared_cache_util for advanced users who
need to analyze system libraries.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace deprecated mxcl/xcodebuild action with direct xcodebuild command.
Fixes artifact upload errors and uses modern actions/checkout@v4.

Includes proper code signing flags for CI builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sedwards sedwards merged commit ce11235 into sedwards:master Dec 11, 2025
1 check passed
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.

2 participants