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

Symbol not found after update to the last version on nuget #21

Closed
JFDionne opened this issue Nov 21, 2018 · 6 comments
Closed

Symbol not found after update to the last version on nuget #21

JFDionne opened this issue Nov 21, 2018 · 6 comments

Comments

@JFDionne
Copy link

Hi, I just upgrade to the last version becuase of the invalid swift we refuse from apple, that been fixed, but now I have this error when I start my app:

Termination Description: DYLD, Symbol not found: __T0SSN |
Referenced from: /private/var/containers/Bundle/Application/5C604E0F-FF5F-4413-A4D0-36731FA94CF2/SIV_Lite.iOS.app/Frameworks/Polyline.framework/Polyline |
Expected in: /private/var/containers/Bundle/Application/5C604E0F-FF5F-4413-A4D0-36731FA94CF2/SIV_Lite.iOS.app/Frameworks/libswiftCore.dylib |
in /private/var/containers/Bundle/Application/5C604E0F-FF5F-4413-A4D0-36731FA94CF2/SIV_Lite.iOS.app/Frameworks/Polyline.framework/Polyline

Did you removed Symbol from your last version?

@Flash3001
Copy link
Owner

Flash3001 commented Nov 21, 2018

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.

@JFDionne
Copy link
Author

Oh, I see thank.

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

@Flash3001
Copy link
Owner

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

@JFDionne
Copy link
Author

Thanks !

@andrew-nemtsev
Copy link

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 ?

@Flash3001
Copy link
Owner

@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)

@Flash3001 Flash3001 mentioned this issue Apr 1, 2019
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

3 participants