superpoweredSDK / Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform

🇸Superpowered Audio, Networking and Cryptographics SDKs. High performance and cross platform on Android, iOS, macOS, tvOS, Linux, Windows and modern web browsers.
https://superpowered.com
1.33k stars 285 forks source link

iOS: support cocoapods and carthage #457

Closed arielelkin closed 6 years ago

arielelkin commented 6 years ago

Like any other 3rd party library, Superpowered should build in a single step if you drag and drop it in an xcode project. this is currently not the case.

Cocoaheads and carthage are the industry-standard dependency managers for iOS, it would be very useful to be able to integrate Superpowered into an iOS project via them.

superpoweredSDK commented 6 years ago

What is Cocoaheads? How is it difficult to drag-and-drop the Superpowered .a and the header files into your project?

arielelkin commented 6 years ago

What is Cocoaheads?

I meant to write Cocoapods (updated the issue's title) (sorry about that). (Cocoaheads is an international meetup group for Apple developers which I recently went to).

How is it difficult to drag-and-drop the Superpowered .a and the header files into your project?

Here's what happens after you just drag and drop the .a and the header files into an iOS xcode project:

  1. SuperpoweredWindowsAudioIO.cpp:1:10: 'pch.h' file not found. So you have to delete SuperpoweredWindowsAudioIO.cpp
  2. SuperpoweredAndroidAudioIO.cpp:2:10: 'SLES/OpenSLES.h' file not found. So you have to delete SuperpoweredAndroidAudioIO.cpp and the whole AndroidIO/ folder
  3. SuperpoweredNBandEQ.cpp:1:10: 'SuperpoweredFilter.h' file not found with <angled> include; use "quotes" instead So you have to edit the quotes manually.
  4. SuperpoweredOSXAudioIO.h:1:9: 'Cocoa/Cocoa.h' file not found so you have to delete SuperpoweredOSXAudioIO.h
  5. Delete SuperpoweredOSXAudioIO.mm
  6. Apple Mach-O Linker Error
  7. Clean the project. Build again.
  8. 1.Apple Mach-O Linker Error Group ld: library not found for -lSuperpoweredAudioOSX` huh? Let's check "Link Binary with Libraries" image
  9. delete all those libraries except libSuperPoweredAudioIOS.a
  10. Build.
  11. Apple Mach-O Linker Error
  12. Clean. Build again.
  13. Apple Mach-O Linker Error ld: library not found for -lSuperpoweredAudioIOS

If it takes more than 15 minutes to integrate a library, it's usually a good idea to make it compatible with a package manager. It's also the convention on iOS, see for example these other audio libraries which are compatible with carthage and cocoapods: https://github.com/benzguo/MusicKit https://github.com/vadymmarkov/Beethoven https://github.com/AudioKit/AudioKit

superpoweredSDK commented 6 years ago

Well, yeah, if you drag-and-drop everything, including files meant for other platforms, then you have a problem. But why would you do that... ?

arielelkin commented 6 years ago

Because there are no installation instructions.

What is the advantage of not including installation instructions for iOS and not supporting Cocoapods or Carthage?

superpoweredSDK commented 6 years ago

Superpowered is a classic static library. We expect our users (the developers) know how to use static libraries, just like we also expect them knowing how to compile and link software. Therefore there is no "installation".

We are working on better documentation and tutorials, because we understand that these prerequisites may not be convenient. However unlike many other libraries, Superpowered is not a wrapper and supplement around stuff, but a novel technology with the highest performance and stability, therefore our focus is around those.

We try to stay away from the "bells and whistles" of software development, because one can easily spend a lot of energy on quickly disappearing/outdated stuff, identically to the madness around JavaScript libraries. We consider Xcode as the "industry standard" for iOS development and not third-party tools. We don't use similar "helper tools" in our environment, so we don't have expertise around Cocoapods or Carthage.

Thank you making us aware of Cocoapods and Carthage. We'll include support for those later this year.

arielelkin commented 6 years ago

Indeed, it's important to avoid unnecessary bells and whistles, and I'm glad we agreed that supporting standard dependency managers is not superfluous.

superpoweredSDK commented 6 years ago

I still do not agree that they are "standard". Apple didn't recognize them officially.

arielelkin commented 6 years ago

There is no standard native package manager for iOS. Which is precisely why Cocoapods and Carthage are the de facto standard and all widely used third-party libraries support them:

https://firebase.google.com/docs/ios/setup https://github.com/Alamofire/Alamofire https://realm.io/docs/swift/latest/#getting-started

ptrkstr commented 4 years ago

I assume this was added because I can see this: https://github.com/superpoweredSDK/Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform/blob/master/Superpowered/libSuperpowered.podspec

@arielelkin did you try this?

arielelkin commented 4 years ago

Nope, but thanks anyway.