Comments (5)
@Aarbel After saving "Legacy buiuld system settings", Xcode creates new file: platforms/ios/EverBee.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
with content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
checked with Xcode Version 11.4.1 (11E503a)
.
One could create a hook file hooks/after_platform_add/create-ios-workspaceSettings.js
:
const fs = require('fs'),
path = require("path");
const workspaceSettings = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
\t<key>BuildSystemType</key>
\t<string>Original</string>
</dict>
</plist>
`;
// Returns the project name
function getProjectName(protoPath) {
const
cordovaConfigPath = path.join(protoPath, 'config.xml'),
content = fs.readFileSync(cordovaConfigPath, 'utf-8');
return /<name>([\s\S]*)<\/name>/mi.exec(content)[1].trim();
}
module.exports = function (context) {
const
projectRoot = context.opts.projectRoot,
projectName = getProjectName(projectRoot),
workspaceSettingsPath = path.join(projectRoot, `/platforms/ios/${projectName}.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings`);
fs.writeFileSync(workspaceSettingsPath, workspaceSettings);
}
and register it at config.xml
to be called:
<platform name="ios">
...
<hook src="hooks/after_platform_add/create-ios-workspaceSettings.js" type="after_platform_add" />
</platform>
from cordova-custom-config.
I don't know how Xcode internally stores that setting when you change it in the Xcode UI, but the fact it comes under "workspace settings" suggest to me that it's stored in the .xcworkspace
and not the .xcodeproj/project.pbxproj
file. This plugin currently can only operate on the project file, not the workspace.
You can confirm this by changing the setting in "Per-user workspace settings" and diffing the .xcworkspace
for changes.
from cordova-custom-config.
Thank you @dpa99c, so no solutions for the moment ?
from cordova-custom-config.
Not by using this plugin
from cordova-custom-config.
Thanks a lot, do you know other plugins that could help in this ?
Cheers
from cordova-custom-config.
Related Issues (20)
- Android: custom-preference isn't doing anything, no error given HOT 1
- not compatible with cordova 9
- iOS location issue on uploading the apptore - ask for NSLocationAlwaysUsageDescription HOT 2
- All of a sudden (after updating node/npm LTS and cordova to 8.1.2), upon 'cordova run android', "Error loading dependencies (Cannot find module 'tostr') - attempting to resolve" - must install all deps by hand now HOT 6
- cordova-custom-config: Error updating config for platform 'android': Cannot use absolute path on element HOT 2
- Cordova builds fail with XCode-beta 11 HOT 4
- i need help with error unboun prefix HOT 1
- Builds fail when attempting usesClearText=true HOT 1
- Cordova ios build error - can someone help HOT 1
- Question: is this plugin needed for UISupportedInterfaceOrientations? HOT 2
- support capacitor HOT 1
- [Bug][Android] '"{{proj_path}}\platforms\android\cordova\version"' is not recognized as an internal or external command, operable program or batch file. HOT 1
- Cannot insert new Item to the section on AndroidManifest
- Vulnerability with package 'colors' HOT 1
- vulnerability in xcode package HOT 1
- Config.xml Bug HOT 6
- Ionic - The prefix "tools" for attribute "tools:node" associated with an element type "uses-permission" is not bound. HOT 1
- cordova-ios renamed Images.xcassets as Assets.xcassets meaning that asset_catalog needs to be updated
- BSF Cordova Ecosystem Crowdfunding Plan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-custom-config.