Update a Provisioning Profile - xcode

I like to add a new device to a development provisioning profile.
I know how to decode information from a provisioning profile (an example of it is in https://maniak-dobrii.com/extracting-stuff-from-provisioning-profile/).
I've also looked at Apple's API (https://developer.apple.com/documentation/appstoreconnectapi/profiles) but using that, we'd have to delete an existing profile, and then re-create a new one with an added device.
What I like to do, is to read all the capabilities, entitlements (basically a "clone" of an existing provisioning profile), and "inject a device" in its array of devices.
Obviously this can be done on developer.apple.com, but I'm looking for a solution without involving that.
What I thought would be the best way was to unpack the existing provisioning profile, just add a new device to the decoded xml, and re-encode it. This way we don't change anything, but the devices.
Is it possible to do such thing? Or can anyone suggest a better (and working, if my solution won't work) way of doing it?
Thanks a lot in advance for all your helps

Related

Performing enterprise wipe on devices using Work Profile?

I wish to perform Enterprise Wipe on devices with Work Profiles. Essentially, this would enable admins from my company to remove all corporate-related information from a device without disturbing the individual's personal data.
I am aware a topic exists on this already: Wiping data on Android: Device Admin versus Profile Owner
However, the topic talks about factory wipe and I certainly don't wish to do that. Any hints on how to accomplish this task?
Performed research on android forums + documentation and could not find the solution.
You can call enterprises.devices.delete on a work profile. It will wipe and remove the work profile without touching the personal data. Which seems to be what you're looking for.
It's actually the only wipe possible for a work profile, it's not possible for the admin to wipe the entire device when it's set up with a work profile.

XCode test Distribution ipa in device

I have a little problem and I am wondering if this is possible. I have just finished updating an app with push notification for a client. I don't have a hold of the server side so I tested the push by modifying the app id and just make it as my own temporarily, created the necessary certificates and provisioning profiles and then tested it using PushMeBaby app. All works fine without problems.
And now, the client wants to publish it and he gave me the distribution certificate and provisioning profile for distribution. I am not a member of his team but I somehow find a way to build it using the command line.
Now comes my problem, I wanted to test it first on my device to check if the push notification works. The server is already setup since it is already existing in the store. I know for sure that the push will work, but somehow I really feel the need to test it first on my device. I tried to request him to use testflight for testing but he said he doesn't know how to do it. I tried to present myself to do it but he doesn't allow it because the original developer made some anomalies with his account, so as much as possible, he won't give it to me saying there must be other way to test it myself.
And so I asked, is there any way to test it with just the distribution certificate and provisioning profile provided? If not, what would be the best alternative to do it, considering having the client do a very minimal and easy stuff on his side, if any.
Hoping for someone to actually give a hand or a hint.
Thanks in advance.

iTunes Connect : why isn't my distribution profile "managed by Xcode"?

I'm stuck with this damn "Application failed codesign verification" warning that I simply can't solve... I'm about to submit my app to Apple. :(
Having a look to my provisioning profiles made me realize that the status of my development profile is "Active, managed by Xcode" whereas my distribution profile is only "Active". It may be the reason of this problem because anything else seems to be OK. So what is wrong here ?
Thanks a lot for your advices.
Having a look to my provisioning profiles made me realize that the
status of my development profile is "Active, managed by Xcode" whereas
my distribution profile is only "Active".
The team development profile includes certificates for all the developers on your team and device ID's for all your devices. Since only one person is authorized to distribute applications for any given account, and since there are no device ID's associated with the distribution provision, there's no need to have Xcode or the provisioning portal manage your distribution provision -- there'd be very little to manage.
It may be the reason of this problem because anything else seems to be
OK. So what is wrong here?
No, difference in the description of your development and distribution profiles isn't the problem. The problem is that the codesign utility was, for some reason, unable to sign your application. There are several things that can prevent your app from being signed, such as:
Wrong distribution profile selected in your project's build settings.
App ID in distribution profile doesn't match that of the app you're trying to sign.
Problem with distribution profile, e.g. an expired certificate.
There are also a great many questions right here on SO pertaining to signing your app for distribution. It doesn't make sense to rehash all those answers here, especially without more information about what you've already checked or at least seeing the specific error. Take a look at some of those questions first and see if something rings a bell. Otherwise, take a look at the Troubleshooting section of the Tools Workflow Guide.

One Provisioning Profile for multiple apps?

I am really confused with ios provisioning profile. Can I use one Development Provisioning Profile for multiple apps? Same question for Distribution Provisioning Profile.
thanks for your help.
Yes, you can use the same certificates for multiple apps.
It may seem complicated, but once you look at it, it's not so bad. Here's the breakdown:
The development provisioning profile gives you the opportunity to test apps you create (any) until you try to push it to Apple. When you do that, the distribution profile comes into play. Essentially, it connects any apps you produce with your App Store storefront.

Signing of binary by someone else

I am trying to figure out if I am in a potential bind here. I am having someone else develop my app and I have given them complete access to my developer account to create the certificates to build the binary. I have uploaded the binary using the Application Loader and it it now waiting for review by Apple. My question is when it comes time to update the app, will I be able to do so without using the programmer who signed the certificate? When I become competent I'd like to do this myself but I'm clearly not there yet. I don't want to be in a situation where I have to keep going back to the same programmer to do the smallest thing.
Yes, provided you:
Have them send you the signing assets as described in "Exporting Your Code Signing Assets to Your File System" in the Xcode documentation. Note that they will still be able to sign using your key.
Have them send you the original project, obviously.
Once you part ways with them you should change the passwords of any accounts they've been given access to, like Apple ID and iTunes Connect.
At a later date, or as a last resort, you can create new signing assets as described in "Reset You Signing and Provisioning Assets..." in the Tools Workflow Guide.
So, most important going forward, they must not have access to any Apple accounts belonging to you.

Resources