From f594c0aa04573ab39b6b4e925abb5b85bfb574c3 Mon Sep 17 00:00:00 2001 From: Mario Nachbaur Date: Wed, 13 Nov 2024 12:11:16 +0100 Subject: [PATCH 1/2] Create Package.swift --- Package.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..bc96b82 --- /dev/null +++ b/Package.swift @@ -0,0 +1,19 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "AdaEmbedFramework", + defaultLocalization: "en", + products: [ + .library( + name: "AdaEmbedFramework", + targets: ["AdaEmbedFramework"] + ), + ], + targets: [ + .target( + name: "AdaEmbedFramework", + path: "EmbedFramework" + ) + ] +) From 75f453d7825662c09e9778f79ee197f8a31da116 Mon Sep 17 00:00:00 2001 From: Mario Nachbaur Date: Wed, 2 Apr 2025 12:50:45 +0200 Subject: [PATCH 2/2] Fix Storyboard load in a Swift Package And correctly set the view controller's ID in the Storyboard itself. --- EmbedFramework/AdaWebHostViewController.storyboard | 6 +++--- EmbedFramework/OfflineViewController.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EmbedFramework/AdaWebHostViewController.storyboard b/EmbedFramework/AdaWebHostViewController.storyboard index 05661d9..fb7c1d4 100644 --- a/EmbedFramework/AdaWebHostViewController.storyboard +++ b/EmbedFramework/AdaWebHostViewController.storyboard @@ -1,9 +1,9 @@ - + - + @@ -26,7 +26,7 @@ - + diff --git a/EmbedFramework/OfflineViewController.swift b/EmbedFramework/OfflineViewController.swift index 6e59565..d77e604 100644 --- a/EmbedFramework/OfflineViewController.swift +++ b/EmbedFramework/OfflineViewController.swift @@ -27,7 +27,7 @@ class OfflineViewController: UIViewController { storyboard = UIStoryboard(name: "AdaWebHostViewController", bundle: frameworkBundle) } else { // Used for if SDK was manually imported - storyboard = UIStoryboard(name: "AdaWebHostViewController", bundle: bundle) + storyboard = UIStoryboard(name: "AdaWebHostViewController", bundle: .module) } return storyboard.instantiateViewController(withIdentifier: "OfflineViewController") as? OfflineViewController }