Skip to content

Commit

Permalink
Support Apple Intelligence
Browse files Browse the repository at this point in the history
  • Loading branch information
CatMe0w committed Jul 29, 2024
1 parent 9a12636 commit f82bbc5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# zouxian 走线

Apple restricted the access to Xcode LLM (Predictive Code Completion) feature on China models of Mac. That is, if you are using a Mac bought in China, even if you are not in China, you will not be able to use Predictive Code Completion.
Apple restricted the access to Apple Intelligence and Xcode LLM (Predictive Code Completion) feature on China models of Mac. That is, if you are using a Mac bought in China, even if you are not in China, you will not be able to use Apple Intelligence or Predictive Code Completion.

If you are unfortunate to be in this situation, now it is time take your Mac on a journey of _[Zouxian](https://en.wikipedia.org/wiki/Zouxian_(phenomenon))_.

Expand All @@ -10,15 +10,25 @@ Persistent solution after rebooting, based on [Cyandev's guide](https://gist.git

## Version table

|From|To||
|-|-|-|
|Macintosh System 1|14.6 (23G80)|No Xcode LLM available|
|15.0 Beta 1 (24A5264n)|15.0 Beta 4 (24A5298h)|Supported|
### Apple Intelligence

| From | To | |
| ---------------------- | ---------------------- | ---------------------------------------- |
| Macintosh System 1 | 15.0 Beta 4 (24A5298h) | No Apple Intelligence available |
| 15.1 Beta 1 (24B5009l) | 15.1 Beta 1 (24B5009l) | Supported (requires `zouxian` >= v0.2.0) |

### Xcode LLM (Xcode Predictive Code Completion)

| From | To | |
| ---------------------- | ---------------------- | ---------------------- |
| Macintosh System 1 | 14.6 (23G80) | No Xcode LLM available |
| 15.0 Beta 1 (24A5264n) | 15.1 Beta 1 (24B5009l) | Supported |

## Prerequisites

* Xcode is installed and run at least once.
* SIP debugging restrictions are disabled (via `csrutil enable --without debug` command in recovery mode).
- SIP debugging restrictions are disabled (via `csrutil enable --without debug` command in recovery mode).
- For Apple Intelligence: A non-China Apple ID signed in.
- For Xcode Predictive Code Completion: Xcode is installed and run at least once.

## Disclaimer

Expand Down
2 changes: 1 addition & 1 deletion zouxian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ while [ $SECONDS_PASSED -lt $MAX_WAIT_TIME ]; do
echo "eligibilityd found with PID $PID"
lldb --batch \
-o "process attach --name eligibilityd" \
-o "expression (void) [[[InputManager sharedInstance] objectForInputValue:6] setValue:@\"US\" forKey:@\"_deviceRegionCode\"]" \
-o "expression (void) [[[InputManager sharedInstance] objectForInputValue:6] setValue:@\"LL\" forKey:@\"_deviceRegionCode\"]" \
-o "expression (void) [[EligibilityEngine sharedInstance] recomputeAllDomainAnswers]" \
-o "process detach" \
-o quit || { echo "lldb command failed"; exit 1; }
Expand Down

0 comments on commit f82bbc5

Please sign in to comment.