You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,18 +93,51 @@ let package = Package(
93
93
<details>
94
94
<summary>CocoaPods</summary>
95
95
</br>
96
-
<p>Since CocoaPods doesn't directly support Swift Macro, the macro implementation can be compiled into binary for use. The integration method is as follows, requiring <code>s.pod_target_xcconfig</code> to load the binary plugin of macro implementation:</p>
96
+
<p>Since CocoaPods doesn't directly support Swift Macro, the macro implementation is compiled into a prebuilt binary plugin. ReerCodable automatically downloads the plugin during build. There are two integration scenarios:</p>
97
+
98
+
<h4>1. Use in Main App Only</h4>
99
+
<p>If you only use <code>@Codable</code> in your main app (not inside other Pods), simply add to your Podfile:</p>
100
+
<pre><codeclass="ruby language-ruby">
101
+
pod 'ReerCodable', '1.7.1'
102
+
</code></pre>
103
+
104
+
<h4>2. Use in a Pod Component</h4>
105
+
<p>If your Pod needs to use <code>@Codable</code> and other ReerCodable macros, you <strong>must</strong> add <code>pod_target_xcconfig</code> to load the macro plugin binary, because CocoaPods does not propagate build settings from dependencies to dependent Pods:</p>
<h4>3. Recommended: Auto-configure via Podfile (for multiple Pods)</h4>
118
+
<p>If you have many Pods depending on ReerCodable, add this <code>post_install</code> hook to your Podfile to automatically inject the macro plugin configuration into all dependent Pods:</p>
<p><strong>⚠️ Important:</strong> If you encounter <code>rsync</code> permission errors with Xcode 14+, disable User Script Sandboxing:</p>
109
142
<p>In your project's <strong>Build Settings</strong>, search for <code>User Script Sandboxing</code> and set <code>ENABLE_USER_SCRIPT_SANDBOXING</code> to <code>No</code>. This resolves CocoaPods script execution issues caused by Xcode's stricter sandbox restrictions.</p>
0 commit comments