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 #130

Closed
rextremotabaresDtt opened this issue Sep 15, 2020 · 40 comments
Closed

Swift Package Manager support #130

rextremotabaresDtt opened this issue Sep 15, 2020 · 40 comments

Comments

@rextremotabaresDtt
Copy link

Hello,
my company has a paid account for Opentok and I'm migrating our App dependencies to SPM. OpenTok is using Cocoapods but I'm wondering if there are any plans to allow integration with Swift Package Manager (which is getting more and more support from Apple itself such as supporting binary libraries ) or if it's already done how can we configure the dependency for Opentok.
Thank you

@xezero
Copy link

xezero commented Oct 12, 2020

+1 on SPM support!

@Aida-p
Copy link

Aida-p commented Oct 26, 2020

@rextremotabaresDtt @xezero thanks for your interest on SPM support, I filled the product request for this feature.

Thanks,
Aida

@hkellaway
Copy link

hi @Vonage-Aida 👋 any movement on this one? thanks!

@egarni
Copy link

egarni commented Apr 15, 2021

+1 for adding SPM support! OpenTok is the only dependency I have not supporting SPM =^(

@DogeWowzie
Copy link

@egarni same here, Opentok is the only dependency blocking me from removing CocoaPods completely. Are there any plans to add SPM support?

@Bastianowicz
Copy link

@DogeWowzie same here. This is a serious problem to us and we have to evaluate other providers in case this cannot be resolved. What are your plans regarding this issue?

@jweg29
Copy link

jweg29 commented Jun 14, 2021

@Vonage-Aida @abdulajet is there any timeline for supporting Apple's Swift Package Manager? Similar to what others have said OpenTok is the only dependency in my project that has not added support yet.

@abdulajet
Copy link
Contributor

I can bump the request with engineering. Thanks for the patience

@DRK1004
Copy link

DRK1004 commented Jun 25, 2021

+1 for adding SPM support! Is there any expected timeline for supporting SPM?

@mehmetbaykar
Copy link

+1 for adding SPM support!

@samitaha2
Copy link

+1 for adding SPM support

@vidueirof
Copy link

+1 SPM support

@rextremotabaresDtt
Copy link
Author

Any update on this?

@mvarie
Copy link

mvarie commented Dec 1, 2021

+1 for adding SPM support

@Lontronix
Copy link

Would love to see SPM support added as well.

@jffmrk
Copy link

jffmrk commented Jan 12, 2022

+1 🤞

@ben-p-commits
Copy link

Yes please!

@victormarcias
Copy link

+1 for adding SPM support

@falkobuttler
Copy link

+1 here. Unfortunately, the latest versions of OpenTok or OTXCFramework do not seem to work with Xcode on M1 Macs, while SPM packages of incompatible CocoaPods packages worked fine.

@MattKiazyk
Copy link

👍 Please for SPM Support. Like others, Opentok is the only dependency in the project not supported

@ben-p-commits
Copy link

@Vonage-Aida - is there any timeline for spm support?

@Nikojoel
Copy link

+1 SPM support

@MattKiazyk
Copy link

Looks like (a first step at least) is coming with 2.23.0 - https://tokbox.com/developer/sdks/ios/

Version 2.23.0 of the SDK will not be packaged as a universal FAT framework. It will be packaged as an XCFramework.

@murillotomas
Copy link

murillotomas commented May 12, 2022

Come on OpenTok. It has been 1.5 years already since this was requested and no sight on the horizon for SPM yet.
On top of that you guys make money with this. You should be taking a little bit more care of your customers.

@maxxfrazer
Copy link

maxxfrazer commented May 16, 2022

Seems swiftpm isn't happening for opentok (yet).
It does work with Agora.io though for almost a year now (I work there, full disclosure), maybe the opentok team would find the motivation if others are doing it already 😉

Also works fully with M1 Macs - why do some businesses find this requirement so hard to meet? 🤷

@samitaha2
Copy link

Agora probably has less bugs too

@ben-p-commits
Copy link

@Vonage-Aida any roadmap updates on SPM support?

@tumata
Copy link

tumata commented Jun 9, 2022

+1 for adding SPM support

@MattKiazyk
Copy link

Looks like (a first step at least) is coming with 2.23.0 - https://tokbox.com/developer/sdks/ios/

Version 2.23.0 of the SDK will not be packaged as a universal FAT framework. It will be packaged as an XCFramework.

Looks like this didn't happen! 😢

@tumata
Copy link

tumata commented Jul 26, 2022

@MattKiazyk The XCFramework looks available but is lacking some architectures (if I remember well, the M1 Simulator).

See: https://github.com/opentok/opentok-ios-sdk-samples/blob/main/Basic-Video-Chat-XCFramework/Podfile

@samitaha2
Copy link

So is this happening?

@MattKiazyk
Copy link

Can I say please?

@DogeWowzie
Copy link

DogeWowzie commented Sep 17, 2022

Can confirm own Swift Package from OpenTok.xcframework works only on Intel Macs (tested running on Simulator and Real Devices). Without Rosetta you will only be able to compile on a real device when working on a Apple silicon MBP.

Within Basic-Video-Chat-XCFramework I just ran pod install and created an own swift package with the OpenTok.xcframework output located in Pods/OTXCFramework.

I placed it in the main directory of my swift package and added following manifest:

let package = Package( name: "OpenTok", platforms: [ .iOS(.v12) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "OpenTok", targets: ["OpenTok"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), ], targets: [ .binaryTarget(name: "OpenTok", path: "OpenTok.xcframework") ] )

I wanted to host this package for everyone to download, but upload limit of Github is not allowing me to do so. Was able to upload my package on the private company server though.

Instead of dropping the huge OpenTok.xcframework into your swift package directory you can also host a zip file of it and reference the url in your manifest like so:

.binaryTarget(name: "OpenTok", url: <YourURL>, checksum: <YourChecksum>

Bildschirmfoto 2022-09-17 um 21 21 22

@maxxfrazer
Copy link

@DogeWowzie with the M1 simulator? That's the piece that wasn't working.

The xcframework from the pod location (https://s3.amazonaws.com/artifact.tokbox.com/rel/otkit-ios-sdk-xcframework/OpenTok-iOS-2.23.1.tar.bz2) doesn't have the right architectures

@DogeWowzie
Copy link

DogeWowzie commented Sep 18, 2022

@DogeWowzie with the M1 simulator? That's the piece that wasn't working.

The xcframework from the pod location (https://s3.amazonaws.com/artifact.tokbox.com/rel/otkit-ios-sdk-xcframework/OpenTok-iOS-2.23.1.tar.bz2) doesn't have the right architectures

Thanks for pointing out my mistake. Unfortunately I forgot to uncheck "open with Rosetta" yesterday.

When run on a M1 simulator, I receive following errors:
Bildschirmfoto 2022-09-18 um 18 07 37

file is universal (i386.x86 64) but does not contain the arm64 architecture

Background: Simulator ARM64 Support for Static Libraries in M1 Machines - https://developer.apple.com/forums/thread/673387?answerId=685907022#685907022

@DogeWowzie
Copy link

Simulators run on a M1 with iOS 13.7 or below work though (they don't have an arm64 executable)

@murillotomas
Copy link

I got my reply here:
opentok/opentok-ios-sdk-samples#258 (comment)

Apparently they are not supporting SPM...

@MattKiazyk
Copy link

In Xcode 14.3 (currently in Beta). Apple has removed support for Xcode running under Rosetta. Hope including arm64 is available soon!

image

@vona-ben
Copy link

vona-ben commented May 2, 2023

Note: We are currently working on an iOS SDK Swift Package Manager, which will be available soon. I will keep you updated on the progress in this thread

@czoli1976
Copy link

czoli1976 commented May 15, 2023

iOS SDK Version 2.25.1 -- May 2023

  • Added support for Swift Package Manager.
  • This version removes support for FAT binaries.
  • This version fixes linker errors when an application uses multiple WebRTC libraries.
  • This version fixes some memory leaks.
  • This version fixes an issue where occasionally the app would crash if it was publishing for a very long time.

You can add the Vonage Client SDK Video iOS by adding the https://github.com/opentok/vonage-client-sdk-video.git repository as a Swift Package Dependency.

CC: @rextremotabaresDtt @mvarie @Vonage-Aida
@hkellaway @egarni garni @DogeWowzie @Bastianowicz @jweg29 @abdulajet @DRK1004 @mehmetbaykar @samitaha2 @vidueirof @mvarie @Lontronix @jffmrk @ben-p-commits @victormarcias
@falkobuttler @MattKiazyk @murillotomas @maxxfrazer @tumata

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

No branches or pull requests