1010/// </summary>
1111public class PowerSyncSetup
1212{
13- private const string VERSION = "0.4.12 " ;
13+ private const string VERSION = "0.4.13 " ;
1414
1515 private const string GITHUB_BASE_URL = $ "https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v{ VERSION } ";
1616 private const string MAVEN_BASE_URL = $ "https://repo1.maven.org/maven2/com/powersync/powersync-sqlite-core/{ VERSION } ";
@@ -199,7 +199,7 @@ private async Task ProcessArchiveDownload(string nativeDir, ArchiveConfig config
199199 if ( Directory . Exists ( extractedPath ) )
200200 Directory . Delete ( extractedPath , recursive : true ) ;
201201
202- ZipFile . ExtractToDirectory ( downloadPath , nativeDir ) ;
202+ ExtractZipPreservingSymlinks ( downloadPath , nativeDir ) ;
203203 File . Delete ( downloadPath ) ;
204204
205205 Console . WriteLine ( $ "✓ Extracted { config . ArchiveFileName } → { config . ExtractedName } ") ;
@@ -210,6 +210,29 @@ private async Task ProcessArchiveDownload(string nativeDir, ArchiveConfig config
210210 }
211211 }
212212
213+ private static void ExtractZipPreservingSymlinks ( string zipPath , string destDir )
214+ {
215+ // ZipFile.ExtractToDirectory does not preserve symlinks, which breaks
216+ // macOS/Catalyst .xcframework bundles. Use `unzip` on Unix instead.
217+ if ( ! OperatingSystem . IsWindows ( ) )
218+ {
219+ var proc = System . Diagnostics . Process . Start ( new System . Diagnostics . ProcessStartInfo
220+ {
221+ FileName = "unzip" ,
222+ ArgumentList = { "-o" , zipPath , "-d" , destDir } ,
223+ RedirectStandardOutput = true ,
224+ RedirectStandardError = true ,
225+ } ) ! ;
226+ proc . WaitForExit ( ) ;
227+ if ( proc . ExitCode != 0 )
228+ throw new Exception ( $ "unzip exited with code { proc . ExitCode } : { proc . StandardError . ReadToEnd ( ) } ") ;
229+ }
230+ else
231+ {
232+ ZipFile . ExtractToDirectory ( zipPath , destDir ) ;
233+ }
234+ }
235+
213236 private async Task DownloadFile ( string url , string outputPath )
214237 {
215238 Console . WriteLine ( $ "📥 Downloading: { Path . GetFileName ( outputPath ) } ") ;
0 commit comments