Problem releasing iOS-App to App Store
We use bblanchon.PDFium.iOS in our app. We were able to deliver our app to the App Store a couple of weeks earlier. Now when we try to build a new version of our app we run into the following error message when trying to push the *.ipa-package to the store:
Asset validation failed (90171) Invalid bundle structure. The “Apliconus.InfieldClassicMauiApp.app/libpdfium.dylib” binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle (ID: fafe60c1-a69b-4fbc-9812-3e97add8905a)
Unfortunately we do not know why this stopped working. Do you know if there has been a change in the Nuget-package that requires us to handle things differently?
Any help would be highly appreciated.
We are having the same issue when using the PDFtoImage library (https://github.com/sungaila/PDFtoImage)
To release to the App Store I had to wrap the library as a Framework.
- Create a folder called pdfium.framework
- Copy the dylib into the folder and rename it to pdfium
- Change the install name
install_name_tool -id @rpath/pdfium.framework/pdfium pdfium.framework/pdfium - You can check that the install name was set correctly with
otool -L pdfium.framework/pdfium - Create an Info.plist in the pdfium.framework. I just copied one from another framework and modified the values as necessary. You can use
otool -l pdfium.framework/pdfiumto get info about the minimum OS version ,etc. - Sign the framework:
codesign --force --deep --sign - pdfium.framework
Now you should be able to use the framework as any other iOS framework.
More information here:
https://stackoverflow.com/questions/53818772/embedding-a-dylib-inside-a-framework-for-ios
https://stackoverflow.com/questions/78706187/how-to-use-ios-framework-files-in-net-8-0-maui
It would be great if the the iOS dylib would come prepacked as a framework. I would take care to include them into the NuGet package.
Otherwise, a static lib would help, too. But I have no idea how easy it would be to build that.
Don't I need a certificate to codesign?
Don't I need a certificate to codesign?
I am not sure. I have seen unsigned frameworks, in these cases the developer will have to sign these themselves before submitting to the Apple Store.
Maybe some iOS/macOS developer can comment on this. Maybe @torfluor?