iosios-app-extension

Installation Fails on iOS 18.4: NSExtension Dictionary Missing in Info.plist for Default Translation App Extension


I have followed the instructions outlined in: Preparing your app to be the default translation app. However, when I attempt to run my app on my iPhone (iOS 18.4) or a simulator, the installation fails after building, displaying the following error:

Appex bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.k891o9/extracted/TestTrans.app/PlugIns/TestTransExtension.appex with id com.faichou.TestTrans.TestTransExtension does not define an NSExtension dictionary in its Info.plist


Solution

  • The issue you’re encountering is likely due to an incorrect default template by Apple (wtf).

    First, update the EXExtensionPointIdentifier in your extension’s Info.plist to the correct value: com.apple.public.translation-ui-provider

    Next, in your main app target, go to Build Phases > Embed Foundation Extensions, and make sure you update the Destination for your extension (e.g., TranslatorExtension.appex) from Plugins and Foundation Extensions to ExtensionKit Extensions.

    After making these changes, your project should build successfully.