Error building for iOS


#1

Hi everyone,

I have an app with the following info:

cli packages: (/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/node_modules)

@ionic/cli-utils  : 1.16.0
ionic (Ionic CLI) : 3.16.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : ios 4.5.3
Ionic Framework    : ionic-angular 3.2.1

System:

ios-deploy : 1.9.2
Node       : v8.9.0
npm        : 2.15.12
OS         : macOS Sierra
Xcode      : Xcode 9.1 Build version 9B55

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

When I run
ionic cordova platform add ios
everything works as expected.

However, When I run
ionic cordova build ios
I get the following error:

diateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/OneSignalPush.dia -c /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.m -o /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/OneSignalPush.o
/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.m:196:16: warning: 'IdsAvailable:' is deprecated: Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead. [-Wdeprecated-declarations]
    [OneSignal IdsAvailable:^(NSString* userId, NSString* pushToken) {
               ^
In module 'OneSignal' imported from /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.h:32:
/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Headers/OneSignal.h:325:61: note: 'IdsAvailable:' has been explicitly marked deprecated here
+ (void)IdsAvailable:(OSIdsAvailableBlock)idsAvailableBlock __deprecated_msg("Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead.");
                                                            ^
In module 'Foundation' imported from /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.h:28:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
                                                      ^
/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.m:213:16: warning: 'registerForPushNotifications' is deprecated: Please use promptForPushNotificationsWithUserResponse instead. [-Wdeprecated-declarations]
    [OneSignal registerForPushNotifications];
               ^
In module 'OneSignal' imported from /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.h:32:
/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Headers/OneSignal.h:299:38: note: 'registerForPushNotifications' has been explicitly marked deprecated here
+ (void)registerForPushNotifications __deprecated_msg("Please use promptForPushNotificationsWithUserResponse instead.");
                                     ^
In module 'Foundation' imported from /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/SGL/Plugins/onesignal-cordova-plugin/OneSignalPush.h:28:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
                                                      ^
2 warnings generated.

Ld /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/armv7/SGL normal armv7
    cd /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/node_modules/.bin:/Users/pisaris/.nvm/versions/node/v8.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk -L/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device -F/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device -F/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework -filelist /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/armv7/SGL.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/armv7/SGL_lto.o -Xlinker -no_deduplicate -Xlinker -final_output -Xlinker /Applications/SGL.app/SGL -fobjc-arc -fobjc-link-runtime -ObjC -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device/libCordova.a -framework CoreBluetooth -framework CoreLocation -weak_framework AudioToolbox -framework StoreKit -weak_framework ImageIO -framework AVFoundation -lz -framework MessageUI -weak_framework SystemConfiguration -framework CoreTelephony -weak_framework Social -framework UserNotifications -lPods-SGL -Xlinker -dependency_info -Xlinker /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/armv7/SGL_dependency_info.dat -o /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/armv7/SGL

Ld /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/SGL normal arm64
    cd /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/node_modules/.bin:/Users/pisaris/.nvm/versions/node/v8.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk -L/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device -F/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device -F/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework -filelist /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/SGL.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/SGL_lto.o -Xlinker -no_deduplicate -Xlinker -final_output -Xlinker /Applications/SGL.app/SGL -fobjc-arc -fobjc-link-runtime -ObjC -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications /Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device/libCordova.a -framework CoreBluetooth -framework CoreLocation -weak_framework AudioToolbox -framework StoreKit -weak_framework ImageIO -framework AVFoundation -lz -framework MessageUI -weak_framework SystemConfiguration -framework CoreTelephony -weak_framework Social -framework UserNotifications -lPods-SGL -Xlinker -dependency_info -Xlinker /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/SGL_dependency_info.dat -o /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/SGL
duplicate symbol _OBJC_CLASS_$_APPEmailComposer in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-9DE15D3AAA82AD92.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-25439E0818BFE9AB.o
duplicate symbol _OBJC_METACLASS_$_APPEmailComposer in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-9DE15D3AAA82AD92.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-25439E0818BFE9AB.o
duplicate symbol _OBJC_CLASS_$_APPEmailComposerImpl in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-CD58548B5312926E.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-51AB68FD0796B69D.o
duplicate symbol _OBJC_METACLASS_$_APPEmailComposerImpl in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-CD58548B5312926E.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-51AB68FD0796B69D.o
ld: 4 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **


The following build commands failed:
	Ld /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/ArchiveIntermediates/SGL/IntermediateBuildFilesPath/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/SGL normal arm64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/cordova/build-debug.xcconfig,-workspace,SGL.xcworkspace,-scheme,SGL,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,SGL.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/pisaris/projects/batler.io_new/batler.io-ionic-3/platforms/ios/build/sharedpch

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

Can you help me understand what the error is and how I can get past it?

My config.xml contents:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.batler.sgl" version="1.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>SGL</name>
    <description>Hotel Guest app</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">HOLY Team</author>
    <content src="index.html" />
    <access origin="*" />
    <access launch-external="yes" origin="tel:*" />
    <allow-navigation href="*" />
    <allow-navigation href="http://ionic.local/*" />
    <allow-navigation href="http://192.168.1.10:8101" />
    <allow-navigation href="http://192.168.1.10:8100" />
    <allow-navigation href="http://192.168.1.69:8100" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="ShowSplashScreen" value="true" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="installLocation" value="auto" />
    <preference name="StatusBarOverlaysWebView" value="true" />
    <preference name="loadUrlTimeoutValue" value="70000" />
    <feature name="SplashScreen">
        <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
    </feature>
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <platform name="android">
        <allow-intent href="market:*" />
        <preference name="loadUrlTimeoutValue" value="70000" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <preference name="orientation" value="default" />
        <preference name="Orientation" value="all" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <icon src="resources/icon.png" />
    <engine name="android" spec="~6.3.0" />
    <engine name="ios" spec="~4.5.3" />
    <plugin name="com.unarin.cordova.beacon" spec="^3.5.2" />
    <plugin name="cordova-plugin-camera" spec="^2.4.1">
        <variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " />
    </plugin>
    <plugin name="cordova-plugin-file" spec="^4.3.3" />
    <plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
    <plugin name="cordova-plugin-filepath" spec="^1.1.0" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
    <plugin name="cordova-plugin-nativestorage" spec="^2.2.2" />
    <plugin name="cordova-sqlite-storage" spec="^2.1.0" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="cordova-plugin-crosswalk-webview" spec="^2.3.0">
        <variable name="XWALK_VERSION" value="23+" />
        <variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+" />
        <variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect" />
        <variable name="XWALK_MODE" value="embedded" />
        <variable name="XWALK_MULTIPLEAPK" value="true" />
    </plugin>
    <plugin name="cordova-plugin-screen-orientation" spec="^2.0.1" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.2.1" />
    <plugin name="de.appplant.cordova.plugin.local-notification" spec="^0.8.5" />
    <plugin name="cordova-plugin-network-information" spec="^1.3.3" />
    <plugin name="cordova-plugin-email-composer" spec="^0.8.11" />
    <plugin name="cordova-plugin-email" spec="^1.2.6" />
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-apprate" spec="^1.3.0" />
    <plugin name="onesignal-cordova-plugin" spec="^2.2.2" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
    <plugin name="cordova-plugin-console" spec="^1.1.0" />
</widget>

package.json contents:

{
  "name": "io.batler.sgl",
  "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.0",
    "@angular/compiler": "4.1.0",
    "@angular/compiler-cli": "4.1.0",
    "@angular/core": "4.1.0",
    "@angular/forms": "4.1.0",
    "@angular/http": "4.1.0",
    "@angular/platform-browser": "4.1.0",
    "@angular/platform-browser-dynamic": "4.1.0",
    "@ionic-native/app-rate": "^3.6.1",
    "@ionic-native/camera": "^3.6.1",
    "@ionic-native/core": "^3.14.0",
    "@ionic-native/device": "^3.6.1",
    "@ionic-native/file": "^3.6.1",
    "@ionic-native/file-path": "^3.8.1",
    "@ionic-native/in-app-browser": "^3.10.3",
    "@ionic-native/keyboard": "^3.6.1",
    "@ionic-native/local-notifications": "^3.12.1",
    "@ionic-native/native-storage": "^3.10.3",
    "@ionic-native/network": "^3.12.1",
    "@ionic-native/onesignal": "^3.14.0",
    "@ionic-native/screen-orientation": "^3.12.1",
    "@ionic-native/social-sharing": "^3.11.0",
    "@ionic-native/splash-screen": "3.7.0",
    "@ionic-native/status-bar": "3.7.0",
    "@ionic-native/toast": "^3.10.3",
    "@ionic-native/transfer": "^3.6.1",
    "@ionic/app-scripts": "3.0.1",
    "@ionic/storage": "2.0.1",
    "com.unarin.cordova.beacon": "^3.5.2",
    "cordova-android": "~6.3.0",
    "cordova-plugin-app-event": "^1.2.1",
    "cordova-plugin-apprate": "^1.3.0",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-crosswalk-webview": "^2.3.0",
    "cordova-plugin-device": "^1.1.6",
    "cordova-plugin-dialogs": "^1.3.3",
    "cordova-plugin-email": "^1.2.6",
    "cordova-plugin-email-composer": "^0.8.11",
    "cordova-plugin-file": "^4.3.3",
    "cordova-plugin-file-transfer": "^1.6.3",
    "cordova-plugin-filepath": "^1.1.0",
    "cordova-plugin-globalization": "^1.0.7",
    "cordova-plugin-inappbrowser": "^1.7.1",
    "cordova-plugin-nativestorage": "^2.2.2",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-screen-orientation": "^2.0.1",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.3",
    "cordova-plugin-whitelist": "^1.3.2",
    "cordova-plugin-x-socialsharing": "^5.2.1",
    "cordova-plugin-x-toast": "^2.6.0",
    "cordova-sqlite-storage": "^2.1.0",
    "cordova-uglify": "^0.2.9",
    "de.appplant.cordova.plugin.local-notification": "^0.8.5",
    "es6-promise-plugin": "^4.1.0",
    "intl": "^1.2.5",
    "ionic": "^3.4.0",
    "ionic-angular": "3.2.1",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "localforage": "^1.5.0",
    "localforage-cordovasqlitedriver": "^1.6.0",
    "onesignal-cordova-plugin": "^2.2.2",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.1.1",
    "setimmediate": "^1.0.5",
    "sw-toolbox": "3.6.0",
    "uglify-js": "^3.1.3",
    "web-animations-js": "^2.2.5",
    "woocommerce-api": "^1.4.2",
    "wpapi": "^1.1.2",
    "zone.js": "0.8.10",
    "cordova-ios": "~4.5.3"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^3.0.0",
    "crypto-js": "^3.1.9-1",
    "ionic": "3.15.2",
    "typescript": "2.2.1"
  },
  "description": "batler.io: An Ionic project",
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordova": {
    "plugins": {
      "com.unarin.cordova.beacon": {},
      "cordova-plugin-camera": {
        "CAMERA_USAGE_DESCRIPTION": " ",
        "PHOTOLIBRARY_USAGE_DESCRIPTION": " "
      },
      "cordova-plugin-file": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-filepath": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-nativestorage": {},
      "cordova-sqlite-storage": {},
      "ionic-plugin-keyboard": {},
      "cordova-plugin-crosswalk-webview": {
        "XWALK_VERSION": "23+",
        "XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
        "XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
        "XWALK_MODE": "embedded",
        "XWALK_MULTIPLEAPK": "true"
      },
      "cordova-plugin-screen-orientation": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-x-socialsharing": {},
      "de.appplant.cordova.plugin.local-notification": {},
      "cordova-plugin-network-information": {},
      "cordova-plugin-email-composer": {},
      "cordova-plugin-email": {},
      "cordova-plugin-device": {},
      "cordova-plugin-apprate": {},
      "onesignal-cordova-plugin": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-console": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  }
}

When I try to build the project using Xcode, I get the following:

duplicate symbol _OBJC_CLASS_$_APPEmailComposer in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-9DE15D3AAA82AD92.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-25439E0818BFE9AB.o
duplicate symbol _OBJC_METACLASS_$_APPEmailComposer in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-9DE15D3AAA82AD92.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposer-25439E0818BFE9AB.o
duplicate symbol _OBJC_CLASS_$_APPEmailComposerImpl in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-CD58548B5312926E.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-51AB68FD0796B69D.o
duplicate symbol _OBJC_METACLASS_$_APPEmailComposerImpl in:
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-CD58548B5312926E.o
    /Users/pisaris/Library/Developer/Xcode/DerivedData/SGL-fowjnwkqffvlimcyfauccomsrqfu/Build/Intermediates.noindex/SGL.build/Debug-iphoneos/SGL.build/Objects-normal/arm64/APPEmailComposerImpl-51AB68FD0796B69D.o
ld: 4 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks in advance!

UPDATE:
It seems that the cordova-plugin-email-composer did the trick.
I removed it and the ninstalled it again and now it works…
But I don’t understand why…


#2

Open the project in xcode. select provisioning profile and rebuild

ref https://github.com/ionic-team/ionic/issues/8464


#3

@Saravkl Thanks for your reply.
My provisioning profile is set correctly. As I state in my post, the problem is not relevant with the provisioning profile, as it gets solved when I uninstall the cordova-plugin-email-composer, and install it again.