Files
termix-mobile/plugins/withIOSNetworkSecurity.js
T
2025-11-03 15:20:19 -06:00

23 lines
701 B
JavaScript

const { withInfoPlist } = require("@expo/config-plugins");
const withIOSNetworkSecurity = (config) => {
return withInfoPlist(config, (config) => {
const existingPlist = config.modResults;
existingPlist.NSAppTransportSecurity = {
NSAllowsArbitraryLoads: true,
NSAllowsLocalNetworking: true,
NSAllowsArbitraryLoadsInWebContent: true,
NSAllowsArbitraryLoadsForMedia: true,
};
existingPlist.NSLocalNetworkUsageDescription =
"Termix needs to connect to servers on your local network for SSH and other services.";
existingPlist.NSBonjourServices = ["_ssh._tcp", "_sftp-ssh._tcp"];
return config;
});
};
module.exports = withIOSNetworkSecurity;