Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Cordova - The path for Info.plist dont exist #126

Open
ninaDeimos opened this issue May 30, 2024 · 6 comments
Open

iOS Cordova - The path for Info.plist dont exist #126

ninaDeimos opened this issue May 30, 2024 · 6 comments

Comments

@ninaDeimos
Copy link

We're using the iOS Cordova Plugin and followed the documentation and the build worked, but our client reported, that they couldn't start the app, after they installed it through MDM (it works if I install it directly on the developer device). They suggested to us to change all frameworks in Xcode from "Do not embed" to "Embed & Sign". Now after we did that, the build is failing.

Here is the part of the log output, that I think is relevant:

2024-05-29 17:08:48.638 CGAppCLPrepTool[67908:7671714] /Users/jenkins/Library/Developer/Xcode/DerivedData/App-amygmmqmwyvpkdgealbdjymljsaq/Build/Intermediates.noindex/ArchiveIntermediates/MobileResponder/InstallationBuildProductsLocation/Applications/App.app/App
2024-05-29 17:08:49.051 CGAppCLPrepTool[67908:7671714]

App has: MDXSymbols?0 MDXSDKFrameworkFound?1 OpenSSLFIPSModuleFound?0 DefaultPoliciesXML?0 CitrixDylib?0 DualModeFrameworkFound?0 CTXMAMFrameworksFound?0
WARNING: App will not work as expected when run in Premium/AppSpecific mode.

2024-05-29 17:08:49.063 CGAppCLPrepTool[67908:7671714] the policy metadata file is (null)_policy_metadata.xml
2024-05-29 17:08:49.063 CGAppCLPrepTool[67908:7671714] the Whole path for policy metadata file is /Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/Tools/Data/(null)_policy_metadata.xml
2024-05-29 17:08:49.063 CGAppCLPrepTool[67908:7671714] /Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/Tools/Data/(null)_policy_metadata.xml file does not exist
/Users/jenkins/Library/Developer/Xcode/DerivedData/App-amygmmqmwyvpkdgealbdjymljsaq/Build/Intermediates.noindex/ArchiveIntermediates/MobileResponder/InstallationBuildProductsLocation/Applications/App.app: code object is not signed at all
2024-05-29 17:08:49.394 CGAppCLPrepTool[67908:7671714] [ManifestLib] Code signature may not exist. Using all default to resign the app.
2024-05-29 17:08:49.793 CGAppCLPrepTool[67908:7671714] [ManifestLib] Error:- The path for Info.plist dont exist
2024-05-29 17:08:49.795 CGAppCLPrepTool[67908:7671714] [ManifestLib] Error:- Could not add URLScheme1 in Info.plist
2024-05-29 17:08:49.795 CGAppCLPrepTool[67908:7671714] [ManifestLib] Error:- We are not able to add MobileApp section into manifest XML file

Failed to generate this file: manifest.xml
------------------------------
2024-05-29 17:08:49.798 CGAppCLPrepTool[67908:7671714] [CommandLine] Failed to generate this file: manifest.xml
------------------------------

Command Line Interface for MDX Toolkit, version 24.2.0 - Copyright 2021 Citrix Systems, Inc. All rights reserved. (Env:Test)

Option: inputFile (/Users/jenkins/Library/Developer/Xcode/DerivedData/App-amygmmqmwyvpkdgealbdjymljsaq/Build/Intermediates.noindex/ArchiveIntermediates/MobileResponder/BuildProductsPath/Release-iphoneos/App.app)
Option: outputFile (/Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/Tools/App.mdx)
Option: storeURL (https://gov.mobile.admin.ch/)
Option: appType (sdkapp)
Option: packageId (F6FB93DD-25EA-4F39-8CB5-AD63B20A9B8F)
Option: entitlements (/Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/App/App/App.entitlements)
Option: appIdPrefix (7XKC8RSB3W)
Option: minPlatform (10.0)

Validating input parameters......
------------------------------

Generating manifest xml......
------------------------------
Command PhaseScriptExecution failed with a nonzero exit code

Can I get any support on this issue?

@ShawnInTibco
Copy link

ShawnInTibco commented May 30, 2024

Hi @ninaDeimos , got you issue.

Seems like you didn't config the id of APP?
Please check the file: /Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/config.xml
supposed to be:
<widget id="com.citrix.cordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets"

The error:
2024-05-29 17:08:49.063 CGAppCLPrepTool[67908:7671714] the policy metadata file is (null)_policy_metadata.xml
is expected to be:
2024-05-29 17:08:49.063 CGAppCLPrepTool[67908:7671714] the policy metadata file is (bundle ID of your APP)_policy_metadata.xml

@ninaDeimos
Copy link
Author

ninaDeimos commented May 30, 2024

Hi @ShawnInTibco
Thanks for your answer.
Since We're using Capacitor and not (pure) Cordova, there is no config.xml. But the App ID is configured in capacitor.config.ts. And in the log I also see it as an exported environment variable. The log further down is logged before the log snippet I already posted. I shortened it, because it would be too much to read, but the App ID is there. Also note that the build worked, before I configured the frameworks to be embedded, so the App was found there. So I think somehow the CGAppCLPrepTool only has problems with the App ID in that case, but I don't understand why and also not how to fix it.

....
export PRESERVE_DEAD_CODE_INITS_AND_TERMS\=NO
export PRIVATE_HEADERS_FOLDER_PATH\=App.app/PrivateHeaders
export PRODUCT_BUNDLE_IDENTIFIER\=hexagon.si.ch.mobileresponder.standard.bazg
export PRODUCT_BUNDLE_PACKAGE_TYPE\=APPL
export PRODUCT_MODULE_NAME\=App
export PRODUCT_NAME\=App
....

@ninaDeimos
Copy link
Author

The CGAppCLPrepTool must take the App ID from some environment variable, right? Because it is not an input parameter/option. Can you tell me, which variable it expects to find the App ID in?

@ninaDeimos
Copy link
Author

So, as a workaround, I created a file (null)_policy_metadata.xml and put it in the Data folder, where the CGAppCLPrepTool is looking for it. In that case the log output changes to

2024-05-30 10:09:25.015 CGAppCLPrepTool[5163:8184266] /Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/Tools/Data/(null)_policy_metadata.xml file does exist

But otherwise, nothing changes. The build still fails, and the error is "The path for Info.plist dont exist"

@ShawnInTibco
Copy link

ShawnInTibco commented May 31, 2024

Hi @ninaDeimos , I'm not so familia to Capacitor, will investigate and try to fix it in future version.
Open an ticket to support if you are in urgency.

@ShawnInTibco
Copy link

So, as a workaround, I created a file (null)_policy_metadata.xml and put it in the Data folder, where the CGAppCLPrepTool is looking for it. In that case the log output changes to

2024-05-30 10:09:25.015 CGAppCLPrepTool[5163:8184266] /Users/jenkins/Data/workspace/mr-standard-capacitor-bazg/ios/Tools/Data/(null)_policy_metadata.xml file does exist

But otherwise, nothing changes. The build still fails, and the error is "The path for Info.plist dont exist"

not a good idea. Seems like CGAppCLPrepTool was trying to find your .app path but didn't get it. all the files "info.plist. policy_mate.xml" are in .app file.
Just a possible cause. Like last comment, will fix it in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants