mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 11:13:28 +01:00
Creates new provisioning profile each refresh
This commit is contained in:
@@ -95,12 +95,12 @@ NSErrorDomain const ALTDeviceErrorDomain = @"com.rileytestut.ALTDeviceError";
|
|||||||
|
|
||||||
if (misagent_install(mis, pdata) == MISAGENT_E_SUCCESS)
|
if (misagent_install(mis, pdata) == MISAGENT_E_SUCCESS)
|
||||||
{
|
{
|
||||||
NSLog(@"Reinstalled profile: %@", provisioningProfile.identifier);
|
NSLog(@"Reinstalled profile: %@", provisioningProfile.UUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int code = misagent_get_status_code(mis);
|
int code = misagent_get_status_code(mis);
|
||||||
NSLog(@"Failed to reinstall provisioning profile %@. (%@)", provisioningProfile.identifier, @(code));
|
NSLog(@"Failed to reinstall provisioning profile %@. (%@)", provisioningProfile.UUID, @(code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,14 +315,14 @@ NSErrorDomain const ALTDeviceErrorDomain = @"com.rileytestut.ALTDeviceError";
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (misagent_remove(mis, provisioningProfile.identifier.UTF8String) == MISAGENT_E_SUCCESS)
|
if (misagent_remove(mis, provisioningProfile.UUID.UUIDString.lowercaseString.UTF8String) == MISAGENT_E_SUCCESS)
|
||||||
{
|
{
|
||||||
NSLog(@"Removed provisioning profile: %@", provisioningProfile.identifier);
|
NSLog(@"Removed provisioning profile: %@", provisioningProfile.UUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int code = misagent_get_status_code(mis);
|
int code = misagent_get_status_code(mis);
|
||||||
NSLog(@"Failed to remove provisioning profile %@. Error Code: %@", provisioningProfile.identifier, @(code));
|
NSLog(@"Failed to remove provisioning profile %@. Error Code: %@", provisioningProfile.UUID, @(code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,25 @@ private extension ResignAppOperation
|
|||||||
func fetchProvisioningProfile(for appID: ALTAppID, team: ALTTeam, completionHandler: @escaping (Result<ALTProvisioningProfile, Error>) -> Void)
|
func fetchProvisioningProfile(for appID: ALTAppID, team: ALTTeam, completionHandler: @escaping (Result<ALTProvisioningProfile, Error>) -> Void)
|
||||||
{
|
{
|
||||||
ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, team: team) { (profile, error) in
|
ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, team: team) { (profile, error) in
|
||||||
completionHandler(Result(profile, error))
|
switch Result(profile, error)
|
||||||
|
{
|
||||||
|
case .failure(let error): completionHandler(.failure(error))
|
||||||
|
case .success(let profile):
|
||||||
|
|
||||||
|
// Delete existing profile
|
||||||
|
ALTAppleAPI.shared.delete(profile, for: team) { (success, error) in
|
||||||
|
switch Result(success, error)
|
||||||
|
{
|
||||||
|
case .failure(let error): completionHandler(.failure(error))
|
||||||
|
case .success:
|
||||||
|
|
||||||
|
// Fetch new provisiong profile
|
||||||
|
ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, team: team) { (profile, error) in
|
||||||
|
completionHandler(Result(profile, error))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
Dependencies/AltSign
vendored
2
Dependencies/AltSign
vendored
Submodule Dependencies/AltSign updated: ae919bedd2...17cc07d3b3
Reference in New Issue
Block a user