Xcode error when submitting iOS Ionic app to App Store

Hi there, I’ve integrated Sentry into my Ionic app. All works fine locally testing through Chrome and when running on a device through Xcode. However, when I go to submit a production build of the app for testing through TestFlight I get this error in Xcode -

“Invalid Segment Alignment. The app binary at ‘myApp.app/Frameworks/Sentry.framework/Sentry’ does not have proper segment alignment. Try rebuilding the app with the latest Xcode version”.

“The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple’s linker.”

Does anyone have any ideas on how to resolve this?




I’ve fixed this issue already, a user on Github also had this problem.

Try his solution by readding the whole platform.

1 Like

Thanks HazAT - managed to archive and upload to App Store just fine now :+1:

1 Like

Hi, @Hazat I’m having the same problem. I know that the script you mention in github’s post fixes the issue if you build with XCode, however, I am working with a CI tool (Nevercode) and that script that does not work because the environment variables that this scripts uses are not defined in that service.

Is there any way to fix this with ionic commands only?

Hey, so there is not ionic command afaik.
I would write their (Nevercode) support and ask how to run this script.