Disabling cellular data access for one app causes other apps to lose access

We develop a whitelabel app that is named, branded, and identified uniquely for multiple customers. Each uniquely identified app bundle is signed with the appropriate distribution certificate from the customer's portal. The IPA is deployed through each customer's developer portal. When a build is released, all customers get the same version details in the bundle.

We have a problem that occurs when multiple deployments of the app are installed on a single device. If cellular data access is disabled for one of the apps, all the others that are installed are also prevented from using cellular data. In Settings, however, only the one where cellular data was turned off is shown as not having access. The problem has been seen on iOS 10.1.1. It is not known at this time if other versions of iOS exhibit this behavior.

I had assumed that iOS would rely on the app ID to determine whether cellular data should be disabled for a given app, but that must not be the case. Is there some extra detail that we need to add to each app build in order to keep the cellular data access setting limited to that one installed app?

Replies

I’ve seen this before. It’s caused by the two apps have the same main executable UUID, which the WWAN access subsystem is keying off (for better or worse). I recommend you rebuild your app from source for each customer, which will ensure that each app has a unique main executable UUID and thus avoid this problem.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Building each branded app from source did not resolve the problem. I modified our build pipeline such that a full clean was performed before each customer's app was compiled and linked. What assigns that unique identifier? Is it at compile time, at link time, or at some other stage? Or is it something in the project file that we would need to tweak?

The main image UUID is assigned at link time. You can dump it with

dwarfdump
. For example:
$ dwarfdump --uuid /Applications/TextEdit.app/Contents/MacOS/TextEdit
UUID: 18520B84-4221-3BAA-BBF6-03B537BC53D8 (x86_64) /Applications/TextEdit.app/Contents/MacOS/TextEdit

Keep in mind that the UUID is different for each architecture, so for a typical iOS app you’ll see two entries (one for

arm64
and one for
armv7
, that is, 64- and 32-bit).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

That is extremely useful to know! I was able to determine that two builds run separately against the same source tree produced binaries with the same UUID. Even if I check out a fresh copy of the code, I still get the same UUID from the linked binary. Could it be that we need to alter something in each build to get a different UUID fromt the same source?

Even if I check out a fresh copy of the code, I still get the same UUID from the linked binary.

Are you using standard Apple tools? Is your main executable built from source?

Historically the Apple linker would set the image UUID to a different value on every invokation. I vaguely remember that we changed this a while back so that building and linking the same source would result in the same UUID. However, I was unable to find any documentation on that.

Regardless, it doesn’t really matter: if you have multiple apps with the same man executable image UUID, regardless of how that came about, you need to fix that. One option would be to have a single source file that’s different for each of the apps you build.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Yes, we're using all of hte standard Apple tools. It does sound as though we need to vary something for each build, and I'm sure we can come up with something. Thanks for the guidance!