Dev Journalby < absjabed />

Back

ios15

Just Recently Apple released iOS 15, and overnight almost 20~30% of my enterprise app users started complaining that they can't use the apps anymore after installing the update. My apps are React-Native apps, built with the latest version of Xcode and macOS when I released those apps.

So I thought of start working with these apps' new updates before the scheduled timeframe. And I think I found a short-cut solution for that and will be working on the updates later on the scheduled time.

TL;DR: Start reading from 3.2 for the Quick-fix.

1. What was the problem?

"YourAppName" Needs to Be Updated or code signature version is no longer supported on iOS 15

With the introduction of iOS 15, iPadOS 15, tvOS 15, and watchOS 8, the system checks for a new signature format that uses DER (Distinguished Encoding Rules) to embed entitlements into your app’s signature.

So the apps signed with a previous signature format do not launch and might show a message telling "YourAppName" Needs to Be Updated or code signature version is no longer supported.

ios15-issue

2. Which apps are most affected?

Apps that are distributed with Ad Hoc or Apple Developer Enterprise Program (In-house distribution) are mostly affected by this.

And if your apps are distributed through App Store or TestFlight. Your app already has the new signature format which has been taken care of by App Store Connect automatically.

3. What caused the problem for iOS 15 and what's the solution?

  • 3.1 > App built with old macOS version which is 10.13 or lower which doesn't have Latest Code Signature Format

    • Update your macOS version to 10.15 (Big Sur) or later.
    • Update your Xcode version to Xcode 12.5 or later.
    • Rebuild and redistribute your app.
  • 3.2 > App built with MacOS 10.14 (Mojave) or 10.15 (Catalina) and Xcode (11.7 ~ 12.4)

    • Your apps .ipa file might already have the Latest Code Signature Format but it's not enforced to sign the code with it, so we will do it now.

    • Rename YourApp.ipa to YourApp.zip

    • Extract it. You'll get a Payload directory that contains YourApp.app file.

    • Open the terminal, cd to your Payload directory.

    • Run codesign -dv /YourApp.app

    • In the output, if any value of less than CodeDirectory v=20400, you need to re-sign your app.

      • If the code directory value is 20400 or higher, and the app does not install on iOS 15 confirm that you have correctly signed any nested code, for example, an app extension, a framework, or a bundled app.
    • So to Re-sign the app Run

      • codesign -s "CERTIFICATE_NAME_IN_KEY_CHAIN" -f --preserve-metadata --generate-entitlement-der /path/to/YourApp.app
      • Ignore the warning Warning: default usage of --preserve-metadata implies "resource-rules" (deprecated in Mac OS X >= 10.10)!
    • Run zip command zip -ru yourapp_resigned.ipa Payload.

    • Done. You can redistribute the new IPA now.

  • 3.3 > App built with MacOS 11 (Big Sur) and Xcode 12 or later

    • Seriously bro! What are you doing here?

    • Big Sur automatically signs your app with the new signature format so you and your users should be happy and chilling by now.

    • But thanks for your time for review this article.


That's it for today, Thanks for reading the article.

You can share this article if you found this informative.

Please let me know if you face any issue while working with this.

And find me on social media LinkedIn, Twitter for any queries or networking.

Stay Blessed & Stay Safe.


Thanks for your time

Happy Coding :)

Resources

developer.apple.com

Observing "App needs to be updated" - stackoverflow

code signature version is no longer supported

React-Native Preparing Your App for iOS 15 and Android 12

---------- devJournal ----------

created by absjabed; powred by gatsbyjs gatsby © 2022