Error on publish app to AppStore Xamarin.iOS build - ios

Issue: Invalid Swift Support- The file libswiftAVFoundation.dylib doesn’t
I have tried to resolve my issue based on the following link. but still, I'm getting the issue after uploaded in App store. Please help me resolve this issue. I'm new for Xamarin.iOS
https://docs.google.com/document/d/1nWY-RK9oXsNnlca5eSvbH9tQejLnCjismHrSy8IuDFo/edit
Totally I have created two projects in Xamarin and works well in locally.
Project 1. Xamarin Sample Binding Project
- Here, I have included my own Swift SDK
Project 2. Xamarin Sample Demo Project
- Mapped the Binding project
Generated the iPA file:-
Created the IPA file for Project 2 in Xamarin. The IPA doesn't have the SwiftSupport folder. Then I have followed the above doc steps and export the IPA file using Xcode. I have extracted the IPA file and seen swiftSupport folder. After, I have submitted in the Appstore I'm getting the below issue.
AppStore Failed error message:-
Invalid Swift Support- The file libswiftAVFoundation.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
libswiftAVFoundation.dylib.

Finally, Luckily my app works fine. I have just removed all swift framework lib and added the Xamarin.Swift lib only from the Package. That's it.
Thank you Every one

Related

Error message when using xcframework: ITMS-90426: Invalid Swift Support

I use this package in my app:
https://github.com/liamnichols/_InternalSwiftSyntaxParser
which contains an xcframework: _InternalSwiftSyntaxParser.xcframework which contains dylib files
All is good with this package, my app works well in simulator and real device. But when I uploaded a version to the App Store Connect, I got this error message:
ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Is there a solution for that? I searched a lot with out any chance to solve it.
What I tried:
(1) I tried to add manually the SwiftSupport folder using the script here:
https://gist.github.com/adamzarn/6bb89d91ed4b8c3d3fb25363c221441f
(2) Then the error message is now:
ITMS-90430: Invalid Swift Support - The file lib_InternalSwiftSyntaxParser.dylib doesn’t have a signing ID. Sign the file, rebuild your app using the current public (GM) version of Xcode, and resubmit it.
(3) Trying to signing the file using:
codesign --force --timestamp --sign <name of certificate> <binary you want to sign>
But I always get the same error message in (2)

iMessage app, "disallowed nested bundles" error trying to archive/upload with binary framework

I have an iMessage app (not an app with an iMessage extension) in which I have successfully added a binary framework (the project runs just fine on device and simulator)
However, I cannot successfully upload the project to App Store Connect - upload from the archive build returns the following errors:
The relevant text of the error is:
The bundle ... contains disallowed nested bundles. Refer to https://developer.apple.com/go/id=framework-imessage
That link (if you follow the instructions for using an newer Xcode version) leads you back to the link below I used to add the framework to begin with... to run you will need Xcode 11 as I am using an XCFramework.
I added the framework to the iMessage app as instructed by Apple here:
https://developer.apple.com/library/archive/technotes/tn2435/_index.html
(see Embedding a Framework in an iMessage App section)
What do I need to change to the settings for the project or extension in order for the archive/upload process to succeed, while actually including the framework I need? I have searched on StackOverflow, and found a variety of posts related to cocoapods, or around various build settings of "Always Embed Swift Standard Libraries" that do not help.
I have reduced the problem down to a simple sample app you can see here, which builds and runs just fine but cannot be archived and uploaded:
https://www.dropbox.com/sh/jpa4oe7zlnb21wl/AACXkLbxIbayZUtJr3VDwO07a?dl=0
That directory contains a zip file of the project, and an image showing the error encountered.
You have .xcframework in your project. May be you haven't enable Build Libraries for Distribution in Build setting when you have build .xcframework. You can refer this link for this.
Edit:
Error message is Invalid Bundle. So check bundle name of message extension and frameworks which are in the .xcframework.
I've made a few changes regarding the stub app, it seems to work and validate ok.
Remove the Embed Framework from the extension target.
Add the Embed Framework in the app target, set the Destination to 'Frameworks'

Xamarin.iOS - Publishing App - Invalid Swift Support

I've been struggling publishing my iOS app for review with 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.
I'm using Xamarin.iOS to develop this app, and i receive the above error if i use Visual Studio to Sign and Export the IPA or if i use Xcode to publish.
Tool versions:
Xcode 9.0.1
Visual Studio Enterprise 2017 for Mac 7.2
Xamarin.iOS 11.2.0.11
I have tried the following suggestions:
IPA Packager (also Auto Packager)
Manual packaging using this guide
The second suggestion didn't give a different response.
Using the IPA Packager gave the following response from iTunes Store:
Invalid Swift Support - The files libswiftAVFoundation.dylib, libswiftDarwin.dylib, libswiftQuartzCore.dylib, libswiftFoundation.dylib, libswiftCoreAudio.dylib, libswiftCoreGraphics.dylib, libswiftCoreLocation.dylib, libswiftCore.dylib, libswiftCoreImage.dylib, libswiftDispatch.dylib, libswiftPhotos.dylib, libswiftObjectiveC.dylib, libswiftCoreMedia.dylib, libswiftUIKit.dylib don’t match /Payload/App.iOS.app/Frameworks/libswiftAVFoundation.dylib, /Payload/App.iOS.app/Frameworks/libswiftDarwin.dylib, /Payload/App.iOS.app/Frameworks/libswiftQuartzCore.dylib, /Payload/App.iOS.app/Frameworks/libswiftFoundation.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreAudio.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreLocation.dylib, /Payload/App.iOS.app/Frameworks/libswiftCore.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreImage.dylib, /Payload/App.iOS.app/Frameworks/libswiftDispatch.dylib, /Payload/App.iOS.app/Frameworks/libswiftPhotos.dylib, /Payload/App.iOS.app/Frameworks/libswiftObjectiveC.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreMedia.dylib, /Payload/App.iOS.app/Frameworks/libswiftUIKit.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/App.iOS.app/Frameworks/libswiftAVFoundation.dylib, /Payload/App.iOS.app/Frameworks/libswiftDarwin.dylib, /Payload/App.iOS.app/Frameworks/libswiftQuartzCore.dylib, /Payload/App.iOS.app/Frameworks/libswiftFoundation.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreAudio.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreLocation.dylib, /Payload/App.iOS.app/Frameworks/libswiftCore.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreImage.dylib, /Payload/App.iOS.app/Frameworks/libswiftDispatch.dylib, /Payload/App.iOS.app/Frameworks/libswiftPhotos.dylib, /Payload/App.iOS.app/Frameworks/libswiftObjectiveC.dylib, /Payload/App.iOS.app/Frameworks/libswiftCoreMedia.dylib, /Payload/App.iOS.app/Frameworks/libswiftUIKit.dylib.
I have also tried publishing the app without stripping Swift symbols, when publishing from Xcode
This gave yet another result:
This bundle is invalid - Your archive contains paths that are not allowed: ( "AppThinning.plist" )
I'm out of ideas how to solve this. It's a strange feeling being so close to publish the app, and then struggling with this in the last step of the process.
To manually fix this problem per build, you will need to do the following:
Archive your app for Publishing.
When the Archives window pops up, go to it in Finder (right click on it and select "Reveal in Finder").
When Finder appears, we need to access the archive's content (right click and select "Show Package Contents").
Inside of the archive package, create a folder called "SwiftSupport".
Inside of the package navigate to "Product/Applications/YourAppName.app/Frameworks" (You will need to right click on the .app and select "Show Package Contents").
Copy all the swift ".dylib" files inside of the Frameworks directory.
Navigate back to "SwiftSupport" and paste those copied libraries.
Now Launch Xcode and load Organizer (Window -> Organizer).
Find your app in the Archives and "Upload to App Store...".
I was only able to get this to work using Xcode Organizer, using Xamarin always failed.
Note: I am using Visual Studio for Mac Community 7.3.2 (build 12).
This is copied from my answer found here.
Okay, so i solved my issue. It turns out that Xamarin doesn't yet provide support for Swift bindings.
A library i was using (Xamarin.iOS.CameraViewController) was using Swift bindings, using Xamarin.Swift3.Support. However, this version does not work with Xcode 9.0.1 as Xcode changes structure for the Swift libraries for each version according to the author of Xamarin.Swift3.Support.
I removed Xamarin.iOS.CameraViewController and all Xamarin.Swift3 references and the app completed processing.

Ionic, Apple AppStore Submission

When I upload my app to app store, I encounter this problem while validation:
Error Message:
Couldn't find platform family in Info.plist CFBundleSupportedPlatforms or Mach-O LC_VERSION_MIN for sfnt2woff
And in the error log, I get this:
Unable to validate your application:
The path '/var/folders/hm/.../MyApp.ipa' does not contain a file
I use Ionic Framework for my app. It is a very simple app.
I am using XCode 7.1 and recently tested my app on iOS 9. Everything works fine (Build Success, Achive Success) up until the submission step.
Can anyone tell what's going wrong here?
If this is a Cordova project, check inside your www folder. You probably have an ionicons folder in there with a binary named "sfnt2woff" deep inside it. Just delete that binary (or the entire build folder) and archive again.

Xcode 7.0.1 - Invalid Swift Support - The SwiftSupport folder is missing.

I try to publish on AppStore an App that contains Swift 2.0 files, but I receive the following email:
Dear developer,
We have discovered one or more issues with your recent delivery for
"EMO MILANO". To process your delivery, the following issues must be
corrected:
Invalid Swift Support - The SwiftSupport folder is missing. Rebuild
your app using the current public (GM) version of Xcode and resubmit
it.
Once these issues have been corrected, you can then redeliver the
corrected binary.
Regards,
The App Store team
I read the following thread oh stackoverflow (Invalid Binary Or Invalid Swift Support Invalid Swift Support / invalid implementation of swift) but I don't find any solution.
I Have a project that has multiple target and uses Cocoa pods.
This is a screenshot of the project navigator:
Ideas?
To be safe, all components of your app should be built with the same version of Xcode and the Swift compiler to ensure that they work together.
I think you need to do a pod clean and install. I reckon one of your swift pods was created on a old version of Xcode, you updated Xcode and then tried to do a submission to the app store.
Read the apple swift blog about binary compatibility and frameworks
You will also want to specify that your embedded content contains swift in the build settings:
EMBEDDED_CONTENT_CONTAINS_SWIFT
Enable this setting to indicate that content embedded in a target's product contains Swift code, so that the standard Swift libraries can be included in the product.
I just resolved an instance of this problem with Apple support.
The problem turned out to be some junk files were being included in the IPA file from my CI/CD system. In particular I had a .gitkeep file which came from a rsync command, and a .DS_Store file which I put there indirectly by poking around with Finder.
The fix was to tighten the rsync command I was using to import some frameworks from Jenkins to exclude .gitkeep, .DS_Store and any other dot-files.
YMMV. The support engineer agreed that it was a confusing error message.

Resources