SwiftyRSA icon indicating copy to clipboard operation
SwiftyRSA copied to clipboard

Support Swift Package Manager

Open bednarj4 opened this issue 4 years ago • 14 comments

Very simple support for SPM, just a new library product for SwiftyRSA. There are ways to cheese Obj-C code into a package, but migrating the single Objective-C class seemed more straightforward. Tested with Xcode 11.7 and 12.0.1

bednarj4 avatar Oct 07 '20 06:10 bednarj4

Hello, i have this error on app startup :

dyld: Library not loaded: @rpath/SwiftyRSA.framework/SwiftyRSA
  Referenced from: /private/var/containers/Bundle/Application/2787A571-AF63-4955-A48B-CAA0D60C5216/App.app/App
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

shuguenot avatar Nov 13 '20 11:11 shuguenot

Hello @shuguenot , is SwiftyRSA added as a dependency to the app directly or a dependency of the app?

bednarj4 avatar Nov 13 '20 11:11 bednarj4

Hello @shuguenot , is SwiftyRSA added as a dependency to the app directly or a dependency of the app?

Directly added as a dependency

Package.resolved

{
     "package": "SwiftyRSA",
     "repositoryURL": "https://github.com/bednarj4/SwiftyRSA",
     "state": {
       "branch": "master",
       "revision": "c18eb3c617bc087eb4d48bf910ae704e865ac5c8",
       "version": null
     }
   },

shuguenot avatar Nov 13 '20 11:11 shuguenot

Please check if in the Xcode's target settings > General tab > Frameworks, Libraries and Embedded Content SwiftyRSA is marked as Embed & Sign. Because for my own purposes I had to make the library dynamic it has to be explicitly marked as delivered with the application. @shuguenot

bednarj4 avatar Nov 13 '20 11:11 bednarj4

Thanks @bednarj4 it's working 👍

shuguenot avatar Nov 13 '20 14:11 shuguenot

@pmacro Any updates here? Would like to switch to SPM using official repo.

lexon avatar Dec 11 '20 11:12 lexon

Any updates? Is this library dead?

lexon avatar Jan 06 '21 14:01 lexon

Is there an update on this? It doesn't seem possible to add SwiftyRSA using SPM. Currently getting the error:

has no package.swift manifest in https://github.com/TakeScoop/SwiftyRSA

FitzAfful avatar Dec 17 '21 04:12 FitzAfful

Is there an update on this? It doesn't seem possible to add SwiftyRSA using SPM. Currently getting the error:

has no package.swift manifest in https://github.com/TakeScoop/SwiftyRSA

You can actually add this, but requires a bit of an extra step.

  1. Add the package as you normaly would and enter URL https://github.com/bednarj4/SwiftyRSA
  2. It will auto switch to the original URL (TakeScoop) and complain, it will ask you "Add Anyway?"
  3. Pres add anyway, which will cause it to add, but not download
  4. Go into your project file, show content, drill down and find the file inside xcodeproj>xworkspace->xsshareddata>swiftpm->Package resolved.
  5. Add the rules @shuguenot shuguenot wrote
  6. Close your project and re-open
  7. Go to frameworks and search for SwiftyRSA and add it, set to EMBED & SIGN

Now you can compile and include it. If you don't embed and sign, you will get a crash.

renevdkooi avatar Dec 31 '21 05:12 renevdkooi

Your structured solution worked for me. Thanks @renevdkooi 🙏🏾

FitzAfful avatar Jan 05 '22 02:01 FitzAfful

Hi @bednarj4 could you resolve the conflict then we can get approve and merge.

bigbangvn avatar Jan 21 '22 09:01 bigbangvn

Hi @bednarj4 Have you had the chance to review the conflicts? Thanks!

glennposadas avatar Apr 08 '22 19:04 glennposadas

Any chance this is still on the radar somewhere to be fixed??

reshadf avatar Apr 11 '22 08:04 reshadf

@glennposadas please see the new PR when you get a chance - thanks!

ThrownToys avatar Apr 21 '22 21:04 ThrownToys

merged from https://github.com/TakeScoop/SwiftyRSA/pull/231. Thanks for adding this support @bednarj4

pc-scoop avatar Nov 11 '22 00:11 pc-scoop