Skip to content

Commit

Permalink
Merge pull request #102 from Aryamirsepasi/main
Browse files Browse the repository at this point in the history
Updated Xcode project files & instructions
  • Loading branch information
theJayTea authored Jan 17, 2025
2 parents e84550b + 49a13dc commit f18a4eb
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 91 deletions.
47 changes: 9 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,56 +200,27 @@ python pyinstaller-build-script.py
- Launch Xcode once installed and complete any additional component installations

2. **Clone the Repository**
- Open Terminal and navigate to a directory you want the project to be in:
- Open Terminal and navigate to the directory where you want to store the project:
```bash
git clone https://github.com/theJayTea/WritingTools.git
cd WritingTools
```

3. **Create Xcode Project**
- Navigate to the project's macOS directory:
```bash
cd macOS
```
- Create a new Xcode project:
```bash
xcodebuild -project writing-tools.xcodeproj
```

4. **Open in Xcode**
- Double-click the generated `writing-tools.xcodeproj` file
- Or open Xcode and select "Open a Project or File"
- Navigate to the `WritingTools/macOS/writing-tools.xcodeproj` file
5. **Configure Project Settings**
- In Xcode, select the project in the navigator
3. **Open in Xcode**
- Open Xcode
- Select "Open an existing project..." from the options.
- Navigate to the macOS folder within the WritingTools directory that you cloned previously, and select "writing-tools.xcodeproj"

4. **Configure Project Settings**
- In Xcode, select the project in the Navigator pane.
- Under "Targets", select "writing-tools"
- Set the following:
- Deployment Target: macOS 14.0
- Signing & Capabilities: Add your development team

6. **Install Dependencies**
- In Terminal, run:
```bash
cd macOS
swift package resolve
```
7. **Build and Run**
5. **Build and Run**
- In Xcode, select "My Mac" as the run destination
- Click the Play button or press ⌘R to build and run

## Troubleshooting
If you encounter the "Could not open file" error:
1. Ensure you're opening the `.xcodeproj` file, not the folder
2. If the error persists, try:
```bash
cd WritingTools/macOS
rm -rf writing-tools.xcodeproj
xcodebuild -project writing-tools.xcodeproj
```

## 🌟 Contributors

Expand Down
29 changes: 14 additions & 15 deletions macOS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ build/
DerivedData/

# Xcode files
xcuserdata/
*.xcworkspace
!default.xcworkspace/contents.xcworkspacedata

# Logs
*.xcuserdata
*.xcuserstate
*.xcarchive
*.log

# Temporary files
*.swp
*.lock
*.xcuserstate
### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# CocoaPods
Pods/
Expand Down Expand Up @@ -46,10 +49,6 @@ fastlane/test_output
*.mobileprovision
*.entitlements

# Personal settings
*.plist
*.xcodeproj/project.xcworkspace
*.xcodeproj/xcuserdata/
*.xcodeproj/xcshareddata/
*.xcodeproj/xcuserdata/**/*.xcuserdatad
*.xcodeproj/xcuserdata/**/*.xccheckout
# Temporary files
*.swp
*.lock
47 changes: 9 additions & 38 deletions macOS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,56 +42,27 @@ This guide will help you properly set up the Writing Tools macOS project in Xcod
- Launch Xcode once installed and complete any additional component installations

2. **Clone the Repository**
- Open Terminal and navigate to a directory you want the project to be in:
- Open Terminal and navigate to the directory where you want to store the project:
```bash
git clone https://github.com/theJayTea/WritingTools.git
cd WritingTools
```

3. **Create Xcode Project**
- Navigate to the project's macOS directory:
```bash
cd macOS
```
- Create a new Xcode project:
```bash
xcodebuild -project writing-tools.xcodeproj
```

4. **Open in Xcode**
- Double-click the generated `writing-tools.xcodeproj` file
- Or open Xcode and select "Open a Project or File"
- Navigate to the `WritingTools/macOS/writing-tools.xcodeproj` file
5. **Configure Project Settings**
- In Xcode, select the project in the navigator
3. **Open in Xcode**
- Open Xcode
- Select "Open an existing project..." from the options.
- Navigate to the macOS folder within the WritingTools directory that you cloned previously, and select "writing-tools.xcodeproj"

4. **Configure Project Settings**
- In Xcode, select the project in the Navigator pane.
- Under "Targets", select "writing-tools"
- Set the following:
- Deployment Target: macOS 14.0
- Signing & Capabilities: Add your development team

6. **Install Dependencies**
- In Terminal, run:
```bash
cd macOS
swift package resolve
```
7. **Build and Run**
5. **Build and Run**
- In Xcode, select "My Mac" as the run destination
- Click the Play button or press ⌘R to build and run

## Troubleshooting
If you encounter the "Could not open file" error:
1. Ensure you're opening the `.xcodeproj` file, not the folder
2. If the error persists, try:
```bash
cd WritingTools/macOS
rm -rf writing-tools.xcodeproj
xcodebuild -project writing-tools.xcodeproj
```
## Additional Notes
- The project requires macOS 14.0+ due to accessibility features
- Make sure all required permissions are granted when first launching the app
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2ABCBC1D2CDEB606001E4B5E"
BuildableName = "writing-tools.app"
BlueprintName = "writing-tools"
ReferencedContainer = "container:writing-tools.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2ABCBC2E2CDEB607001E4B5E"
BuildableName = "writing-toolsTests.xctest"
BlueprintName = "writing-toolsTests"
ReferencedContainer = "container:writing-tools.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2ABCBC382CDEB607001E4B5E"
BuildableName = "writing-toolsUITests.xctest"
BlueprintName = "writing-toolsUITests"
ReferencedContainer = "container:writing-tools.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2ABCBC1D2CDEB606001E4B5E"
BuildableName = "writing-tools.app"
BlueprintName = "writing-tools"
ReferencedContainer = "container:writing-tools.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
<AdditionalOption
key = "NSZombieEnabled"
value = "YES"
isEnabled = "YES">
</AdditionalOption>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2ABCBC1D2CDEB606001E4B5E"
BuildableName = "writing-tools.app"
BlueprintName = "writing-tools"
ReferencedContainer = "container:writing-tools.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
customArchiveName = "WritingTools"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
52 changes: 52 additions & 0 deletions macOS/writing-tools/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?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>
<key>CFBundleIdentifier</key>
<string>com.aryamirsepasi.writing-tools</string>
<key>CFBundleName</key>
<string>WritingTools</string>
<key>CFBundleDisplayName</key>
<string>WritingTools</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
<true />
<key>NSServices</key>
<array>
<dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>Process with WritingTools</string>
</dict>
<key>NSMessage</key>
<string>handleSelectedText</string>
<key>NSPortName</key>
<string>com.aryamirsepasi.writing-tools</string>
<key>NSRequiredContext</key>
<dict>
<key>NSTextContent</key>
<string>NSStringPboardType</string>
</dict>
<key>NSReturnTypes</key>
<array/>
<key>NSSendTypes</key>
<array>
<string>NSStringPboardType</string>
<string>NSRTFPboardType</string>
<string>public.plain-text</string>
<string>public.text</string>
</array>
</dict>
</array>
</dict>
</plist>

0 comments on commit f18a4eb

Please sign in to comment.