I was trying to search for a quick command to extract the bundle identifier from a provisioning profile. I think I've seen something like that in the past, but I can't find it now.
Inspecting the .mobileprovision
file shows that it's a .plist
file, but not quite as it is surrounded by some binary data. I tried PlistBuddy
, but the binary data causes it to fail with the following error:
Unexpected character 0 at line 1
I think the command I saw in the past was just some regex to extract the wanted value. I know, don't parse XML with regex, but I think this is one of those times when it is acceptable. In fact, I would prefer a regex solution if it means that I do not have to install any dependencies.