Error when build ios

hello
i got this error when build app for ios

⠦ Running command [14:41:42] lint finished in 19.56 s
:heavy_multiplication_x: Running command - failed!

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build ios (exit code 1):

my package.json is

{
    "name": "commerce",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.1.2",
        "@angular/compiler": "4.1.2",
        "@angular/compiler-cli": "4.1.2",
        "@angular/core": "4.1.2",
        "angularfire2": "^2.0.0-beta.8",
        "firebase": "^3.7.8",
        "@angular/forms": "4.1.2",
        "@angular/http": "4.1.2",
        "@angular/platform-browser": "4.1.2",
        "@angular/platform-browser-dynamic": "4.1.2",
        "@ionic-native/core": "3.7.0",
        "@ionic-native/onesignal": "^3.10.3",
        "@ionic-native/splash-screen": "3.7.0",
        "@ionic-native/status-bar": "3.7.0",
        "@ionic/storage": "2.0.1",
        "cordova-android": "^6.2.3",
        "cordova-ios": "^4.4.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "ionic-angular": "3.3.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "onesignal-cordova-plugin": "^2.1.1",
        "rxjs": "5.1.1",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.10"
    },
    "devDependencies": {
        "@ionic/app-scripts": "1.3.7",
        "@ionic/cli-plugin-cordova": "1.2.1",
        "@ionic/cli-plugin-ionic-angular": "1.2.0",
        "typescript": "2.3.3"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "onesignal-cordova-plugin": {},
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {}
        },
        "platforms": [
            "android"
        ]
    }
}```

What exact command are you running?
Rerun it adding --verbose at the end.
What is the “Cordova command above” mentioned in the error message?
Is this the complete error message and output?

What exact command are you running?
ionic cordova build ios

complete error is

oper/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lo
cal/bin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
/usr/sbin/chown -RH apple:staff /Users/apple/Library/Developer/Xcode/DerivedData/MyApp-fx
ktwttqqvfuizezlzhrmdsnetih/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/
UninstalledProducts/iphoneos/libCordova.a

    SetMode u+w,go-w,a+rX /Users/apple/Library/Developer/Xcode/DerivedData/MyApp-fxktwttqqvfuizez

lzhrmdsnetih/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledPro
ducts/iphoneos/libCordova.a
cd “/Users/apple/Desktop/ionic 2 fin/commerate 3/platforms/ios/CordovaLib"
export PATH=”/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Devel
oper/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lo
cal/bin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
/bin/chmod -RH u+w,go-w,a+rX /Users/apple/Library/Developer/Xcode/DerivedData/MyApp-fxktw
ttqqvfuizezlzhrmdsnetih/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/Uni
nstalledProducts/iphoneos/libCordova.a

    === BUILD TARGET MyApp OF PROJECT MyApp WITH CONFIGURATION Debug ===

    Check dependencies
    Signing for "MyApp" requires a development team. Select a development team in the project edi

tor.
Code signing is required for product type ‘Application’ in SDK ‘iOS 10.3’

    ** ARCHIVE FAILED **


    The following build commands failed:
            Check dependencies
    (1 failure)
    Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/apple/Desktop/ionic

2 fin/commerate 3/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyA
pp,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,MyApp.xcarchive,archive,CONFIG
URATION_BUILD_DIR=/Users/apple/Desktop/ionic 2 fin/commerate 3/platforms/ios/build/device,SHARED_PREC
OMPS_DIR=/Users/apple/Desktop/ionic 2 fin/commerate 3/platforms/ios/build/sharedpch

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

1 Like

Hi,
You have to go to Xcode, open your built project in platform/ios/MyApp.xcodeproj and add the development team.


[23:02:34]  lint finished in 28.37 s
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build ios (exit code 1):


        (truncated) ... prune-after=345600 -fbuild-session-file=/Users/apple/Library/Developer/Xcode/
DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigr
aphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomi
c-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses
 -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value
-Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversio
n -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpoi
nter-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprec
ated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneS
imulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -W
deprecated-declarations -mios-simulator-version-min=9.0 -g -fvisibility=hidden -Wno-sign-conversion -


same error :frowning: