This tutorial will guide you through using the iPA Sign API to sign your iOS applications. You can interact with the API using various programming languages such as HTML (JavaScript), Python, Node.js, and PHP.
The main endpoint for signing your IPA files is:
POST https://api.ipasign.pro/sign
Ensure that your server is running and accessible at https://api.ipasign.pro/
.
Upon successful signing, the API responds with a JSON object containing the installLink
, which can be used to install the signed IPA on an iOS device.
{
"installLink": "itms-services://?action=download-manifest&url=https%3A%2F%2Fapi.ipasign.pro%2Fplist%2Fyour_manifest.plist"
}
Here's how you can create a simple HTML form to upload your files and interact with the API using JavaScript:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>iPA Sign API Example</title>
</head>
<body>
<h2>Sign Your IPA</h2>
<form id="signForm" enctype="multipart/form-data">
<label>IPA File:</label>
<input type="file" name="ipa" accept=".ipa"><br/>
<label>P12 Certificate:</label>
<input type="file" name="p12" accept=".p12"><br/>
<label>Mobile Provision:</label>
<input type="file" name="mobileprovision" accept=".mobileprovision"><br/>
<label>P12 Password:</label>
<input type="password" name="p12_password"><br/>
<label>Save Certificates:</label>
<input type="checkbox" name="save_cert" /><br/>
<button type="submit">Sign IPA</button>
</form>
<pre id="response"></pre>
<script>
document.getElementById('signForm').addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(this);
try {
const res = await fetch('/sign', {
method: 'POST',
body: formData
});
const data = await res.json();
document.getElementById('response').textContent = JSON.stringify(data, null, 2);
} catch (error) {
document.getElementById('response').textContent = 'Error: ' + error.message;
}
});
</script>
</body>
</html>
Utilize the requests
library to interact with the API:
import requests
url = 'https://api.ipasign.pro/sign'
files = {
'ipa': open('path/to/your/app.ipa', 'rb'),
'p12': open('path/to/your/certificate.p12', 'rb'),
'mobileprovision': open('path/to/your/profile.mobileprovision', 'rb')
}
data = {
'p12_password': 'your_p12_password',
'save_cert': 'on' # Set to 'on' to save certificates
}
response = requests.post(url, files=files, data=data)
if response.status_code == 200:
install_link = response.json().get('installLink')
print(f'Install Link: {install_link}')
else:
print(f'Error: {response.json().get("error")}')
Use the axios
and form-data
libraries to send a POST request:
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
const form = new FormData();
form.append('ipa', fs.createReadStream('path/to/your/app.ipa'));
form.append('p12', fs.createReadStream('path/to/your/certificate.p12'));
form.append('mobileprovision', fs.createReadStream('path/to/your/profile.mobileprovision'));
form.append('p12_password', 'your_p12_password');
form.append('save_cert', 'on'); // Set to 'on' to save certificates
axios.post('https://api.ipasign.pro/sign', form, {
headers: form.getHeaders()
})
.then(response => {
console.log('Install Link:', response.data.installLink);
})
.catch(error => {
console.error('Error:', error.response ? error.response.data : error.message);
});
Leverage PHP's cURL
functions to interact with the API:
<?php
$url = 'https://api.ipasign.pro/sign';
$post_fields = [
'p12_password' => 'your_p12_password',
'save_cert' => 'on'
];
$cfile_ipa = new CURLFile('path/to/your/app.ipa', 'application/octet-stream', 'ipa');
$cfile_p12 = new CURLFile('path/to/your/certificate.p12', 'application/octet-stream', 'p12');
$cfile_mp = new CURLFile('path/to/your/profile.mobileprovision', 'application/octet-stream', 'mobileprovision');
$post_fields['ipa'] = $cfile_ipa;
$post_fields['p12'] = $cfile_p12;
$post_fields['mobileprovision'] = $cfile_mp;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if(curl_errno($ch)){
echo 'Curl error: ' . curl_error($ch);
} else {
$result = json_decode($response, true);
if(isset($result['installLink'])) {
echo 'Install Link: ' . $result['installLink'];
} else {
echo 'Error: ' . $result['error'];
}
}
curl_close($ch);
?>
If you encounter issues or have questions, feel free to dm me on discord dai1228..