Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x ] 3.x
[ ] 4.x
I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
Current behavior:
When i build my ios app i'm getting the following error:
`* BUILD FAILED *
The following build commands failed:
CompileC /Users/tdit0703/Library/Developer/Xcode/DerivedData/SC_Dahenfeld-gnijudycyxoemmgdlqxxbqotfqht/Build/Intermediates.noindex/SC\ Dahenfeld.build/Debug-iphonesimulator/SC\ Dahenfeld.build/Objects-normal/x86_64/MyMainViewController.o SC\ Dahenfeld/Plugins/com.telerik.plugins.wkwebview/MyMainViewController.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/tdit0703/IdeaProjects/sc-dahenfeld/platforms/ios/cordova/build-debug.xcconfig,-workspace,SC Dahenfeld.xcworkspace,-scheme,SC Dahenfeld,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/tdit0703/IdeaProjects/sc-dahenfeld/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/tdit0703/IdeaProjects/sc-dahenfeld/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios (exit code 1).`
Also when i build it in XCode 9.1 it can not find the file 'Cordova/CDVLocalStorage.h'.
Expected behavior:
Build should be successful.
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
cli packages:
@ionic/cli-utils : 1.18.0
ionic (Ionic CLI) : 3.18.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.0
Cordova Platforms : android 6.3.0 ios 4.5.3
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.8.6
ios-sim : 5.0.8
Node : v7.0.0
npm : 2.15.12
OS : macOS Sierra
Xcode : Xcode 9.1 Build version 9B55
Hello! Thank you for opening an issue with us! Would you be able to provide a sample application via GitHub that demonstrates the issue you are having? Doesn't have to be your actual application, just a simple one that exhibits the same behavior. Thanks for using Ionic!
I think this is related to the Telerik wkwebview plugin. It does not work with cordova iOS v4+. So you either need to revert to v3 of the iOS platform or remove the telerik-wkwebview plugin.
in your error dump I can see it is the below item that is causing errors:
com.telerik.plugins.wkwebview
try cordova-plugin-ionic-webview instead, it is the ionic fork of the official wkwebview plugin which does work with up to date cordova platforms.
I have found that build fails after adding any swift files. With pure Object C code, build is working fine.
I removed the plugin "com.telerik.plugins.wkwebview" but it does not work. Now i get the following error:
`* BUILD FAILED *
The following build commands failed:
Ld build/emulator/SC\ Dahenfeld.app/SC\ Dahenfeld normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/tdit0703/IdeaProjects/sc-dahenfeld/platforms/ios/cordova/build-debug.xcconfig,-workspace,SC Dahenfeld.xcworkspace,-scheme,SC Dahenfeld,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/tdit0703/IdeaProjects/sc-dahenfeld/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/tdit0703/IdeaProjects/sc-dahenfeld/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios (exit code 1).`
You can try this repo: https://github.com/tdittmann/sc-dahenfeld Please use the dev-branch.
Hard to tell from the error but try opening you project once in xcode and making sure that signing is set to auto and that a valid developer profile is selected then try building again.
Already tried but i get the following error when building:
Apple Mach-O Linker Error
duplicate symbol _OBJC_CLASS_$_GCDWebServerErrorResponse in:
/Users/tdit0703/Library/Developer/Xcode/DerivedData/SC_Dahenfeld-gnijudycyxoemmgdlqxxbqotfqht/Build/Intermediates.noindex/SC Dahenfeld.build/Debug-iphonesimulator/SC Dahenfeld.build/Objects-normal/x86_64/GCDWebServerErrorResponse.o
SC Dahenfeld/Plugins/cordova-plugin-webserver/GCDWebServer.framework/GCDWebServer(GCDWebServerErrorResponse.o)
ld: 151 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ok, now it works... what i did?
... and installed it all again.
Sorry but you can re-open this one...got the same error on build with ios but with different message:
Lipides/Plugins/cordova-plugin-ionic-webview/GCDWebServerDataRequest.m:59:10: error: no visible @interface for 'NSData' declares the selector 'appendData:'
[_data appendData:data];
~ ^~~~~~
1 error generated.
...
...
...
The following build commands failed:
CompileC /Users/webmaster-fazio/Library/Developer/Xcode/DerivedData/Sucres_Lipides-aiztrnhqilexbofkpapjynfxnanc/Build/Intermediates/Sucres\ Lipides.build/Debug-iphonesimulator/Sucres\ Lipides.build/Objects-normal/x86_64/GCDWebServerDataRequest.o Sucres\ Lipides/Plugins/cordova-plugin-ionic-webview/GCDWebServerDataRequest.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild
...
...
...
my config:
cli packages:
@ionic/cli-utils : 1.18.0
ionic (Ionic CLI) : 3.18.0
global packages:
cordova (Cordova CLI) : 6.5.0
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : ios 4.3.1
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.0
ios-sim : 5.0.13
Node : v7.2.1
npm : 4.0.5
OS : OS X Yosemite
Xcode : Xcode 7.2 Build version 7C68
've try to remove all things as @tdittmann say but nothing change for me.
And with a simple blank starter project 've got the same issue... and in an other project with the following config:
cli packages:
@ionic/cli-utils : 1.18.0
ionic (Ionic CLI) : 3.18.0
global packages:
cordova (Cordova CLI) : 6.5.0
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : browser 4.1.0 ios 4.3.1
Ionic Framework : ionic-angular 3.7.1
System:
ios-deploy : 1.9.0
ios-sim : 5.0.13
Node : v7.2.1
npm : 4.0.5
OS : OS X Yosemite
Xcode : Xcode 7.2 Build version 7C68
config.xml:
...
<preference name="UIWebViewBounce" value="false" />
...
Have a * BUILD SUCCEEDED *
Maybe is cause form the ionic-angular update??
from cordova-plugin-ionic-webview ???
Please... any help is welcome ;-)
after long long search... have find a tempory fix solution but not shure if is the right way...
Let me explain:
The bug coming from cordova-plugin-ionic-webview and to tempory fix build faild you have to update config.xml with the following config added:
...
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
...
then remove all platform, delete plugins+platform+node_modules folder and run
$ npm install
$ ionic cordova platform add ios
$ ionic cordova prepare ios
$ ionic cordova build ios --prod
and you will have a * BUILD SUCCEEDED *
@kensodemann Do you still need a sample application? I have this problem too.
@chuchuva - if you would like me to have a look at the issue, then yes, provide a link to the repo and I can have a look. Otherwise what you generally want to do is make sure you are not using any deprecated plugins. Especially the console plugin, and then:
$ rm -rf node_modules
$ rm -rf platform
$ npm i
$ ionic cordova platform add ios
$ ionic cordova prepare ios
$ ionic cordova build ios --prod
@FazioNico I create a new blank project and do something like below
...
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
...
$ npm install
$ ionic cordova platform add ios
$ ionic cordova prepare ios
$ ionic cordova build ios --prod
But I still get error
Lipides/Plugins/cordova-plugin-ionic-webview/GCDWebServerDataRequest.m:59:10: error: no visible @interface for 'NSData' declares the selector 'appendData:'
[_data appendData:data];
~ ^~~~~~
1 error generated.
Here is my Environment
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 24.2
ios-deploy : 1.9.2
Node : v8.9.1
npm : 5.5.1
OS : OS X Yosemite
Xcode : Xcode 7.2.1 Build version 7C1002
any suggestion?
@fbiceo - you appear to be on a super old version of Xcode. That could be a large contributor to your current woes.
I followed your steps as outlined above and it worked just fine. Below is my Ionic info, and the only significant difference I see is Xcode version (OS X version is also significantly different, but that is probably not a contributing factor here).
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.0.2
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v8.9.0
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /Users/kensodemann/Library/Android/sdk/
Misc:
backend : pro
It would be nice if Ionic would work with older versions of Xcode. Cordova supports Xcode 7.0: https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
@chuchuva - the Ionic Framework itself doesn't particularly care what version of Xcode you are using. It is going to be Cordova and the plugins that you use that do. In the case that @fbiceo had above, it looks like it was the cordova-plugin-ionic-webview plugin. If you are having a problem with a particular plugin not building on your system due to having an older version of Xcode it would be best to log an issue in that plugin's repo to see if the maintainers of that repo would be interested in supporting the older version.
iOS
platforms/ios on XCodeio.ionic.starter in all files for a unique identifierionic cordova run ios --device --livereloadI am using the phonegap-plugin-push plugin which uses Google libraries for Firebase. This caused my ios builds to fail with error code 65. I then remembered a step that I did a while back to install the pod file for the ios platform. After installing the pod file my ios builds started succeeding again. I guess I need to document all these things that can easily be forgotten.
cd platforms/ios
pod install
Note: You may need to install cocoa pods on your development machine to install pod files.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
after long long search... have find a tempory fix solution but not shure if is the right way...
Let me explain:
The bug coming from
cordova-plugin-ionic-webviewand to tempory fix build faild you have to update config.xml with the following config added:then remove all platform, delete plugins+platform+node_modules folder and run
and you will have a * BUILD SUCCEEDED *