Dual SIM APN config AttachAPN key

I have an iPhone XS Max with two physical sim cards, but this problem will also happen with the eSim+physical sim variation.

Some operators don't allow for editing the APN. This is annoying, as small virtual operators that use a big operator as their network, have the problem that the APN can't be edited, and so data won't work. There is a way around this, by making a mobileconfig file to force the APN to work. There are sites like this, or you can do it manually; it works great. You need to install it as an unsigned profile.


However, on a dual sim iPhone, this is only taken into account for the "first" sim card, not for the second card. There must be a key to address the 2nd APN, but I don't know how. I currently have one SIM card with this problem and I had to physically put it in the first slot for the mobileconfig APN switcher to use it.


Anyone know what the key could be here?


Below such a file for information.


<plist version="1.0">
<dict>



<key>ConsentText</key>



<dict>



<key>default</key>


<string>netgprs.com</string>

</dict>

<key>PayloadContent</key>


<array>



<dict>



<key>AttachAPN</key>



<dict>



<key>Name</key>


<string>netgprs.com</string>

<key>AuthenticationType</key>

<string>CHAP</string>

<key>Username</key>

<string/>

<key>Password</key>

<string/>

</dict>

<key>APNs</key>


<array>



<dict>



<key>Name</key>


<string>netgprs.com</string>

<key>AuthenticationType</key>

<string>CHAP</string>

<key>Username</key>

<string/>

<key>Password</key>

<string/>

</dict>

</array>

<key>PayloadDescription</key>


<string>


Provides customization of carrier Access Point Name.

</string>

<key>PayloadDisplayName</key>

<string>Advanced Settings</string>

<key>PayloadIdentifier</key>

<string>netgprs.com</string>

<key>PayloadOrganization</key>

<string>netgprs.com</string>

<key>PayloadType</key>

<string>com.apple.cellular</string>

<key>PayloadUUID</key>

<string>6B08253E-D5BB-4FC4-A5CD-825FB965B5AA</string>

<key>PayloadVersion</key>

<integer>1</integer>

</dict>

</array>

<key>PayloadDescription</key>


<string>


Installation of Internet access settings. If you have set a lock screen passcode, it will be asked now.

</string>

<key>PayloadDisplayName</key>

<string>netgprs.com</string>

<key>PayloadIdentifier</key>

<string>netgprs.com</string>

<key>PayloadOrganization</key>

<string>netgprs.com</string>

<key>PayloadType</key>

<string>Configuration</string>

<key>PayloadUUID</key>

<string>560EB0FF-BE89-46C7-8DC9-6CA77E1A4453</string>

<key>PayloadVersion</key>

<integer>1</integer>

</dict>

</plist>

Replies

I have an AT&T esim with a Sprint sim, and somehow I just got this to work. The AT&T esim needs a cellular profile that sets the apn name "broadband", and Sprint sim just works, and I tried specifyling its parameters in the profile, but hoped I could just keep whatever Sprint configuration is hidden from me, and just add the AT&T's APN.
The Apple's developer document is really really sparse and I wish they explained, at least what is the difference between APNs and AttachAPN. Now my theory was that since AttachAPN specifies a single entry, and APNs specify an array, the AttachAPN will be for the single sim, and APNs will be for the (possibly multiple) esims. After coming across your post I am reminded that there are iphones with 2 regular sims, so I am no longer sure. Another piece of the puzzle (again, my reading of the apple document), is that if you specify PayloadIdentifier=com.apple.cellular, this will replace the configuration, but if you specify something like com.apple.cellular.dxqz, this will append to the existing configuration. With these two things in mind, I was able to write the script below, which worked for me:

<?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>PayloadContent</key>

<array>

<dict>

<key>APNs</key>

<array>

<dict>

<key>Name</key>

<string>broadband</string>

</dict>

</array>

<key>PayloadIdentifier</key>

<string>com.apple.cellular.dxqz</string>

<key>PayloadType</key>

<string>com.apple.cellular</string>

<key>PayloadUUID</key>

<string>ABBCD183-92CD-42BA-91B0-614974B7B445</string>

<key>PayloadVersion</key>

<integer>1</integer>

</dict>

</array>

<key>PayloadIdentifier</key>

<string>my_apn</string>

<key>PayloadType</key>

<string>Configuration</string>

<key>PayloadUUID</key>

<string>30086F47-CB6E-45A1-B365-AA304195C8AE</string>

<key>PayloadVersion</key>

<integer>1</integer>

</dict>

</plist>


However, because of the following I am no longer certain that my undertanding of the script is correct, or why it works. If I add the AuthenticationType=CHAP to the APNs broadband configuration above, it breaks not only the AT&T connection, but also Sprint's. I would love to understand this a little better, and have a script that not only works, but also is correct for what I need it to do. I pass the torch back to you sir.

D.