Before You Start: Prerequisites
What You'll Need
-
Published Lovable project (your web app must be live)
-
Apple Developer Account ($99/year)
-
Despia account (offers free demo build)
-
App assets (1024x1024 icon, splash screen GIF)
-
2-3 hours of focused time for initial setup
Phase 1: Basic Setup
Prepare Your Lovable Project
-
Ensure your Lovable project is published
-
Your web app must be live and accessible
-
Copy the published URL from your Lovable editor
-
Test that the URL works properly
-
Create Your Despia Account
-
Go to Despia.com and sign up
-
Claim your free demo build - Despia offers one free test build
-
This covers all cloud resources for your first attempt
Create New Application in Despia
-
Click "Create New Application"
-
App Name: Use no spaces or special characters (e.g., "iOSMaster")
-
Web App Start URL: Paste your Lovable published URL
-
Bundle ID: Choose format
com.yourcompany.appname
(e.g.,com.despia.iosmaster
) -
Click "Create New Application"
Design Your App Assets
App Icon Requirements
-
Size: Exactly 1024x1024 pixels
-
Format: PNG (no transparency, no rounded corners)
-
Tools: Use Canva, Figma, or any design tool
-
Upload to Despia's icon section
Splash Screen Requirements
-
Size: Exactly 1024x1024 pixels
-
Format: GIF with transparent background
-
Purpose: Shows when app starts loading
-
Can be animated or static
-
Upload to Despia's splash screen section
Critical: Wrong dimensions will cause build failures!
Phase 2: Apple Developer Account Integration
Link Your Apple Developer Account to Despia
Get API Credentials from App Store Connect
-
Navigate to Users and Access
-
Go to Integrations tab
-
Click the "+" to create new integration
-
Name: "Despia" or "Despia CICD"
-
Role: Must be "App Manager" (not Admin, not Developer)
-
Click "Generate"
Collect Required Information
You need to gather three pieces of information:
1. Issuer ID
-
Found at top of App Store Connect integrations page
-
Copy this ID
2. Key ID
-
From your newly created API key
-
Copy the Key ID (not the key itself)
3. Development Team ID
-
Go to developer.apple.com
-
Click "Certificates, Identifiers & Profiles"
-
Your Team ID is in the top right corner next to your company name
4. P8 Key File
-
Download the P8 file from App Store Connect
-
Warning: You can only download this once!
-
Store it safely - Despia will store it for you after upload
Add Account in Despia
-
In Despia, click "Add New Developer Account"
-
Enter Account Issuer ID
-
Enter Connect API Key ID
-
Upload the P8 key file
-
Enter Development Team ID
-
Click "Link with Apple"
-
Select your developer account in the dropdown
Phase 3: Bundle ID Registration (Most Critical Section)
Register Your Main Bundle ID
This is where most people fail. Follow exactly:
-
Go to developer.apple.com
-
Click "Certificates, Identifiers & Profiles"
-
Select "Identifiers" → "+"
-
Choose "App IDs" → "Continue"
-
Select "App" → "Continue"
-
Description: Your app name (e.g., "iOS Master")
-
Bundle ID: Use the exact ID from Despia (e.g.,
com.despia.iosmaster
) -
Capabilities: Enable these essential ones:
-
App Attest
-
App Groups
-
Associated Domains
-
iCloud (with CloudKit support)
-
Push Notifications
-
Background App Refresh
-
-
Click "Continue" → "Register"
Understanding External Bundle Requirements
Why External Bundles Are Required: Despia uses a modular system. Even if you don't plan to use push notifications, widgets, or app clips, you MUST register these "external bundles" or your build will fail. Think of them as optional features that need to be registered even when disabled.
External bundles you must register:
-
OneSignal Bundle (for push notifications)
-
App Clip Bundle (for app clips)
-
Share Bundle (for sharing functionality)
-
Widget Bundle (for smart widgets)
Each external bundle needs:
-
Its own Bundle ID registration
-
Its own App Group registration
-
Proper linking between bundle and app group
-
Connection to your main app
External Bundle Registration Process
You'll repeat this process 4 times - once for each external bundle
Part A: Register the External Bundle ID
For OneSignal Bundle (Example - repeat for others):
-
In Despia, copy the OneSignal Bundle ID from the targets section
-
Go to developer.apple.com → "Identifiers" → "+"
-
Choose "App IDs" → "Continue"
-
Select "App" → "Continue"
- Exception: For App Clip Bundle, select "App Clip" instead
-
Description: "iOS Master OneSignal Bundle" (use your app name)
-
Bundle ID: Paste the exact OneSignal Bundle ID from Despia
-
Capabilities for OneSignal Bundle:
-
App Groups (required for all external bundles)
-
Associated Domains
-
Push Notifications
-
Background App Refresh
-
-
Click "Continue" → "Register"
Special Case - App Clip Bundle:
-
When creating App Clip Bundle, select "App Clip" not "App"
-
Parent App ID: Select your main bundle ID
-
Product Name: Must be exactly "Clip" (capital C)
-
Capabilities: App Groups, Associated Domains, Push Notifications
Capabilities for Each Bundle Type:
-
OneSignal: App Groups + Associated Domains + Push Notifications + Background App Refresh
-
App Clip: App Groups + Associated Domains + Push Notifications
-
Share: App Groups only
-
Widget: App Groups only
Part B: Register the App Group for This Bundle
-
In Despia, copy the App Group ID for the same bundle (starts with "group.")
-
Go to developer.apple.com → "Identifiers" → "+"
-
Choose "App Groups" → "Continue"
-
Identifier: Paste the App Group ID from Despia
-
Description: "iOS Master OneSignal App Group" (match the bundle type)
-
Click "Continue" → "Register"
Part C: Link the Bundle to Its App Group
-
Go to "Identifiers" → search for your app name
-
Find and click on the OneSignal Bundle you just created
-
Scroll to "App Groups" capability
-
Click "Configure"
-
Search for your app name (Command+F: "iOS Master")
-
Select ONLY the OneSignal App Group (the one that matches this bundle)
-
Click "Continue" → "Save"
Critical: OneSignal Bundle links to OneSignal App Group ONLY. Don't mix them up.
Part D: Link Your Main App to All App Groups
Do this AFTER registering all external bundles:
-
Go to "Identifiers" → search for your app name
-
Click on your main app bundle ID (not the external ones)
-
Scroll to "App Groups" capability
-
Click "Edit"
-
Search for your app name
-
Select ALL app groups for your application:
-
iOS Master OneSignal App Group
-
iOS Master App Clip App Group
-
iOS Master Share App Group
-
iOS Master Widget App Group
-
-
Click "Continue" → "Save"
Repeat for All External Bundles
Repeat Steps 8A-8C for each external bundle:
-
OneSignal Bundle + OneSignal App Group (done above)
-
App Clip Bundle + App Clip App Group
-
Share Bundle + Share App Group
-
Widget Bundle + Widget App Group
Then complete Step 8D once to link your main app to all app groups.
Visual Overview of What You're Creating:
Main App Bundle (com.yourcompany.appname)
├── Links to: OneSignal AppGroup
├── Links to: AppClip AppGroup
├── Links to: Share AppGroup
└── Links to: Widget AppGroup
OneSignal Bundle (com.yourcompany.appname.OneSignalNotificationServiceExtension)
└── Links to: OneSignal AppGroup (ONLY) - (group.com.yourcompany.appname.onesignal)
AppClip Bundle (com.yourcompany.appname.Clip)
└── Links to: AppClip AppGroup (ONLY) - (group.com.yourcompany.appname.Clip)
Share Bundle (com.yourcompany.appname.ShareExtensionTarget)
└── Links to: Share AppGroup (ONLY) - (group.com.yourcompany.appname.sharetarget)
Widget Bundle (com.yourcompany.appname.ImageWidget)
└── Links to: Widget AppGroup (ONLY) - (group.com.yourcompany.appname.widgetsharing)
Phase 4: App Store Connect Setup
Create App Store Listing
-
Return to appstoreconnect.apple.com
-
Go to "My Apps" → "+" → "New App"
-
Platform: iOS
-
Name: Your app's display name
-
Primary Language: English (US)
-
Bundle ID: Select your main registered bundle ID
-
SKU: Your app name in caps, no spaces (e.g., "IOSMASTER")
-
User Access: Full Access
-
Click "Create"
Get App Store Listing ID
-
In your new app, go to "App Information"
-
Under "General Information", find the Apple ID
-
Copy this Apple ID number - you'll need it for Despia
-
Go back to Despia and paste this ID in the Build Configuration section
Set Up TestFlight
-
In App Store Connect, go to your app → "TestFlight"
-
Click "Internal Testing" → "+"
-
Group Name: "Internal"
-
Add Testers: Enter your email address
-
Create
Phase 5: Building and Testing
Final Checks Before Building
Verify everything is set up correctly:
- Main bundle ID registered with proper capabilities
-
All 4 external bundle IDs registered
-
All 4 app groups registered
-
Each external bundle linked to its matching app group
-
Main app linked to ALL app groups
-
Apple Developer account linked in Despia
-
App Store listing ID entered in Despia
-
App icon and splash screen uploaded
Configure App Settings (Optional)
In Despia, you can configure:
-
Full Screen Mode: Enable for immersive experience
-
Status Bar: Set colors to match your splash screen
-
Add-ons: Enable features like Face ID, location tracking if needed
-
Associated Domains: Always enable this
Build Your App
Only after everything is configured:
-
Click "Publish Project" in Despia
-
The build process begins on Apple M2 Mac machines
-
Wait 5-20 minutes for completion
-
You'll receive email notifications about build status
During the build, don't close the browser or make changes
Test on TestFlight
Once the build completes successfully:
-
Check your email for Apple's build completion notification
-
Click "View in TestFlight" from the email
-
Install the TestFlight app if you haven't already
-
Install your app through TestFlight
-
Test all functionality thoroughly
Note: Development builds show a watermark and license notice. This is normal for testing.
Phase 6: Adding Native Features
Despia SDK Integration Guide
Use this exact prompt pattern in Lovable for any native feature:

Add native [FEATURE]
functionality using the Despia SDK from: https://www.npmjs.com/package/despia-native
First, install the package: npm install despia-native
Then import it: import despia from 'despia-native'
[Specific implementation instructions]
Please follow the installation instructions for the "despia-native" npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
Contact Access Example
Lovable Prompt:

Add native contact access functionality to retrieve users' device contacts including names and phone numbers using the Despia SDK from: https://www.npmjs.com/package/despia-native
First, install the package: npm install despia-native
Then import it: import despia from 'despia-native'
1. Request contact permission using despia("requestcontactpermission://")
2. Read contacts using await despia('readcontacts://', ['contacts'])
which returns a JSON object with contact names as keys and phone number arrays as values
3. When accessing the data, use "dot notation" like .contacts to retrieve the contact data in a JSON object format
Please follow the installation instructions for the "despia-native" npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
Expected Implementation:
import despia from 'despia-native';
// Request permission first
await despia("requestcontactpermission://");
// Read contacts data
const contactsData = await despia('readcontacts://', ['contacts']);
console.log(contactsData.contacts);
// Expected output format:
{
"John Appleseed": ["+12345678910"],
"Ann Wilson": ["+12345678910"]
}
Testing Native Features
-
Make changes in your Lovable project
-
Publish your Lovable project
-
Over-the-air updates: Your TestFlight app updates automatically!
-
Test permissions: iOS will prompt for permissions on first use
-
No rebuild needed unless changing app configuration
Phase 7: Publishing to App Store
Complete App Store Listing
While testing your app, complete your App Store Connect listing:
Required Information
-
App Information
-
Category: Choose most appropriate
-
Content Rights: Describe content ownership
-
Age Rating: Complete questionnaire
-
-
Pricing and Availability
-
Price: Free or paid
-
Availability: Select countries/regions
-
Release date: Automatic or manual
-
-
App Privacy
-
Privacy Policy: Required for all apps
-
Data Collection: Describe what data you collect
-
Data Usage: Explain how you use collected data
-
-
App Store Listing
-
Description: Up to 4,000 characters explaining your app
-
Keywords: Relevant search terms (100 characters max)
-
Support URL: Link to your support page
-
Screenshots: 3-10 screenshots showing app features
-
Upgrade to Production License
To remove watermarks and publish commercially:
-
In Despia, click "Build Production Version"
-
Choose license type:
-
iOS Only: $249
-
Android Only: $249
-
iOS + Android: Higher tier pricing
-
-
Benefits include:
-
No watermarks
-
Commercial publishing rights
-
Full source code export
-
Lifetime runtime updates
-
One-click App Store deployment
-
Submit for App Store Review
-
In App Store Connect, go to your app
-
Click "1.0 Prepare for Submission"
-
Build section: Select your Despia-built version
-
App Review Information: Provide contact details
-
Version Release: Choose automatic or manual
-
Review all sections for completeness
-
Click "Submit for Review"
Troubleshooting Common Issues
Build Failures
"Bundle ID not found"
-
Ensure all bundle IDs are registered in Apple Developer
-
Check that bundle IDs match exactly between Despia and Apple
-
Verify main bundle ID is registered first
"Provisioning profile error"
-
Verify Apple Developer account is properly linked in Despia
-
Confirm API key has "App Manager" role, not Admin or Developer
-
Check that Development Team ID is correct
"App Groups configuration failed"
-
Most common error - check these carefully:
-
Each external bundle links to its own app group (OneSignal → OneSignal group)
-
Main app links to ALL app groups
-
No mixing of app groups between bundles
-
All app groups are properly registered
"External bundle registration incomplete"
-
You must register ALL 4 external bundles even if unused
-
Missing any external bundle will cause build failure
-
Double-check: OneSignal, App Clip, Share, Widget
TestFlight Issues
"App not appearing in TestFlight"
-
Check that build completed successfully in Despia
-
Verify you're added to internal testing team
-
Look for Apple's email notifications
"App crashes on startup"
-
Check status bar color settings in Despia
-
Ensure splash screen is proper format and size (1024x1024 GIF)
-
Verify full screen mode setting matches your design
External Bundle Linking Errors
"Failed to link app groups"
-
Search by your app name in Apple Developer to find all your items
-
Ensure consistent naming: "iOS Master OneSignal Bundle" + "iOS Master OneSignal App Group"
-
OneSignal bundle should only link to OneSignal app group
-
Main app should link to ALL app groups
"App Clip registration failed"
-
App Clip bundle must be registered as "App Clip" type, not "App"
-
Parent App ID must be your main bundle ID
-
Product Name must be exactly "Clip" with capital “C”
Cost Summary
Required Costs
-
Apple Developer Account: $99/year
-
Despia Production License: Starting at $249 (for commercial publishing)
Optional Costs
-
Additional Despia Build Credits: $25+ for extra development credits
-
Design Tools: Canva Pro, Figma, etc. (optional)
Free Tier Includes
-
One free development build with Despia
-
Unlimited over-the-air updates to your Lovable app
-
TestFlight testing with development watermark
Support and Resources
Getting Help
-
Despia Support: 24/7 support with <2 minute response times
-
Free Expert Help: Available if you encounter issues with your free build
-
External Bundle Help: Most common issue - contact support for guidance
Important Links
-
Despia Documentation: lovable.despia.com
-
Apple Developer Guidelines: developer.apple.com/app-store/review/guidelines
-
App Store Connect: appstoreconnect.apple.com
-
TestFlight: Available in the App Store
Remember: The external bundle registration process is the most critical and complex part. Take your time with Phase 3 - getting this right the first time saves you from wasting your free build credit. Most build failures happen because of incomplete external bundle setup, not because of your actual app code.