How to fix "Termination Reason: Namespace CODESIGNING, Code 0x2" error in flutter?

7,623

Solution 1

The reason the app was crashing because when you execute flutter run the app runs in debug mode. Adhoc build requires release configuration in the flutter project.

When you run flutter build ios --release it sets the Xcode to release configuration post which you can create an Adhoc build and share it via diawi link.

Many people are struggling with this. I myself spent a few days figuring out what was the issue.

Solution 2

After a few days set back, I've finally found the reason for this error. Xcode defaults to building a debug build. To avoid this, enter "flutter build ios" in the flutter terminal. Then build in Xcode

Share:
7,623
azim vaziri
Author by

azim vaziri

Updated on December 15, 2022

Comments

  • azim vaziri
    azim vaziri over 1 year

    I wrote an app with flutter and it is running on my iPhone in debug mode. Now i want to send it to my employer, So i've create an ad-hoc version of my app and create a "Diawi" link. After that i did check the app on my device and the app is installed on my device but not working and keep crashing after tap on the app icon.

    My app icon was a round icon and i did change it to square.

    Here i found when checking windows->devices :

    Exception Type: EXC_BAD_ACCESS (SIGKILL - CODESIGNING)

    Exception Subtype: UNKNOWN_0x32 at 0x00000001046c1c80

    .

    .

    .

    Termination Reason: Namespace CODESIGNING, Code 0x2

    Triggered by Thread: 13

    Is it possible that it's related to creating a bad provisioning profile?

    Is there anyone faced this problem?

    Any help would be appreciated.