- Sep 17, 2025
- 302
- 144
[JOURNEY] Building an Industrial-Scale iOS Automation Framework - A Technical Deep Dive
Hello BHW Community, ym23 is back with the journeys. After another socials, we got into Tinder.Project Stats After 2 Weeks
- Lines of Code: 15,000+ Python
- API Integrations: 3 different services for proxy, numbers, IP validating
- Automated Workflows: 8 complete processes
- Cost per Operation: Reduced by 87%
- Success Rate: 100% automated flow completion, near 60% accounts alive,
The Challenge: Industrial iOS Automation
Most automation projects fail at scale. Why? Because iOS isn't designed for automation. Apple actively fights it. After months of research, trial and error, I built a framework that actually works at scale.The Problem:
- Manual account creation = 15-20 minutes per account
- Scaling to 100+ accounts = impossible manually
- iOS security measures = constant roadblocks
- Proxy rotation = IP bans without proper setup
- Phone verification = expensive and unreliable
The Goal: Build a fully automated system that can:
- Handle multiple iOS devices simultaneously
- Manage proxy rotation intelligently
- Automate phone verification
- Track success/failure rates
- Self-recover from errors
- Automate the full tweak config method
️ System Architecture
Core Components
1. Multi-Device OrchestrationDashboard Server (Flask)
├── Device Manager (handles 1-N devices)
├── Worker Threads (one per device)
├── Real-time Monitoring
└── Live Log Streaming
How it works:
- Each iPhone gets its own worker thread
- Appium servers run on different ports (4723, 4724, 4725...)
- WebDriverAgent (WDA) on unique ports (8200, 8201, 8202...)
- Dashboard shows real-time status for all devices
- Scale from 1 to 10+ devices without code changes
- Monitor everything from a web browser that can control devices
- Instant error detection and recovery (or at least it tries, working on improve this)
2. Intelligent Proxy Management
The proxy system is the heart of the operation. Here's what I learned:
Residential vs Datacenter Proxies:
- Datacenter = instant ban (tested 500+ times)
- Residential = works
- Mobile = too expensive
Smart proxy rotation with geolocation matching
1. Fetch random US city from custom proxy pool
2. Validate IP geolocation (ipdata.co API). Check for different things such as Trust Score, geo...
3. Extract and match phone number area code to proxy location
4. Configure device with validated proxy
5. Verify IP before starting workflow
Key Innovations:
- Geolocation Cache: Saves API calls, reduces cost 95% on time.
- AI Area Code Lookup: ChatGPT finds area codes for any city, with a custom list as fallback with more than 400 area codes, and another fallback to the state area codes if not city is find (may happen for example with Hawaii proxies)
- IP Quality Scoring: Filters bad proxies before use
- Auto-retry Logic: Switches proxy on failure
- Before: $0.10 per IP check
- After: $0.005 per IP check (cached). You just pay the call to the ip as proxy GB, as the ipdata.co API is free below 1500 reqs/day.
- ROI: 95% cost reduction.
3. Phone Verification Automation
This was the hardest part. Phone verification systems are designed to stop bots.
The Research: I tested 8 different SMS services over 3 months:
- Provider 1
(high ban rate) - Provider 2
(inconsistent delivery) - Provider 3
(poor US coverage) - Provider 4
(best for US numbers)
- Real carrier numbers (AT&T, Verizon, T-Mobile)
- Area code selection (critical for location matching)
- Instant API integration
- 30-second timeout handling
- Refund on failed delivery
1. Get proxy geolocation (city + state)
2. Lookup area codes for that city (AI-powered)
3. Request phone number with matching area code
4. Monitor for SMS (30 second polling)
5. Extract verification code
6. Auto-refund if no SMS received
4. iOS Automation Stack
The Tools:
- Appium 2.0: Cross-platform automation framework
- WebDriverAgent: Apple's testing framework (custom-made, i have a free guide for compiling WDA + boilerplate for appium on https://github.com/ManuelBellucci/appium-ios-win-boilerplate)
- go-ios: Pure Go implementation of iOS protocols
- pymobiledevice3: Python USB communication
- itunes: App installation. Can be used also ideviceinstaller, go-ios, Sideloadly (only IPA not .deb)
- Unlimited devices (only hardware limit that can be solved putting the money on the table)
- Free and open source
- Full control over device state
- Programmatic everything
- Generic WDA builds (missing entitlements)
- Free developer accounts (7-day expiry)
- Unsigned IPAs (crashes immediately)
- Custom WDA build with all your device UDIDs, properly builded.
- Paid developer account ($99/year)
- Proper code signing and cert handling
- Correct provisioning profiles
5. Error Recovery System
At scale, everything fails eventually. The system must self-heal.
Common Failures:
- Network timeout → Retry with backoff
- App crash → Restart app, continue
- SMS not received → Cancel order, get new number
- Proxy banned → Rotate to new proxy
- Device disconnect → Reconnect and resume
- Appium crash → Restart server automatically
max_retries = 3
for attempt in range (max_retries):
try:
result = execute_workflow()
if result.success:
break
except NetworkError:
switch_proxy()
except AppCrash:
restart_app()
except SMSTimeout:
cancel_and_retry()
if attempt == max_retries - 1:
log_failure_and_alert()
Result: 92% success rate with auto-recovery vs 67% without
Performance Optimization
Before Optimization:
- 20 minutes per account (manual)
- Single device only
- 60% success rate
- Constant monitoring required
After Optimization:
- 10-12 minutes per account (automated)
- 10+ devices simultaneously
- 92% success rate
- Fully autonomous
1. Caching Strategy
- IP Geolocation: Infinite cache (IPs don't change)
- Area Codes: Infinite cache (area codes don't change)
- Device Configs: File-based, hot-reload
2. Parallel Processing
- Each device = independent thread
- Non-blocking I/O for API calls
- Async SMS polling
- Concurrent proxy validation
3. Smart Retry Logic
- Exponential backoff for network errors
- Immediate retry for known transient errors
- Skip retry for permanent failures
- Max 3 attempts per operation
Lessons Learned
Technical Lessons:
1. iOS Automation is Fragile- Apps update and break automation
- Appium versions matter (2.0+ required)
- USB cables matter (cheap cables = disconnects)
- Also need to think hard about the hardware infra, cables, hubs, etc.
- Consider also studying about the system CPU, RAM, etc.
- Datacenter proxies = instant ban
- Location matching is critical
- IP quality scoring prevents issues
- Rotating too fast = suspicious
- Service quality varies dramatically
- Area code matching increases success
- SMS timeout handling is critical
- Cost per number varies 10x between services, find yours. We used to buy the Tinder accs per 4€ and got benefit, now with this system we create the accounts for <1€ each. The key is on saving money on number provider and proxy provider now.
- Happy path is 30% of code
- Error recovery, APIs, and other stuff is 70% of code
- Logging is critical for debugging
- Metrics reveal hidden issues
Business Lessons:
1. Start Small, Scale Smart- Built for 1 device first
- Proved concept before scaling
- Added features incrementally
- Refactored 3 times before going multi-device
- Built dashboard early (week 2)
- Real-time logs save hours of debugging
- Success rate tracking reveals patterns
- Device health monitoring prevents failures
️ The Tech Stack
Languages & Frameworks:- Python 3.13 (async/await, type hints)
- Flask (dashboard API)
- JavaScript (dashboard frontend)
- Appium 2.11.5
- WebDriverAgent (custom build)
- go-ios
- pymobiledevice3
- ideviceinstaller
- ipdata.co (IP geolocation)
- OpenAI GPT-4o-mini (area code lookup)
- Secret Provider (phone verification)
- Secret Provider (residential proxy IPs)
- Google Sheets (data storage for the refreshToken, device id...)
- Windows 11 (host machine)
- USB hubs (powered, 10-port)
- Official Apple Lightning cables
- Multiple iPhones (iOS 16-16.7.12)
Scaling Challenges
Hardware Limitations:
USB Hub Issues:- Cheap hubs = random disconnects
- Powered hubs required (2A per port)
- USB 3.0 required for stability
- Max 7 devices per hub (USB spec limit)
iPhone Battery Management:
- Constant USB connection = battery degradation
- Heat issues during intensive automation
- Battery health drops to 85% after 6 months
Software Limitations:
Appium Instability:- Memory leaks after 100+ sessions
- Random crashes require restart
- Driver updates break compatibility
WebDriverAgent Issues:
- 7-day certificate expiry (free accounts)
- Bundle ID find
- Sometimes when you launch WDA on the device, instead of setting the "Automation running" usual screen, it gets black screen without completing the process. Close it and try to launch again. Check Appium Server is on, and all is ok.
Key Innovations
1. AI-Powered Area Code Lookup2. Intelligent Proxy Validation
3. Dynamic Name/Age Management
4. Real-Time Dashboard
Common Pitfalls (and how I avoided them)
Mistake #1: Using Datacenter Proxies
Mistake #2: Ignoring Geolocation
Mistake #3: No Error Recovery
Mistake #4: Cheap USB Hubs
Mistake #5: No Monitoring
Mistake #6: Over-Engineering
Resources that helped
Documentation:- Appium Documentation (appium.github.io)
- WebDriverAgent GitHub (explained on my open source repo https://github.com/ManuelBellucci/appium-ios-win-boilerplate)
- go-ios GitHub (danielpaulus/go-ios)
- iOS Developer Docs (developer.apple.com)
- Appium Discuss Forum
- BHW Forum Threads
- Reddit r/jailbreak
- StackOverflow
- Hundreds of different sources. Do your research if you want to build good software.
- Appium Inspector (element discovery)
- Appium Wizard for set base using my own Open Source boilerplate. This is only for starting and not working on scale. You'll need to stop using my boilerplate panel and Appium Wizard to manually handle all Appium Server ports and capabilities to remove the 5 server Wizard's limit.
- VSCode
Final Thoughts
Building this framework taught me more about iOS internals than any course ever could. The key lessons:- iOS automation is possible, but requires deep understanding
- iOS automation ON WINDOWS is possible too.
- Proxies are critical - don't cheap out
- Phone verification is critical.
- Monitoring saves time - build it early
- Error recovery is 80% of the work - plan for it
- Start small, scale smart - don't over-engineer
If you need to do something once: No, do it manually. If you need to do something 100+ times: Absolutely yes.
You build smh like this, and everything after that is pure profit.
Legal Disclaimer
This project is for educational and research purposes only.- Automating account creation may violate Terms of Service
- Use of automation tools may result in account bans
- SMS verification services have usage policies
- Proxy usage must comply with provider terms
- iOS automation may void device warranties
Questions? Comments? Lessons to share?
Drop a comment below. I'll answer technical questions about the implementation WITHOUT NEVER REVEALING SENSITIVE DATA OF THE PROJECT, SUCH AS THE METHOD, TWEAKS, OR CONFIGS USED.
Last updated: November 2025 Framework version: 1.0 - Ending last tests before starting automating at scale.
