Open 2xSamurai opened 5 years ago
hey @2xSamurai are you able to solve this issue ? I am getting same issue right now
same here
In ios/cordova/lib/projectFile.js
var xcBuildConfiguration = xcodeproj.pbxXCBuildConfigurationSection();
var plist_file_entry = _.find(xcBuildConfiguration, function(entry) {
return entry.buildSettings && entry.buildSettings.INFOPLIST_FILE;
});
with
var projectName = fs
.readdirSync(project_dir)
.find(d => d.includes(".xcworkspace"))
.replace(".xcworkspace", "");
var xcBuildConfiguration = xcodeproj.pbxXCBuildConfigurationSection();
var plist_file_entry = _.find(xcBuildConfiguration, function(entry) {
return (
entry.buildSettings &&
entry.buildSettings.INFOPLIST_FILE &&
entry.buildSettings.INFOPLIST_FILE.includes(projectName)
);
});
Detail here for how we solved it. https://github.com/apache/cordova-ios/issues/764
Bug Report
After adding Notification Service Extension in Xcode, cordova build command from cli fails.
Problem
What is expected to happen?
Build without any issues.
What does actually happen?
App is only getting built successfully after removing 'Notification Service Extension' inside Xcode.
Information
The verbose console log of error.
`MacBook-Pro:AppName username$ ionic cordova run ios --verbose ionic:lib Terminal info: { tty: true, ci: false, windows: false } +0ms ionic:lib CLI global options: { _: [ 'cordova', 'run', 'ios' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +4ms ionic:lib:project Project type from config: Ionic 1 (ionic1) +0ms ionic:lib:project Project details: { configPath: '/Users/username/Work/Projects/AppName/Code/AppName/ionic.config.json', errors: [], context: 'app', type: 'ionic1' } +0ms ionic Context: { binPath: '/usr/local/lib/node_modules/ionic/bin/ionic', libPath: '/usr/local/lib/node_modules/ionic', execPath: '/Users/username/Work/Projects/AppName/Code/AppName', version: '4.9.0' } +0ms ionic:lib:integrations:cordova:config Using config.xml: /Users/username/Work/Projects/AppName/Code/AppName/config.xml +0ms ionic:lib:telemetry Sending telemetry for command: 'ionic cordova run' [ 'ios', '--verbose', '--interactive', '--color' ] +0ms ionic:lib:hooks Looking for ionic:build:before npm script. +0ms ionic:lib:build Looking for ionic:build npm script. +0ms
ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms ionic:cli-framework:utils:process onBeforeExit handler: running 2 functions +0ms ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +55ms`
Command or Code
ionic cordova build ios
Environment, Platform, Device
`MacBook-Pro:AppName username$ ionic info
Ionic:
ionic (Ionic CLI) : 4.9.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic1 1.3.5 @ionic/v1-toolkit : 1.0.8
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 27 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/username/Library/Android/sdk) ios-deploy : 1.9.2 ios-sim : 5.0.13 NodeJS : v8.3.0 (/Users/username/.nvm/versions/node/v8.3.0/bin/node) npm : 5.3.0 OS : macOS Mojave Xcode : Xcode 10.2 Build version 10E125 `
Version information
Checklist
Any help would be much appreciated.
Note: I have been scouring the web for almost 3 days now. Without any success. When I delete the Notification Service Extension target from XCode. Building from the cli once again starts to work.