Ionic cordova build ios fails with exit code 1


#1

I keep getting the code sign error in Xcode. I have tried many solutions but nothing seems to work. If anyone came across the similar issue with an ionic 3 project, please share your views

CodeSign /Users/ssinghparihar/Library/Developer/Xcode/DerivedData/MyApp-dznrwwlxmvwyvradfotdihdfksht/Build/Products/Debug-iphoneos/MyApp.app
    cd /Users/xxxxx/projects/ionic_app/platforms/ios
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    
Signing Identity:     "iPhone Developer: "
Provisioning Profile: "iOS Team Provisioning Profile: *"
                     
    /usr/bin/codesign --force --sign 7F40044D6CC523801CF26B1D510EF87DBEE4743C --entitlements /Users/ssinghparihar/Library/Developer/Xcode/DerivedData/MyApp-dznrwwlxmvwyvradfotdihdfksht/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/MyApp.app.xcent --timestamp=none /Users/ssinghparihar/Library/Developer/Xcode/DerivedData/MyApp-dznrwwlxmvwyvradfotdihdfksht/Build/Products/Debug-iphoneos/MyApp.app

/Users/ssinghparihar/Library/Developer/Xcode/DerivedData/MyApp-dznrwwlxmvwyvradfotdihdfksht/Build/Products/Debug-iphoneos/MyApp.app: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1