Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Package Manager support #225

Closed
ajevans99 opened this issue May 21, 2020 · 24 comments · Fixed by #243 or #290
Closed

Swift Package Manager support #225

ajevans99 opened this issue May 21, 2020 · 24 comments · Fixed by #243 or #290
Assignees

Comments

@ajevans99
Copy link

Are there any plans to support Swift Package Manager?

https://swift.org/package-manager/#conceptual-overview

@IldarAbdullin-okta
Copy link
Contributor

Hi @ajevans99 ,

Thanks for creating this ticket. This library is a great candidate for SPM since there are no pod dependencies on 3rd party libs. So, yes, we would like to add support of SPM in near future

Thanks,
Ildar

@sam-w
Copy link

sam-w commented Jul 7, 2020

+1 to this please!

@IldarAbdullin-okta
Copy link
Contributor

Created story ticket in our internal bug tracking system. We will do our best to implement this in August

@csfelipe
Copy link

+1 on this (:

@lukenewman
Copy link
Contributor

#237

@ryanthon
Copy link

Any idea on when this will be pulled in?

@EricDobyns
Copy link

^^

@IldarAbdullin-okta
Copy link
Contributor

On master. Tag: 3.9.1

@sam-w
Copy link

sam-w commented Sep 21, 2020

@IldarAbdullin-okta I think this issue needs to be re-opened. SwiftPM is definitely not working for me (on Xcode 12 GM). There's a lot more work to do in this repo than just adding the Package.swift file. (see this WIP PR: #245)

What I see when trying to pull in master with SwiftPM:

Screen Shot 2020-09-21 at 12 43 04 pm

@sam-w
Copy link

sam-w commented Sep 21, 2020

For anyone else following this thread and experiencing the same, see #245 for a possible solution.

@IldarAbdullin-okta
Copy link
Contributor

I was too excited with the contribution that totally forgot to test it before merge, my bad. This project is multi-language and therefore require more complicated structure in Package.swift. On high level it should declare:

  • Core library in Objective-C
  • Swift part that uses Core as a dependency
    This also require some restructure in files hierarchy as Swift wrapper also contains some Objective-C files. Also MacOS support adds some complexity

@sam-w , I've noticed that you opened contribution PR. Thanks for looking into this!

@sam-w
Copy link

sam-w commented Sep 21, 2020

😂 fair enough @IldarAbdullin-okta. The PR I've opened doesn't get us all the way there, and I'm currently not able to spend any more time on this. Other contributions welcome

@IldarAbdullin-okta
Copy link
Contributor

I've brought this to the team's attention today. The decision was made that team will start looking into it next week!

@jcgonlop
Copy link

Hey guys, could you give us an update on this issue? Is there any ETA when this will be fixed? We are currently working on migrating to SPM and this is kind of a blocker.

@IldarAbdullin-okta
Copy link
Contributor

Hi @jcgonlop ,

The decision was made to address SPM feature in November.
cc @lihaoli-okta

Ildar

@Nonnus
Copy link

Nonnus commented Oct 30, 2020

+1 for SPM support

@mikenachbaur-okta
Copy link
Collaborator

Swift Package Manager support was introduced in #254 and is available in the 3.9.3 release. If you have any problems with using SPM, please let us know.

@Antoine4011
Copy link

Antoine4011 commented Jan 4, 2021

Hello @mikenachbaur-okta, unfortunately I think I still have an issue with the integration. We're using OktaOidc through an other Swift Package, not directly in the final app.

Everything builds fine but when launching the app :

dyld: Library not loaded: @rpath/OktaOidc.framework/OktaOidc
  Referenced from: /private/var/containers/Bundle/Application/EFD45359-65C4-4F46-ADEE-35DB72F3CE4E/Sample.app/Sample
  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
(lldb) 

The only fix we found so far is to generate an xcframework to not have to generate a dynamic package. I found this interesting from the Stripe folks. stripe/stripe-ios#1671

Any help would be appreciated 🙏

@mikenachbaur-okta
Copy link
Collaborator

Interesting @Antoine4011, would you be able to share which package it is that's pulling OktaOidc in as a dependency? I'll try to reproduce that locally here to see what we can do to solve this.

Thank you

@jinahadam
Copy link

would love this, specially with the current state of Carthage.

@sjmadsen
Copy link

sjmadsen commented Apr 19, 2021

I'm having the same problem as @Antoine4011, where the app builds fine, but crashes at launch with the @rpath error. In our case, the package that's pulling in OktaOidc is an internal Swift package that holds common logic across two of our apps.

Update: stripe-ios#1670 sounds like exactly the same issue, and it appears that they fixed it by removing the explicit .dynamic from their library target definition in Package.swift.

@oleggnidets-okta oleggnidets-okta linked a pull request Apr 20, 2021 that will close this issue
@sjmadsen
Copy link

sjmadsen commented May 3, 2021

Thanks for fixing this in master. It looks like the 3.10.2 release tag added last week excludes that commit. Was that intentional and do we need to wait for 3.10.3?

@oleggnidets-okta
Copy link
Contributor

@sjmadsen The issue was closed automatically by GitHub when the PR has been closed.
We'll release the update soon.

@oleggnidets-okta
Copy link
Contributor

oleggnidets-okta commented May 6, 2021

@sjmadsen Please, check out the version 3.10.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet