1 Reply
      Latest reply on Feb 13, 2020 1:12 PM by garethw_silicondust
      NMull Level 1 Level 1 (0 points)

        Hello, Iv seen this asked multiple times but the answers seem to be conflicting and never definitive.


        I am 99% sure this is not possible but I just want a definitive answer. Are .dylib files , allowed to be uploaded to the App Store in any way? Embedded in an App? Embedded in a Framework? Added in a bundle and copied?  Is there a way to get apple to approve the dylib?


        I am producing a c library and compiling it into a .so file for linux and a .dylib for iOS. I then created a small app to use the .dylib and it runs as expected locally on my phone. When I try to submit it to the App Store to test on test flight it gives the following error


        "Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it."


        Which is vague and eventually found out the App Store for iOS doesn't allow dylibs, until iOS 8 (which I now assume is only locally? ).


        After alot of googling and finding conflicting answers I came across this https://developer.apple.com/library/archive/technotes/tn2435/_index.html


        which says

        "The following errors may indicate your app is embedding a dynamic library that is not packaged as a framework. Dynamic libraries outside of a framework bundle, which typically have the file extension .dylib, are not supported on iOS, watchOS, or tvOS, except for the system Swift libraries provided by Xcode."


        Which seems to imply .dylibs are allowed if they are within a framework? I can't find any definitive answers and I have read in several places that you can place .dylibs inside a framework and it will be accepted but I have been unable to get that to work.


        If anyone has a definitive answer and maybe a source from apple that would be great thanks!

        • Re: Uploading dylib to the iOS App Store?
          garethw_silicondust Level 1 Level 1 (0 points)

          reply is late but yes: static and dylibs can be submitted to the app store but they MUST be packaged inside of a framework.
          We do this for ffmpeg .a files.

          add a new framework target to your app and bundle the libraries inside of it.

          then for your main app target, ensure that the framework you created is included as a needed framework