Skip to content

Commit 5d2f5e4

Browse files
Merge pull request #368 from Syncfusion-Content/hotfix/hotfix-v20.2.0.43
DOCINFRA-2341_merged_using_automation
2 parents 623d7ff + 91b52dd commit 5d2f5e4

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: post
3+
title: Library not loaded: @rpath/libswiftCore.dylib error | Syncfusion
4+
description: Learn here all about how to resolve Library not loaded: @rpath/libswiftCore.dylib error faced when using Syncfusion Flutter PdfViewer (SfPdfViewer) widget.
5+
platform: Flutter
6+
control: SfPdfViewer
7+
documentation: ug
8+
---
9+
10+
# How to resolve "Library not loaded: @rpath/libswiftCore.dylib" error?
11+
12+
The Syncfusion Flutter PDF Viewer is a [ffi plugin](https://docs.flutter.dev/development/packages-and-plugins/developing-packages#types) that uses native code to render the PDF pages. **Java** code is used for **Android**, and **Swift** code is used for **iOS and macOS**. To run the Swift code, the runtime requires the essential Swift standard libraries present in the runpath **“usr/lib/swift.”** If this path is missing from the **Runpath Search Paths** of the project build settings, you will face the error **"Library not loaded: @rpath/libswiftCore.dylib."**
13+
14+
Usually, the **"usr/lib/swift"** path will be added automatically to the **Runpath Search Paths** when you add the Syncfusion Flutter PDF Viewer (SfPdfViewer) package and build the application. But in some cases, due to the machine-specific environment, this path doesn't get added, and so this issue occurs.
15+
16+
To overcome this issue, you are suggested to add the **"usr/lib/swift"** path to the **Runpath Search Paths** manually in the project build settings. Find and edit the **Runpath Search Paths** option by opening the project in the **XCode** and then going to **Build Settings -> Linking -> Runpath Search Paths**. Please find the Runpath search path option screenshot in the following project build settings.
17+
18+
![XCode Runpath Search Paths](images/xcode-runpath-search-paths.jpg)
32 KB
Loading

Flutter/pdf-viewer/viewing-password-protected-pdf-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The password-protected document can be loaded by providing the password in the [
2424
Widget build(BuildContext context) {
2525
return Scaffold(
2626
body: Container(
27-
child: SfPdfViewer.asset(
28-
'assets/encrypted_document.pdf',
27+
child: SfPdfViewer.network(
28+
'https://cdn.syncfusion.com/content/PDFViewer/encrypted.pdf',
2929
password:'syncfusion',
3030
canShowPasswordDialog: false,)));
3131
}

flutter-toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@
463463
How to
464464
<ul>
465465
<li><a href="/Flutter/pdf-viewer/How-to/Add-SignaturePad-signatures-to-Syncfusion-Flutter-PdfViewer">Add SignaturePad signatures to Syncfusion Flutter PdfViewer</a></li>
466+
<li><a href="/Flutter/pdf-viewer/How-to/Resolve-Library-not-loaded-rpath-libswiftCore-dylib-error">Resolve Library not loaded: @rpath/libswiftCore.dylib error</a></li>
466467
</ul>
467468
</li>
468469
</ul>

0 commit comments

Comments
 (0)