GithubHelp home page GithubHelp logo

Comments (6)

Flash3001 avatar Flash3001 commented on September 12, 2024

Hey @JFDionne .

That happens when the library you are using was not compiled using the latest Xcode version.

When you add the SwiftSupport library it is just adding the Swift runtime to your app. So when you have a library that was built against Swift 4.0 or Swift 2.0 it shouldn't work on a 4.1.2 runtime. That kind of stuff breaks even on point releases.

If you have access to Polyline.framework source code, just open it on Xcode and recompile and redo the binding. If it is not the case then you have to ask the library maintainer to do it. Otherwise, the solution is to downgrade Xcode and SwiftSupport to the previous version you were using.

All 3 needs to upgrade together: Library Swift version = SwiftSupport version = Xcode on the build server version.

Before updating you had the library and SwiftSupport on the same version, but Xcode was newer. So the package_ipa Script would cause your app to have one version of the Swift runtime on the MyApp.api/SwiftSupport folder and another version in MyApp.api/Payload/MyApp.app/Frameworks folder.

After the update the 2 matches, but not the library itself.

from xamarin.swift.

JFDionne avatar JFDionne commented on September 12, 2024

Oh, I see thank.

Any chance you know which version of xcode can work with the "old" version?

from xamarin.swift.

Flash3001 avatar Flash3001 commented on September 12, 2024

Sure. You can check that on the Release Notes for each Nuget package.

https://www.nuget.org/packages/Xamarin.Swift4.Core/4.2.1.1

On this link you can find the History Version. On it the first 3 number match the exact Swift version it was built for and the Release notes says which is the version of Xcode you want.

Let's say you pick https://www.nuget.org/packages/Xamarin.Swift4.Core/4.1.2

4.1.2 = Xcode 9.4

https://www.nuget.org/packages/Xamarin.Swift4.Core/4.2.0

4.2.0 = Xcode 10
4.2.1.1 = Xcode 10.1

from xamarin.swift.

JFDionne avatar JFDionne commented on September 12, 2024

Thanks !

from xamarin.swift.

andrew-nemtsev avatar andrew-nemtsev commented on September 12, 2024

xcode 10.2 already released (and referenced issue were solved by installing of 10.1).
Can we expect release of Xamarin.Swift4 4.2.1.2 ?

from xamarin.swift.

Flash3001 avatar Flash3001 commented on September 12, 2024

@andrew-nemtsev Xcode 10.2 brings support for Swift 5.

The current release strategy for this project up to this point was for each major Swift release I would wrap each individual dylib into a Nuget package and release it + 1 MSBuild script. (total of 43 packages for Swift 4) and for each Xcode/Swift update a new minor version for the 42 packages. It was working so far, but Swift 5 brought some changes and I wanted to change how the MSBuild script works. The new package will be:

  • a single Nuget package (no need to download a bunch of heavy packages)
  • works for iOS with experimental support for macOS and tvOS
  • any version of Xcode/Swift should work with the same script (the script will check if your Xcode version is compatible with your libraries) so this project doesn't need to be updated when a new Xcode is released (libraries built before Swift 5 will have to).
  • it will remove architectures from the Swift dylibs your app doesn't need.
  • it will include the SwiftSupport folder on the IPA during the normal build, no need to run the package_ipa.sh script.
  • if the library is built using Swift 5 and your app has a minimum target of iOS 12.2 then no Swift runtime library is included as iOS 12.2 already comes with it.

All the code is already in place, but I need to do more testing before pushing it to Nuget (you can check it here https://github.com/Flash3001/Xamarin.SwiftSupport/tree/master/SwiftSupport)

from xamarin.swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.