eswarjk edited a comment on issue #764:
URL: https://github.com/apache/cordova-ios/issues/764#issuecomment-752067425


   We are using Cordova 9.0
   Cordova iOS: 6.1.0
   Xcode: 11.3.1
   
   After adding watch app extension to my existing iOS mobile app. getting 
below error.
   
   CordovaError: Could not parse 
/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/working/myapp_watch_working_Bak/platforms/ios/myapp.xcodeproj/project.pbxproj:
 CordovaError: **Could not find *-Info.plist file, or config.xml file**.
       at handleBuildSettings 
(/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/working/myapp_watch_working_Bak/platforms/ios/cordova/lib/prepare.js:279:31)
       at updateProject 
(/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/working/myapp_watch_working_Bak/platforms/ios/cordova/lib/prepare.js:226:12)
       at updateWww.then 
(/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/working/myapp_watch_working_Bak/platforms/ios/cordova/lib/prepare.js:50:21)
       at process._tickCallback (internal/process/next_tick.js:68:7)
       at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
       at startup (internal/bootstrap/node.js:283:19)
       at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
   
   To fix this issue, as @leogoesger mentioned I have added following code. 
This issue got resolved. But I am facing another issue when I run cordova build 
iOS command (log added below).
   
   Could you help me in resolving following issue?
   
   
   **@leogoesger  suggested code:**
   
   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)
     );
   });
   
   
   
   **_New issue after adding @leogoesger code:_**
   
   Running command: xcodebuild -workspace myapp.xcworkspace -scheme 
myapp-configuration Debug -sdk iphonesimulator -destination platform=iOS 
Simulator,name=iPhone 11 Pro Max build 
CONFIGURATION_BUILD_DIR=/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/platforms/ios/build/emulator
 
SHARED_PRECOMPS_DIR=/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/platforms/ios/build/sharedpch
   Build settings from command line:
       CONFIGURATION_BUILD_DIR = 
/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/platforms/ios/build/emulator
       SDKROOT = iphonesimulator13.2
       SHARED_PRECOMPS_DIR = 
/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/platforms/ios/build/sharedpch
   
   note: Using new build system
   note: Planning build
   note: Constructing build description
   **error: unable to resolve product type 
'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator' (in 
target 'myapp Extension' from project 'myapp')
   error: unable to resolve product type 
'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator' (in 
target 'myapp Extension' from project 'myapp')
   error: unable to resolve product type 
'com.apple.product-type.application.watchapp2' for platform 'iphonesimulator' 
(in target 'myapp' from project 'myapp')
   error: unable to resolve product type 
'com.apple.product-type.application.watchapp2' for platform 'iphonesimulator' 
(in target 'myapp' from project 'myapp')**
   
   ** BUILD FAILED **
   
   Command finished with error code 65: xcodebuild 
-workspace,myapp.xcworkspace,-scheme,myapp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS
 Simulator,name=iPhone 11 Pro 
Max,build,CONFIGURATION_BUILD_DIR=/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/platforms/ios/build/sharedpch
   xcodebuild: Command failed with exit code 65
   Error: xcodebuild: Command failed with exit code 65
       at ChildProcess.whenDone 
(/Users/pblrmac/Desktop/Eswar_Watch/watch_With_Notifications/myapp_watch_working_Bak/node_modules/cordova-common/src/superspawn.js:136:25)
       at ChildProcess.emit (events.js:189:13)
       at maybeClose (internal/child_process.js:970:16)
       at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to