Giter VIP home page Giter VIP logo

xamarin.swift's People

Contributors

flash3001 avatar olexale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin.swift's Issues

Xamarin.Mac support

Hi, I'm trying to distribute a Swift 5 Framework with macOS target and wrapping it using Xamarin.Mac, however I need to include support for macOS 10.12 & 10.13 which doesn't have Swift standard libraries provided by the OS.

Is it possible to use the Xamarin.Swift tool in order to include the Swift standard libraries needed to run in the target app for older macOS versions? If so, can I have instructions on how to do that?

Thanks!

Paths to swift dylibs are different in XCode 11

Old paths were:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos

New paths are:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphoneos

ipa-packager and sh file for Swift 5.0

For Swift 3 i ran the script: sh package_ipa_default.sh /path/to/signed/app /output/ipa/path

now that i am integrating Swift 5.0 what will the sh file be and will there be any change in the script?

Binding Xamarin.Swift4

Can you binding a new update for Xamarin.Swift4, i have XCode 9.3.2 and Swift 4.0.3, everything work fine but i can extract and copy lib to upload app to appstore

Invalid Swift Support - The files libswiftos.dylib, libswiftCoreGraphics.dylib, libswiftQuartzCore.dylib, libswiftCoreFoundation.dylib, libswiftCore.dylib, libswiftFoundation.dylib, libswiftCoreImage.dylib, libswiftCoreMedia.dylib, libswiftCoreData.dylib, libswiftMetal.dylib, libswiftDarwin.dylib, libswiftCoreAudio.dylib, libswiftUIKit.dylib, libswiftDispatch.dylib, libswiftObjectiveC.dylib don’t match /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftos.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftQuartzCore.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCore.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftFoundation.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreImage.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreMedia.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreData.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftMetal.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftDarwin.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreAudio.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftUIKit.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftDispatch.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftObjectiveC.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftos.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftQuartzCore.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCore.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftFoundation.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreImage.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreMedia.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreData.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftMetal.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftDarwin.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftCoreAudio.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftUIKit.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftDispatch.dylib, /Payload/bxoiCrypto.iOS.app/Frameworks/libswiftObjectiveC.dylib.

Error uploading IPA to apple

Hi, I'm trying to submit an application to apple, but I got those error from Apple:

	ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'App.iOS.app/SwiftFrameworksSimulator/libswiftCoreMedia.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

	ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'App.iOS.app/SwiftFrameworksSimulator/libswiftCoreMedia.dylib' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."

Is there something I'm doing bad?

Attempting to JIT compile method ... while running in aot-mode only

I've basically tried to copy the steps you've made in your stackoverflow help post, and look at your sample project. Almost there I reckon, but come across one minor speedbump I think. Did you ever see or come across a similar runtime error ?

System.ExecutionEngineException: Attempting to JIT compile method 'SwiftUI.TestModel:.ctor ()' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.

Leveraging this for macOS targets?

I'm curious if you know whether this work could be used directly (or adapted somehow) for macOS target applications? I am getting a lot of the same errors as would be expected when trying to use a Swift3 based framework for a macOS target and it seems like the basic concept to getting bindings, etc. to work would be the same. Or am I maybe underestimating some additional challenges there?

Not being able to deploy/debug on iOS versions prior to 12.2

Hi, first of all thanks for this amazing package.
I noticed that when using Xamarin.Swift 1.0.2 Nuget Package and debugging on a device with iOS 12.2 or higher, my binding is working perfectly.
But when deploying to older versions of iOS 12.1 or prior, it breaks with a missing dylib message, in my case:

dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib

Im using PackageReference and I can see the _SwiftFrameworksMac target being executed in the build output.

I get an Installed version of 5.0.1 and I can see that the Native Framework im binding is on the list and has the swift header on the h file.

Any tip or step im missing to be able to deploy it to older versions of iOS?

msbuild command line build does not add SwiftSupport folder

Thank you for creating and sharing this project, it has been of great value to me and my team!

Up to now I have been archiving my builds manually through Visual Studio for Mac and everything works great.

From now on, however, I would like to build from the command line, but I noticed that the build targets that you created (_SwiftFrameworksMac, _SwiftSupportIPA, _SwiftSupportArchive) don't seem to be executed with msbuild.
At least i don't see them in the output of msbuild and the created ipa does not include the SwiftSupport folder.

msbuild MyProject.sln \
/p:Configuration="Release" \
/p:Platform="iPhone" \
/p:BuildIpa="true" \
/p:ArchiveOnBuild="true" \
/t:Clean,Build

Maybe I'm just missing something here, can you give me a hint, please?

ITMS-90428: Invalid Swift Support - The files.... dont match

I get the above error when I try to submit my app to the Store.
I use the latest VS (8.1.1), latest xCode (10.2.1) and the latest Xamarin.Swift.
I also used the auto_package_ipa script too, since the "SwiftSupport" folder was not there after the build.

I checked the dylibs:

  • The dylib file versions match (v5.0.1) both in "SwiftSupport" and "Frameworks" folders
  • The dlybs in "SwiftSupport" folder contain 4 architectures: armv7, armv7s, arm64, arm64e
  • The dlybs in "Framework" folder contain 1 architecture: arm64

The README.md here says, that the included architectures should match. How to achieve this?

Binding piwikTracker library error libswiftCore.dylib Xamarin

Hi Lucas,
i create the binding about piwikTracker library write in Swift and integrated the dll in xamarin project, in debug everything works.

But when i create the ipa for release mode, when launched the app crashed.

Below the error:

Launched application on 'iPhone' with pid 2234 Application terminated. dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/containers/Bundle/Application/75ABA1AA-2240-45F2-A224-A5BB4E947549/APP/Frameworks/PiwikTracker.framework/PiwikTracker Reason: image not found

How can i solve the problem??

Many thanks

swift dylib files are not included into IPA

I moved to Xamarin.Swift package due to startup crash on 12.2 only devices (observed for Xamarin.Swift4 package).
After adding Xamarin.Swift and removing old Xamarin.Swift4 packages app is running fine on iOS 12.2, but failed to start on iOS 12.1 and lower.

Build log:

Target _SwiftFrameworksMac:
...
Installed: 5.0
Target _SwiftSupportIPA:
...
Installed: 5.0
Target _PackageOnDemandResources:
Directory "obj/iPhone/Release - DEV/ipa/Payload/OnDemandResources/" doesn't exist. Skipping.
Target _ZipIpa:
/usr/bin/zip -r -y "/Volumes/Portable/projects/project/MobileClient/bin/iPhone/Release - DEV/project.ipa" Payload SwiftSupport

otool output for binding framework:

name @rpath/libswiftAccelerate.dylib (offset 24)
name @rpath/libswiftCore.dylib (offset 24)
name @rpath/libswiftCoreAudio.dylib (offset 24)
name @rpath/libswiftCoreData.dylib (offset 24)
name @rpath/libswiftCoreFoundation.dylib (offset 24)
name @rpath/libswiftCoreGraphics.dylib (offset 24)
name @rpath/libswiftCoreImage.dylib (offset 24)
name @rpath/libswiftCoreLocation.dylib (offset 24)
name @rpath/libswiftDarwin.dylib (offset 24)
name @rpath/libswiftDispatch.dylib (offset 24)
name @rpath/libswiftFoundation.dylib (offset 24)
name @rpath/libswiftMetal.dylib (offset 24)
name @rpath/libswiftObjectiveC.dylib (offset 24)
name @rpath/libswiftQuartzCore.dylib (offset 24)
name @rpath/libswiftUIKit.dylib (offset 24)
name @rpath/libswiftos.dylib (offset 24)

I can see Swift targets at build log but SwiftSupport folder is not created inside of IPA.

Following message can be seen at pre iOS 12.2 devices when app is crashed:

symptomsd Attempt to add an app with insufficient id, info

Large increase in IPA size

I updated our app to use a new 3rd party SDK, which uses Swift. Found it ran fine on iOS 12 but crashed on startup for iOS 10 and 11. Discovered that missing swift was the reason and used your library, which fixed the issue. 👍

However, our IPA used to be around 78MB, it's now 138MB, just from adding the Xamarin.Swift nuget package.

Is this right? Why does it add so much bloat?

with Xamarin.Swift version 4.0.0.2 I'm no more able to install the app on device

with Xamarin.Swift version 4.0.0.2 I'm no more able to install the app on a device. I get the error

"ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.23HY8f/extracted..... : 0xe8008015 (A valid provisioning profile for this executable was not found.)
error MT1006: Could not install the application ...... on the device 'iPhone XS 01': AMDeviceSecureInstallApplicationBundle returned: 0xe8008015."

in the Deploying to Device log.

I could fix it when I downgrade back to 4.0.0.1.

It only happens in release mode with real devices.

XCode 10.2 and Swift 4.2

I would like to use external Swift library which is builded on 4.2 Swift version and my app which is builded with XCode 10.2. How I can do this? When I add Swift 4 libraries it works on device, but I can't publish to AppStore, because it reject with ITMS-90428: Invalid Swift Support. If I use 10.1 XCode then everything is ok. (I use auto_package_ipa.sh script for SwiftSupport folder). If I add Xamarin.Swift new nuget package, then my project won't compile and says that installed Swift is 5.0.1, but library requires 4.2. But XCode 10.2 official says that Swift 5.0 compiler can compile Swift 4.2 libraries. So what I can do here? Library is external and can't be recompiled with Swift 5 only for me. Can I take Swift 4.2 libraries from older XCode and put it in SwiftSupport folder when packing ipa with XCode 10.2? How it works?

Invalid Swift support

We have a Xamarin iOS app using a swift iOS framework through a binding library.
Submissions to AppStore were successful before (..until Swift 4.2)
But we get the following error email after submission to AppStore, since Swift 4.2.1 (and corresponding Nugets) were published:

Invalid Swift Support - The files libswiftCoreGraphics.dylib, .. don’t match ...

Comments:

  • We are using the latest toolchain (VS for Mac 7.6.11, Xamarin.iOS 12.1.0.15 , XCode 10.1)
  • We updated Xamarin.Swift4.* Nugets to 4.2.1 in our app
  • The dylib versions are the same in both the /Frameworks and the SwiftSupport/ folders (i.e. 4.2.1) in the IPA
  • We are using the suggested scripts to include SwiftSupport libraries

Note, the submission flow worked fine with 4.2.

Please, kindly help, thanks!!

Linking Error When Running on Device

Firstly let me say I can't be 100% sure that this issue is related to the Xamarin Swift4 packages but I'm not sure where else to go for help.

We are using the Xamarin Swift4 packages in conjunction with a Swift library that we have provided a binding for, everything is build fine but when we run the app on a device it crashes:

Termination Description: DYLD, Symbol not found: _$s15_ObjectiveCTypes01_A11CBridgeablePTl

I've attached the full crash report.

crash-report.txt

From what I understand of the error message we have some missing or conflicted assembly but I'm not sure of the best approach to debug it.

I've also included the contents of our packages.config so you can see the packages and versions we are using.

packages.txt

We are using Visual Studio for Mac 8.0.4.0 and XCode 10.1

Invalid Swift Support error

I am using Xamarin.Swift3.Support Nuget packages on my app and was using the script package_ipa_default.sh to add the SwiftSupport folder into my IPA. I was able to successfully release a couple of times to the AppStore prior to iOS 11 and Xcode 9.

With the latest stable Xamarin release and Xcode 9 installed on my system, I built my IPA using the same process. When I try to upload it to the AppStore, I get an email from Apple saying that the Swift Support libraries do not match the ones in the Payload/MyApp.app/Frameworks/ folder. That makes sense since the files from my Xcode path is newer. I modified the script to copy the files from the Payload/MyApp.app/Frameworks/ folder instead. When I upload this IPA to the AppStore, I get the following email from Apple:

Invalid Swift Support - The file libswiftCore.dylib doesn’t have the correct code signature. Make sure you’re using the correct signature, rebuild your app using the current public (GM) version of Xcode, and resubmit it. Don’t just modify the code signature of libswiftCore.dylib.

Anyone else encountered this issue?

Are Xamarin.Swift4.* compatible with Linking ?

TestSwift.zip
Hello,

Thanks for your work. I use your nuget packages in order to make a binding to a Swift Library.
Everything is working.
But we have a blocking issue regarding the size of the ipa generated.
Does the "Link All" feature working with your libraries?
I made some tests with an empty Xamarin Forms app: 8mB in Release.
Adding Xamarin.Swift4.Core and Xamarin.Swift.Foundation increase the size of the generated ipa to 58,8mB with the following Build configuration: Link All, ARM64, LLVM.

Is it normal? Is there any additional thing to configure ?

Find my test project in attachment.

References:
-https://medium.com/@Flash3001/binding-swift-libraries-xamarin-ios-ff32adbc7c76
-https://docs.microsoft.com/en-us/xamarin/ios/deploy-test/linker?tabs=macos

Thanks

Problems on publishing app using Xamarin.Swift3 support from Apple (CI/CD pipeline)

Hello @Flash3001 have you guys tried publishing apps with Xamarin.Swift3 packages? I tried recently with a binding library that depends on Xamarin.Swift3.Support but unfortunately it doesn't get processed by Apple correctly.

Is there a workaround that you guys would recommend for making ipa-packager process for CI/CD pipelines? Here is the text I get from Apple team in case anyone takes the same.

Dear Developer,

We identified one or more issues with a recent delivery for your app. Please correct the following issues, then upload again.

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

Best regards,

The App Store Team

After removing the binding and the Xamarin.Swift3 references it gets processed. I saw some workarounds on copying the missing folders but didn't like doing that or block CI/CD scenarios

Error MSB4044: The "CheckSwiftVersionsTask" task was not given a value for the required parameter "AppManifest". (MSB4044)

I just updated VS Mac, Xamarin.iOS and getting this error when compile.
.../.nuget/packages/xamarin.swift/1.0.7/build/xamarinios/Xamarin.Swift.targets(9,9): Error MSB4044: The "CheckSwiftVersionsTask" task was not given a value for the required parameter "AppManifest". (MSB4044)

=== Visual Studio Community 2019 for Mac ===

Version 8.8.5 (build 18)
Installation UUID: f84e35a8-14bf-41db-a042-ed58dbad9b57
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 612000113

=== Mono Framework MDK ===

Runtime:
Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
Package version: 612000113

=== Roslyn (Language Service) ===

3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.102/Sdks
SDK Versions:
5.0.102
5.0.101
5.0.100
3.1.405
3.1.404
3.1.403
3.1.402
3.1.401
3.1.302
3.1.301
3.1.300
3.1.200
3.1.102
3.1.101
3.1.100
3.0.101
3.0.100
2.1.505
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.2
5.0.1
5.0.0
3.1.11
3.1.10
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.2
3.1.1
3.1.0
3.0.1
3.0.0
2.1.23
2.1.22
2.1.21
2.1.20
2.1.19
2.1.18
2.1.17
2.1.16
2.1.15
2.1.14
2.1.13
2.1.9

=== .NET Core 3.1 SDK ===

SDK: 3.1.405

=== Xamarin.Profiler ===

Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.3 (17715)
Build 12C33

=== Xamarin.Mac ===

Version: 7.2.0.3 (Visual Studio Community)
Hash: c51fabee8
Branch: xcode12.3
Build date: 2020-12-10 21:05:04-0500

=== Xamarin.iOS ===

Version: 14.8.0.3 (Visual Studio Community)
Hash: c51fabee8
Branch: xcode12.3
Build date: 2020-12-10 21:05:05-0500

=== Xamarin Designer ===

Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC

=== Xamarin.Android ===

Version: 11.1.0.26 (Visual Studio Community)
Commit: xamarin-android/d16-8/a36ce73
Android SDK: /Users/omnimobile/Library/Android/sdk
Supported Android versions:
4.4.87 (API level 20)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.5
SDK Build Tools Version: 29.0.2

Build Information:
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard@ebe9000
SQLite: xamarin/sqlite@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/omnimobile/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:24 UTC

=== Android Device Manager ===

Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:44 UTC

=== Build Information ===

Release ID: 808050018
Git revision: e83d51ec050ffcdd573462fc1889b58cfe1a5ad5
Build date: 2021-01-07 14:45:50-05
Build branch: release-8.8
Xamarin extensions: e83d51ec050ffcdd573462fc1889b58cfe1a5ad5

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.2.0 Darwin Kernel Version 20.2.0
Wed Dec 2 20:39:59 PST 2020
root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

XAML Styler 2.0.1

Invalid Bundle Structure

In an attempt to find a workaround for the issue described here #26 I've modified my AzureDevOps build to re-sign the application after the initial build.

This has got me a bit further so I've added the code to create the SwiftSupport folder, however when I submit builds to Apple I get the following error:

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'MyApp.app/SwiftSupport/libswiftCore.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles.

This is a bit confusing as I thought the whole point was that the Swift libraries had to be in that folder?

At the moment I'm still just testing the build process so the Swift Core NuGet package is the only one I'm pulling in.

Error itms 90035- invalid signature. A sealed resource is missing or invalid

When I use this Swift 4 support package in my project, it builds without any error but when i try to upload it to app store it states error items-90035: Invalid signature. A sealed resource is missing or invalid.

I m using correct certificate & provision profile but using this package messes up my certificate.

SwiftSupport tasks not running

Environment :
Xamarin.Swift 1.0.4
Xcode 11.2
Visual Studio 8.3

Steps taken

  1. Wrap an iOS Framework which has Swift 5 code in a binding library project
  2. Link the library project to an Example Xamarin.iOS
  3. Add the Xamarin.Swift nuget package in this example app
  4. Build

Observations
I can't see any of the Targets defined by SwiftSupport (such as SwiftSupport.ScanSwiftTask) being executed when I am building the application

Can you please help me figure out what I am missing here ?

Build targets not running.

Hello. I am trying to integrate a Objective C library, that has some swift code in it, in my Xamarin.iOS project. When I try without adding the Xamarin.Swift package, I get a bunch of linker errors like

ld : warning : Could not find or use auto-linked library 'swiftFoundation'
ld : warning : Could not find or use auto-linked library 'swiftDarwin'
ld : warning : Could not find or use auto-linked library 'swiftCoreFoundation'
ld : warning : Could not find or use auto-linked library 'swiftCore'
ld : warning : Could not find or use auto-linked library 'swiftCoreGraphics'
ld : warning : Could not find or use auto-linked library 'swiftObjectiveC'
ld : warning : Could not find or use auto-linked library 'swiftDispatch'
ld : warning : Could not find or use auto-linked library 'swiftSwiftOnoneSupport'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftFoundation'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftDarwin'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftCoreFoundation'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftCore'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftCoreGraphics'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftObjectiveC'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftDispatch'
error MT5209 : Native linking error : warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport'

So, I added this package via nuget. Now, I can see that it is supposed to run a bunch of targets during the build process. But in my case, none of the targets run, and the build log looks exactly the same as without this package included - with the same linker errors.

Any help?

Symbol not found after update to the last version on nuget

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?

swift 5

Hello @Flash3001 , first, thank you for your great work, let us have great toolkit can finish our job, and do you have any plan about swift 5?

Invalid Swift Support: `incorrect code signature` or `SwiftSupport folder is missing`

Summary

I'm working on my Swift 5.1 Framework Xamarin binding and was able to run it on an iOS 13 device and a simulator and even was able to validate against AppStore and uploaded it to the AppStore once the validation gave me no errors. The issue starts when I try to it on an iOS 12 device/simulator and (it was expected) it crashed because libswiftCore.dylib is missing. I’ve included the Xamarin.Swift 1.0.4 nuget and it worked, I was able to run it on the iOS 12 device. But when I pushed it to the AppStore - it gives me the missing SwiftSupport folder error:

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

It seems that the step to create the SwiftSupport folder is manual and I followed instructions and ran this ipa-packager script to copy frameworks if required, basically the script just checks if there are any dylibs in the Framework folder of a given .app (and I do have a few). Eventually, the script is trying to find a singed version of the same dylib here /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ but this folder in my dev env doesn’t have any, and the SwiftSupport folder ends up to be empty. When I try to publish new IPA with an empty SwiftSupport folder I can pass the error about missing folder but the first dylib check gives me an error right away:

ITMS-90433: Invalid Swift Support - The file libswiftCore.dylib doesn't have the correct code signature. Make sure you're using the correct signature, rebuild your app using the current public (GM) version of Xcode, and resubmit it. Don't just modify the code signature of libswiftCore.dylib.

Please advise how I can properly include the valid swift images into my payload. Did I miss an important step?

My environment

Xcode: 11.1
Swift: 5.1
iOS: 12.1+
VS4Mac: 8.3.1

Sample

My repo sample with the Swift Framework and Xamarin Sample app

App Terminates on Startup only by Loading the Library

Hey,

iam working with the Swift Version (4.2), the XCode Version (10.1) and targeting IOS 12.1.
Iam trying to bind a Colorpicker which was done with Swift for Xamarin IOS and after a little
bit of struggling due to the removal of the unnecessary architectures like i386, it started compiling
without any auto-linking errors. The issue is now that the app crashes on startup, just by referencing the library. Any idea what could be the reason for this?

In the binding library i set force load and smart link to true, if that might have some influence.

Greetings,
Noires

Swift4 Support?

Your packages have been extremely useful, any plans to get Swift 4 support going ?

ITMS-90428: Invalid Swift Support -

ITMS-90428: Invalid Swift Support - The files libswiftCoreLocation.dylib don’t match /Payload/StanfordChildrenHealth.app/Frameworks/libswiftCoreLocation.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/StanfordChildrenHealth.app/Frameworks/libswiftCoreLocation.dylib.

Visual Studio Version : 8.4.8
Xcode : 11.1

In Swift Support the libswiftCoreLocation.dylib is see is 5.0.1 but in Payload I see it as 4.2.1

@Flash3001 Can you please help me in this issue?

Using with Xamarin.Forms

Hey! I made a Binding of TrustSDK (Nuget: TrustSDK.Xamarin.iOS) using your guide, and it all works well when using it in an Xamarin.iOS project. But when i do the same on the iOS sub-project of an Xamarin.Forms app the app does not start and gives the following output:
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /Users/XXX/Library/Developer/CoreSimulator/Devices/AE976B11-BA9B-4A9A-BCD8-BD25CEB4FB9E/data/Containers/Bundle/Application/E9DCCADA-C7E6-40D3-86E1-61C2B6F6FB04/testtesttest.iOS.app/Frameworks/BigInt.framework/BigInt Reason: no suitable image found. Did find: /Users/XXX/Library/Developer/CoreSimulator/Devices/AE976B11-BA9B-4A9A-BCD8-BD25CEB4FB9E/data/Containers/Bundle/Application/E9DCCADA-C7E6-40D3-86E1-61C2B6F6FB04/testtesttest.iOS.app/Frameworks/libswiftCore.dylib: no matching architecture in universal wrapper /Users/XXX/Library/Developer/CoreSimulator/Devices/AE976B11-BA9B-4A9A-BCD8-BD25CEB4FB9E/data/Containers/Bundle/Application/E9DCCADA-C7E6-40D3-86E1-61C2B6F6FB04/testtesttest.iOS.app/Frameworks/libswiftCore.dylib: stat() failed with errno=45 /Users/XXX/Library/Developer/CoreSimulator/Devices/AE976B11-BA9B-4A9A-BCD8-BD25CEB4FB9E/data/Containers/Bundle/Application/E9DCCADA-C7E6-40D3-86E1-61C2B6F6FB04/testtesttest.iOS.app/Frameworks/libswiftCore.dylib: no matching architecture in universal wrapper
The lib is written in Swift 4.1 and I'm using your newest Swift4 packages.

MSB4044: The "CheckSwiftVersionsTask" task was not given a value for the required parameter "SdkVersion"

I just updated VS Mac, Xamarin.iOS and getting this error when compile.

/.nuget/packages/xamarin.swift/1.0.5/build/xamarinios/Xamarin.Swift.targets(9,9): Error MSB4044: The "CheckSwiftVersionsTask" task was not given a value for the required parameter "SdkVersion". (MSB4044)

Versions info:
=== Visual Studio Community 2019 for Mac ===

Version 8.8 (build 2913)
Installation UUID: cb7b1221-47b9-4215-9549-e24397200261
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 612000093

=== Mono Framework MDK ===

Runtime:
Mono 6.12.0.93 (2020-02/620cf538206) (64-bit)
Package version: 612000093

=== Roslyn (Language Service) ===

3.8.0-5.20515.7+713efb0e68d34ab75faaf709e071e5c2d8d4ed0e

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.100/Sdks
SDK Versions:
5.0.100
3.1.403
3.1.402
3.1.401
3.1.302
3.1.301
3.1.300
3.1.202
3.1.200
3.1.102
3.1.101
3.1.100
3.0.101
3.0.100
2.2.300
2.2.104
2.1.809
2.1.505
2.1.302
2.1.301
2.1.4
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.0
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.2
3.1.1
3.1.0
3.0.1
3.0.0
2.2.5
2.2.2
2.1.23
2.1.22
2.1.21
2.1.20
2.1.19
2.1.18
2.1.17
2.1.16
2.1.15
2.1.14
2.1.13
2.1.9
2.1.2
2.1.1
2.0.5

=== .NET Core 3.1 SDK ===

SDK: 3.1.403

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.1 (17222)
Build 12A7403

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.iOS ===

Version: 14.4.1.3 (Visual Studio Community)
Hash: e30c41de3
Branch: d16-8
Build date: 2020-10-20 22:18:50-0400

=== Xamarin Designer ===

Version: 16.8.0.495
Hash: 1a7425b8f
Branch: remotes/origin/d16-8
Build date: 2020-10-20 10:51:14 UTC

=== Xamarin.Android ===

Version: 11.1.0.17 (Visual Studio Community)
Commit: xamarin-android/d16-8/c0e2b8e
Android SDK: /Users/ignasbagdonas/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
None installed

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.6
SDK Build Tools Version: 29.0.2

Build Information:
Mono: be2226b
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard@ebe9000
SQLite: xamarin/sqlite@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/ignasbagdonas/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2020-10-13 23:32:30 UTC

=== Android Device Manager ===

Version: 16.8.0.45
Hash: fc0af5f
Branch: remotes/origin/d16-8
Build date: 2020-10-13 23:32:54 UTC

=== Build Information ===

Release ID: 808002913
Git revision: c6189b3851aed1e1aadbef5807d54bd5bb505e5e
Build date: 2020-11-05 07:07:20-05
Build branch: release-8.8
Xamarin extensions: c6189b3851aed1e1aadbef5807d54bd5bb505e5e

=== Operating System ===

Mac OS X 10.15.7
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Thu Oct 29 22:56:45 PDT 2020
root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

Mutatio 1.0.3
StyleCop Support 1.1.0.4

"Dyld Error Message: Library not loaded" crash with 2nd level dependency

Hi there,
I'm currently working on iOS bindings for cobrowse.io library and I have found quite interesting behavior that I'd like to share with you.

The CobrowseIO is actually an ObjC library but it depends on two Swift libs: SocketIO and Starscream. So, I have created three separate bindings projects, and the dependency hierarchy looks like:

MyiOSApplication
+
+-->CobrowseIO.iOS
|   +
+---+-->SocketIO.iOS
|       +
+-------+-->Starscream.iOS

The app worked fine on iPhone with iOS 12.2 and I was surprised when my app crashed on simulator with the following message:

Dyld Error Message:
  Library not loaded: @rpath/SocketIO.framework/SocketIO
  Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/CBD647EE-9558-45C3-9715-E7511F5662C7/data/Containers/Bundle/Application/FE14C4FA-E404-43E8-984B-5289FC7B24B8/MyiOSApplication.app/Frameworks/CobrowseIO.framework/CobrowseIO
  Reason: image not found

Build log:

Target "_SwiftFrameworksMac" in file "/Users/user/.nuget/packages/xamarin.swift/1.0.2/build/xamarinios/Xamarin.Swift.targets":
  Using "CheckSwiftVersionsTask" task from assembly "/Users/user/.nuget/packages/xamarin.swift/1.0.2/build/xamarinios/../../SwiftSupport.dll".
  Task "CheckSwiftVersionsTask"
    Looking for Swift version on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/CobrowseIO
    Expected Swift header on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/Headers/CobrowseIO-Swift.h
    bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/Headers/CobrowseIO-Swift.h do not exist.
    Installed: 5.0
  Done executing task "CheckSwiftVersionsTask".
  Task "ScanSwiftTask" skipped, due to false condition; ($(_ShouldIncludeSwiftDylibs)) was evaluated as (False).
  Task "IncludeSwiftTask" skipped, due to false condition; ($(_ShouldIncludeSwiftDylibs)) was evaluated as (False).

As you can see, Xamarin.Swift didn't check if SocketIO.iOS and Starscream.iOS were actually Swift bindings.

The workaround is pretty simple: I just added the following lines to the LinkerPleaseInclude file:

public void Include(Starscream.FoundationStream _)
{
    _ = new Starscream.FoundationStream();
}

public void Include(SocketIO.SocketManager _)
{
    _ = new SocketIO.SocketManager(new NSUrl("https://example.com"), null);
}

The app now no longer crashes and the build log contains this:

Target "_SwiftFrameworksMac" in file "/Users/user/.nuget/packages/xamarin.swift/1.0.2/build/xamarinios/Xamarin.Swift.targets":
  Using "CheckSwiftVersionsTask" task from assembly "/Users/user/.nuget/packages/xamarin.swift/1.0.2/build/xamarinios/../../SwiftSupport.dll".
  Task "CheckSwiftVersionsTask"
    Looking for Swift version on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/CobrowseIO
    Looking for Swift version on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/Starscream.framework/Starscream
    Looking for Swift version on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/SocketIO.framework/SocketIO
    Expected Swift header on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/Starscream.framework/Headers/Starscream-Swift.h
    bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/Starscream.framework/Headers/Starscream-Swift.h exists.
    Expected Swift header on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/Headers/CobrowseIO-Swift.h
    Expected Swift header on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/SocketIO.framework/Headers/SocketIO-Swift.h
    bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/Headers/CobrowseIO-Swift.h do not exist.
    bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/SocketIO.framework/Headers/SocketIO-Swift.h exists.
    Including Swift dylibs because you are targeting an OS version that doesnt include it.
    Installed: 5.0
    SocketIO Framework: 5.0
    Starscream Framework: 5.0
  Done executing task "CheckSwiftVersionsTask".
  Using "ScanSwiftTask" task from assembly "/Users/user/.nuget/packages/xamarin.swift/1.0.2/build/xamarinios/../../SwiftSupport.dll".
  Task "ScanSwiftTask"
    Frameworks: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/CobrowseIO, bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/SocketIO.framework/SocketIO, bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/Starscream.framework/Starscream
    Looking for Swift Dependency on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/CobrowseIO
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/CobrowseIO.framework/CobrowseIO'
    Looking for Swift Dependency on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/SocketIO.framework/SocketIO
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/SocketIO.framework/SocketIO'
    Looking for Swift Dependency on: bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/Starscream.framework/Starscream
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/Starscream.framework/Starscream'
    Swift Dependency Found: libswiftCore.dylib
    Swift Dependency Found: libswiftCoreFoundation.dylib
    Swift Dependency Found: libswiftCoreGraphics.dylib
    Swift Dependency Found: libswiftCoreImage.dylib
    Swift Dependency Found: libswiftDarwin.dylib
    Swift Dependency Found: libswiftDispatch.dylib
    Swift Dependency Found: libswiftFoundation.dylib
    Swift Dependency Found: libswiftMetal.dylib
    Swift Dependency Found: libswiftObjectiveC.dylib
    Swift Dependency Found: libswiftQuartzCore.dylib
    Swift Dependency Found: libswiftUIKit.dylib
    Looking for Swift Dependency on: libswiftCore.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib'
    Looking for Swift Dependency on: libswiftCoreGraphics.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCoreGraphics.dylib'
    Looking for Swift Dependency on: libswiftObjectiveC.dylib
    Looking for Swift Dependency on: libswiftDarwin.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftDarwin.dylib'
    Looking for Swift Dependency on: libswiftCoreImage.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCoreImage.dylib'
    Looking for Swift Dependency on: libswiftDispatch.dylib
    Looking for Swift Dependency on: libswiftMetal.dylib
    Looking for Swift Dependency on: libswiftUIKit.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftUIKit.dylib'
    Looking for Swift Dependency on: libswiftCoreFoundation.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCoreFoundation.dylib'
    Looking for Swift Dependency on: libswiftQuartzCore.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftQuartzCore.dylib'
    Looking for Swift Dependency on: libswiftFoundation.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftMetal.dylib'
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftObjectiveC.dylib'
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftFoundation.dylib'
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftDispatch.dylib'
    Swift Dependency Found: libswiftos.dylib
    Looking for Swift Dependency on: libswiftos.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftos.dylib'
  Done executing task "ScanSwiftTask".
  Using "IncludeSwiftTask" task from assembly "/Users/user/.nuget/packages/xamarin.swift/1.0.2/build/xamarinios/../../SwiftSupport.dll".
  Task "IncludeSwiftTask"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib' -archs
    Copying: libswiftCore.dylib, libswiftCoreFoundation.dylib, libswiftCoreGraphics.dylib, libswiftCoreImage.dylib, libswiftDarwin.dylib, libswiftDispatch.dylib, libswiftFoundation.dylib, libswiftMetal.dylib, libswiftObjectiveC.dylib, libswiftQuartzCore.dylib, libswiftUIKit.dylib, libswiftos.dylib
    Swift Arcs Needed: i386, x86_64
    Swift Arcs Available: i386, x86_64
    Copying: libswiftCore.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftCore.dylib'
    Copying: libswiftCoreFoundation.dylib
    Copying: libswiftCoreImage.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCoreFoundation.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftCoreFoundation.dylib'
    Copying: libswiftCoreGraphics.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCoreGraphics.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftCoreGraphics.dylib'
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCoreImage.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftCoreImage.dylib'
    Copying: libswiftDarwin.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftDarwin.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftDarwin.dylib'
    Copying: libswiftDispatch.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftDispatch.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftDispatch.dylib'
    Copying: libswiftFoundation.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftFoundation.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftFoundation.dylib'
    Copying: libswiftMetal.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftMetal.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftMetal.dylib'
    Copying: libswiftQuartzCore.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftQuartzCore.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftQuartzCore.dylib'
    Copying: libswiftUIKit.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftUIKit.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftUIKit.dylib'
    Copying: libswiftos.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftos.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftos.dylib'
    Copying: libswiftObjectiveC.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftObjectiveC.dylib'  -create -output 'bin/iPhoneSimulator/Debug/MyiOSApplication.app/Frameworks/libswiftObjectiveC.dylib'
  Done executing task "IncludeSwiftTask".
Done building target "_SwiftFrameworksMac" in project "MyiOSApplication.csproj".

Apparently, _Frameworks MSBuild item does not include frameworks that aren't used in the app's code directly.

ITMS-90428: Invalid Swift Support - Payload - The files libswiftCoreGraphics.dylib, libswiftDarwin.dylib, libswiftos.dylib, libswiftQuartzCore.dylib, libswiftFoundation.dylib, libswiftMetal.dylib, libswiftCoreLocation.dylib, libswiftCoreFoundation.dylib, libswiftCoreImage.dylib, libswiftObjectiveC.dylib, libswiftUIKit.dylib, libswiftDispatch.dylib, libswiftCore.dylib don’t match with the /Payload/MyApp.app/Frameworks/

Lucas,

I am currently integrating a swift 5.0 library into my visual studio code;
Xcode 10.2
Visual Studio for Mac 8.2.5
Nuget Package : Xamarin.Swift (1.0.2)

I have followed Step #7 in https://medium.com/@Flash3001/binding-swift-libraries-xamarin-ios-ff32adbc7c76

used IPA using the script as: sh package_ipa_default.sh AppPath iPaPath

During App Submission All went well until i got an email from Apple as below :

ITMS-90428: Invalid Swift Support - The files libswiftCoreGraphics.dylib, libswiftDarwin.dylib, libswiftos.dylib, libswiftQuartzCore.dylib, libswiftFoundation.dylib, libswiftMetal.dylib, libswiftCoreLocation.dylib, libswiftCoreFoundation.dylib, libswiftCoreImage.dylib, libswiftObjectiveC.dylib, libswiftUIKit.dylib, libswiftDispatch.dylib, libswiftCore.dylib don’t match /Payload/MyApp.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/MyApp.app/Frameworks/libswiftDarwin.dylib, /Payload/MyApp.app/Frameworks/libswiftos.dylib, /Payload/MyApp.app/Frameworks/libswiftQuartzCore.dylib, /Payload/MyApp.app/Frameworks/libswiftFoundation.dylib, /Payload/MyApp.app/Frameworks/libswiftMetal.dylib, /Payload/MyApp.app/Frameworks/libswiftCoreLocation.dylib, /Payload/MyApp.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/MyApp.app/Frameworks/libswiftCoreImage.dylib, /Payload/MyApp.app/Frameworks/libswiftObjectiveC.dylib, /Payload/MyApp.app/Frameworks/libswiftUIKit.dylib, /Payload/MyApp.app/Frameworks/libswiftDispatch.dylib, /Payload/MyApp.app/Frameworks/libswiftCore.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/MyApp.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/MyApp.app/Frameworks/libswiftDarwin.dylib, /Payload/MyApp.app/Frameworks/libswiftos.dylib, /Payload/MyApp.app/Frameworks/libswiftQuartzCore.dylib, /Payload/MyApp.app/Frameworks/libswiftFoundation.dylib, /Payload/MyApp.app/Frameworks/libswiftMetal.dylib, /Payload/MyApp.app/Frameworks/libswiftCoreLocation.dylib, /Payload/MyApp.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/MyApp.app/Frameworks/libswiftCoreImage.dylib, /Payload/MyApp.app/Frameworks/libswiftObjectiveC.dylib, /Payload/MyApp.app/Frameworks/libswiftUIKit.dylib, /Payload/MyApp.app/Frameworks/libswiftDispatch.dylib, /Payload/MyApp.app/Frameworks/libswiftCore.dylib.

Xcode 9.3 (Swift 4.1) support

Hi, the new Xcode upgraded Swift and broke compatibility with the previous swift libraries. Would it be possible to get an update of the nuget packages? Happy to help out in any way.

Thanks,
Greg Perez

Invalid Swift support (Swift4 librairies using Xamarin.Swift, Xcode 10.2.1 and Swift5)

Hello, we are working with Xamarin to create an iOS version of our application.
We need to add Bear2B iOS via a binding project because the Bear2B SDK is not directly compatible with Xamarin iOS.

https://github.com/bear2b/bear_sdk_demo_ios

Bear2B is only compatible with Swift4, so we create this binding project using Swift4 Frameworks (BearSDK, RxSwift, RxCocoa, Alamofire), and Xamarin.Swift4.* Nugets packages (Xamarin.Swift4.Foundation, Xamarin.Swift4.ObjectiveC, ...)

Everything works fine during development, but when we create the IPA release build to submit to Apple, we are missing the SwiftSupport folder according to Apple.
So we add it via the script package_ipa_default.sh.
Once the file is added to our IPA, we submit the IPA a second time and Apple refuses it.

I think we have version incompatibilities with Swift4 and Swift5.

I tried to install Xcode 10.1 with Swift4.2.1.

I changed the Xcode version of Visual Studio for Mac to Xcode 10.1 and then changed the version via command lines: sudo xcode-select -s ~/Documents/Software/Xcode-10.2-Swift-4.2.1.app

After that, I checked my Swift version with: swift --version

Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) Target: x86_64-apple-darwin18.6.0

Even after all this Apple refuses our IPA with the same email.

Can you please tell me how to fix this error?

Do I have to configure everything for Swift4? (Visual Studio, Xcode, Swift, every Nugets Xamarin.Swift4.*, etc.)

Could everything work with only the Nuget Xamarin.Swift 1.0.2 package?

Thank you in advance

Issue

Last email from Apple with SwifSupport added with script package_ipa_default.sh:

Dear Developer,

We identified one or more issues with a recent delivery for your app, “Saint-Gobain Weber España”. Please correct the following issues, then upload again.

Invalid Swift Support - The files libswiftCoreGraphics.dylib, libswiftCoreMedia.dylib, libswiftDarwin.dylib, libswiftCoreAudio.dylib, libswiftos.dylib, libswiftQuartzCore.dylib, libswiftContacts.dylib, libswiftFoundation.dylib, libswiftMetal.dylib, libswiftCoreLocation.dylib, libswiftCoreFoundation.dylib, libswiftAVFoundation.dylib, libswiftCoreImage.dylib, libswiftObjectiveC.dylib, libswiftsimd.dylib, libswiftUIKit.dylib, libswiftDispatch.dylib, libswiftCore.dylib don’t match /Payload/Webber.iOS.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreMedia.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftDarwin.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreAudio.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftos.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftQuartzCore.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftContacts.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftFoundation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftMetal.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreLocation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftAVFoundation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreImage.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftObjectiveC.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftsimd.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftUIKit.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftDispatch.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCore.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/Webber.iOS.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreMedia.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftDarwin.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreAudio.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftos.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftQuartzCore.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftContacts.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftFoundation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftMetal.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreLocation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftAVFoundation.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCoreImage.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftObjectiveC.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftsimd.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftUIKit.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftDispatch.dylib, /Payload/Webber.iOS.app/Frameworks/libswiftCore.dylib.

Best regards,

The App Store Team

Configuration

Apple Developer Tools:
Xcode 10.2.1 (14490.122)
Build 10E1001

Apple Swift version:
5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.6.0

Visual Studio Professional 2019 for Mac:
Version 8.0.4 (build 0)

Xamarin.iOS:
Version: 12.8.0.0 (Visual Studio Professional)

Package nuget Xamarin.Swift:
Version : 1.0.2
https://www.nuget.org/packages/Xamarin.Swift/

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms

Incompatible with project.json

Dunno if it's a package problem or a xamarin one but when using your packages in a project.json project Xamarin.Swift3.targets seems to be ignored and in a simulator build arm frameworks are not overwritten with x86 ones.

Code Signing Issue: A sealed resource is missing or invalid

We're currently trying to upload one our apps to the store that uses a bound Swift based library from a 3rd party.

We've had various issues to deal with but currently we're left with one issue related to the code signing signature of the Swift libraries included with the app build.

Payload/MyApp.Touch.app/: a sealed resource is missing or invalid file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftSceneKit.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftMetalKit.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCoreImage.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftObjectiveC.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftMetal.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCoreData.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftUIKit.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCoreGraphics.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftDispatch.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCoreFoundation.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftos.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftQuartzCore.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCoreAudio.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftGameplayKit.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftDarwin.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftModelIO.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftSpriteKit.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftFoundation.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftGLKit.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCoreMedia.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftSwiftOnoneSupport.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftsimd.dylib file modified: /Users/Me/Downloads/Payload/MyApp.Touch.app/Frameworks/libswiftCore.dylib

We are following a standard build process on AzureDevOps so its not clear what the issues is with these files. It would seem like either they are being modified somehow or are never signed properly in the first place.

Any light you can shed on this would be great, we haven't yet added your IPA packaging script to the build, we were waiting to get to the specific error around the missing Swift support folder but could this be a similar problem?

Failed to codesign libswiftxyz.dylib

Upgraded to the latest version of Visual Studio / Xamarin today, and after that my app will not build anymore. I'm raising it here as it seems to be specific to the libswift stuff.

As far as I can tell, its failing for all the swift packages apart from the Xamarin.Swift4 one.

Here's an excerpt of the errors:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(3,3): Error: Failed to codesign 'bin/iPhoneSimulator/Debug/device-builds/iphone9.1-11.0/App.app/Frameworks/libswiftCore.dylib': bin/iPhoneSimulator/Debug/device-builds/iphone9.1-11.0/App.app/Frameworks/libswiftCore.dylib: replacing existing signature
bin/iPhoneSimulator/Debug/device-builds/iphone9.1-11.0/App.app/Frameworks/libswiftCore.dylib: unknown error -1=ffffffffffffffff (App)

Invalid Swift Support error Xcode 9.2

Getting Invalid Swift Support again

Dear developer,

We have discovered one or more issues with your recent delivery for "App X". To process your delivery, the following issues must be corrected:

Invalid Swift Support - The files libswiftDarwin.dylib, libswiftCoreFoundation.dylib, libswiftQuartzCore.dylib, libswiftFoundation.dylib, libswiftCoreAudio.dylib, libswiftCoreGraphics.dylib, libswiftMetal.dylib, libswiftCore.dylib, libswiftCoreImage.dylib, libswiftDispatch.dylib, libswiftObjectiveC.dylib, libswiftCoreMedia.dylib, libswiftUIKit.dylib, libswiftos.dylib don?t match /Payload/App.X.app/Frameworks/libswiftDarwin.dylib, /Payload/App.X.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/App.X.app/Frameworks/libswiftQuartzCore.dylib, /Payload/App.X.app/Frameworks/libswiftFoundation.dylib, /Payload/App.X.app/Frameworks/libswiftCoreAudio.dylib, /Payload/App.X.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/App.X.app/Frameworks/libswiftMetal.dylib, /Payload/App.X.app/Frameworks/libswiftCore.dylib, /Payload/App.X.app/Frameworks/libswiftCoreImage.dylib, /Payload/App.X.app/Frameworks/libswiftDispatch.dylib, /Payload/App.X.app/Frameworks/libswiftObjectiveC.dylib, /Payload/App.X.app/Frameworks/libswiftCoreMedia.dylib, /Payload/App.X.app/Frameworks/libswiftUIKit.dylib, /Payload/App.X.app/Frameworks/libswiftos.dylib. 

Make sure the files are correct, rebuild your app, and resubmit it. Don?t apply post-processing to /Payload/App.X.app/Frameworks/libswiftDarwin.dylib, /Payload/App.X.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/App.X.app/Frameworks/libswiftQuartzCore.dylib, /Payload/App.X.app/Frameworks/libswiftFoundation.dylib, /Payload/App.X.app/Frameworks/libswiftCoreAudio.dylib, /Payload/App.X.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/App.X.app/Frameworks/libswiftMetal.dylib, /Payload/App.X.app/Frameworks/libswiftCore.dylib, /Payload/App.X.app/Frameworks/libswiftCoreImage.dylib, /Payload/App.X.app/Frameworks/libswiftDispatch.dylib, /Payload/App.X.app/Frameworks/libswiftObjectiveC.dylib, /Payload/App.X.app/Frameworks/libswiftCoreMedia.dylib, /Payload/App.X.app/Frameworks/libswiftUIKit.dylib, /Payload/App.X.app/Frameworks/libswiftos.dylib.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

swift support broken

Starting Visual Studio 8.10 on MacOS the swift libraries are no longer included in the created IPA.

TestFlight build fails at startup with `Termination Description: DYLD, dependent dylib '@rpath/libswiftCore.dylib' not found for....`

I'm getting an immediate startup crash when opening my App Store Connect / TestFlight build which requires the Swift v4.1.2 libs:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, dependent dylib '@rpath/libswiftCore.dylib' not found for 
'/private/var/containers/Bundle/Application/6AE3A428-810B-4803-B5D5-7125C52E51C7/MyApp.app/Frameworks/Charts.framework/Charts', 
tried but didn't find: 
'/private/var/containers/Bundle/Application/6AE3A428-810B-4803-B5D5-7125C52E51C7/MyApp.app/../Frameworks/libswiftCore.dylib' 
'/private/var/containers/Bundle/Application/6AE3A428-810B-4803-B5D5-7125C52E51C7/MyApp.app/Frameworks/Charts.framework/Frameworks/libswiftCore.dylib' 
'/private/var/containers/Bundle/Application/6AE3A428-810B-4803-B5D5-7125C52E51C7/MyApp.app/Frameworks/libswiftCore.dylib' 
'@rpath/libswiftCore.dylib' '/usr/local/lib/libswiftCore.dylib' '/usr/lib/libswiftCore.dylib'
Highlighted by Thread:  0

I'm trying to use UltimateXF in a Xamarin Forms (v4.2.x) project which wraps iOSCharts v3.1.1.2 (from @Flash3001).

My XF project uses PackageReferences and the Xamarin.Swift4 packages (as per the requirements of UltimateXF):

<PackageReference Include="Xamarin.Swift4">
    <Version>4.0.0.2</Version>
</PackageReference>

Xamarin.Swift4.Core etc v4.1.2

Everything works fine in all builds on Simulator and devices until I try to open a build archived, signed, uploaded and installed from App Store Connect.

I'm following the steps detailed here to create my ipa after archiving and signing, ensuring that the SwiftSupport folder is created and populated using the ipa-packager.sh script from https://github.com/bq/ipa-packager.

The UltimateXF library has wrapped iOSCharts at version 3.1.1.2 and requires using the Xamarin.Swift4 support packages at version 4.1.2, which as far as I can tell means I need to use the Swift libraries from Xcode 9.4.

I'm using Xcode 11 and so I've lightly modified the ipa-packager.sh script to use the xcode-select command to switch to a downloaded install of Xcode 9.4 to ensure the Swift libs are picked up from /Applications/Xcode9.4/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ and copied in to the SwiftSupport folder which should be the correct 4.1.2 versions to match iOSCharts at version 3.1.1.2.

After running the script and unpacking my modified ipa I can see that the SwiftSupport folder has been created and the Swift 4.1.2 dylib files are present:

ls -al SwiftSupport 

-rwxr-xr-x   1 gaz  staff  66662432  7 Feb 14:06 libswiftCore.dylib
-rwxr-xr-x   1 gaz  staff    659808  7 Feb 14:06 libswiftCoreAudio.dylib
-rwxr-xr-x   1 gaz  staff    740160  7 Feb 14:06 libswiftCoreData.dylib
-rwxr-xr-x   1 gaz  staff    257616  7 Feb 14:06 libswiftCoreFoundation.dylib
-rwxr-xr-x   1 gaz  staff   1628432  7 Feb 14:06 libswiftCoreGraphics.dylib
-rwxr-xr-x   1 gaz  staff    307520  7 Feb 14:06 libswiftCoreImage.dylib
-rwxr-xr-x   1 gaz  staff    483504  7 Feb 14:06 libswiftCoreMedia.dylib
-rwxr-xr-x   1 gaz  staff    838608  7 Feb 14:06 libswiftDarwin.dylib
-rwxr-xr-x   1 gaz  staff   2722176  7 Feb 14:06 libswiftDispatch.dylib
-rwxr-xr-x   1 gaz  staff  30165120  7 Feb 14:06 libswiftFoundation.dylib
-rwxr-xr-x   1 gaz  staff    448768  7 Feb 14:06 libswiftMetal.dylib
-rwxr-xr-x   1 gaz  staff    553984  7 Feb 14:06 libswiftObjectiveC.dylib
-rwxr-xr-x   1 gaz  staff    310496  7 Feb 14:06 libswiftQuartzCore.dylib
-rwxr-xr-x   1 gaz  staff   1042912  7 Feb 14:06 libswiftUIKit.dylib
-rwxr-xr-x   1 gaz  staff    497040  7 Feb 14:06 libswiftos.dylib

They appear to closely match those found in app Framework folder although the file sizes are marginally different:

ls -al Payload/MyApp.app/Frameworks

-rw-r--r--    1 gaz  staff  66704320  7 Feb 14:01 libswiftCore.dylib
-rw-r--r--    1 gaz  staff    668944  7 Feb 14:01 libswiftCoreAudio.dylib
-rw-r--r--    1 gaz  staff    749280  7 Feb 14:01 libswiftCoreData.dylib
-rw-r--r--    1 gaz  staff    299520  7 Feb 14:01 libswiftCoreFoundation.dylib
-rw-r--r--    1 gaz  staff   1637568  7 Feb 14:01 libswiftCoreGraphics.dylib
-rw-r--r--    1 gaz  staff    349408  7 Feb 14:01 libswiftCoreImage.dylib
-rw-r--r--    1 gaz  staff    525408  7 Feb 14:01 libswiftCoreMedia.dylib
-rw-r--r--    1 gaz  staff    847744  7 Feb 14:01 libswiftDarwin.dylib
-rw-r--r--    1 gaz  staff   2764080  7 Feb 14:01 libswiftDispatch.dylib
-rw-r--r--    1 gaz  staff  30207024  7 Feb 14:01 libswiftFoundation.dylib
-rw-r--r--    1 gaz  staff    457904  7 Feb 14:01 libswiftMetal.dylib
-rw-r--r--    1 gaz  staff    595872  7 Feb 14:01 libswiftObjectiveC.dylib
-rw-r--r--    1 gaz  staff    352384  7 Feb 14:01 libswiftQuartzCore.dylib
-rw-r--r--    1 gaz  staff   1084800  7 Feb 14:01 libswiftUIKit.dylib
-rw-r--r--    1 gaz  staff    506160  7 Feb 14:01 libswiftos.dylib

Running otool confirms that the file versions do match even with the slight size differences and Finder > Get Info indicates the files in both folders are Version 4.1.2:

otool -l Payload/MyApp.app/Frameworks/libswiftCore.dylib  | grep "current version" | head -1
      current version 902.0.54
otool -l SwiftSupport/libswiftCore.dylib  | grep "current version" | head -1  
      current version 902.0.54

I then use the Transporter mac app to Verify the modified ipa (all ok) and upload it to TestFlight (passes processing) but when I install and run I'm at a loss as to why I'm seeing the dependent dylib '@rpath/libswiftCore.dylib' not found error when it seems I've added the required Swift libs into a SwiftSupport folder and they should be present in at least one of the paths mentioned in the error message - any help or insight on how to resolve this would be much appreciated

Also, I've seen posts mention using a SwiftSupport folder and also mention using a SwiftSupport/iphoneos folder (I've tried both) - it would be good to understand which I should be using

Configuration

Apple Developer Tools:
Xcode 11.3 (15712)
Build 11C29

Xcode 9.4 (in a named Application subfolder)

Visual Studio Community 2019 for Mac:
Version 8.4.3 (build 12)

Xamarin.iOS:
Version: 13.10.0.17 (Visual Studio Community)

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.