Deep Linking in Mobile Apps: URL Scheme and Universal Links
A deep link doesn't open—users see an empty browser instead of the desired app screen. Or it opens but passes parameters in an encoding the app fails to parse. This is classic when first implementing a URL scheme. In one project with a large user base, we found that 20% of deep links were lost due to incorrect parameter handling in the URL—costing the business 15% of conversions. With extensive experience, we have developed methods that guarantee correct deep link operation in 99% of cases. Certified engineers (iOS, Android, Flutter) set up schemes in a short timeframe. Contact us for a consultation on your project—we can help you with deep links. According to Apple Developer Documentation, Universal Links require a correct AASA file. Implementing Universal Links in a large-scale project reduced conversion losses by 20%.
Why Universal Links Are More Secure Than Custom URL Scheme
Custom URL Scheme (myapp://product/123) is easy to implement but insecure: any app can register the same scheme and intercept the deep link. It is suitable for internal navigation between own apps or for dev tools. Universal Links (iOS) and App Links (Android) work through an HTTPS domain with verification files (apple-app-site-association / assetlinks.json). They are secure and fall back to the browser if the app is not installed. This is the right approach for production. In practice, we implement both: Universal Links as the primary mechanism, Custom URL Scheme as a fallback when domain verification is not possible. According to tests, Universal Links cause errors three times less frequently on cold start compared to Custom URL Scheme.
| Characteristic |
Custom URL Scheme |
Universal Links / App Links |
| Security |
Low (interception) |
High (verification) |
| Fallback |
Does not open |
Opens in browser |
| Complexity |
Simple |
Medium (domain required) |
| Reliability |
~85% successful opens |
>98% successful opens (with correct setup) |
How to Configure Deep Links on iOS and Android
iOS (Swift/SwiftUI): Register the scheme in Info.plist under CFBundleURLTypes, handle it in application(_:open:options:) for UIKit or via .onOpenURL in SwiftUI. For Universal Links, use application(_:continue:restorationHandler:). Parse the URL using URLComponents, not manual string splitting. In configuration, specify the domains in Associated Domains in Xcode.
Android (Kotlin): In AndroidManifest.xml, add an <intent-filter> with <data android:scheme="myapp"/>, handle intent.data in the Activity. For App Links, add android:autoVerify="true" and upload assetlinks.json to https://domain.com/.well-known/. Ensure the server returns 200 and the correct Content-Type.
| Component |
iOS |
Android |
| Verification |
AASA file via HTTPS |
assetlinks.json via HTTPS |
| Handling |
application(_:continue:) |
Intent.data with autoVerify |
| Fallback |
Redirect to website |
Open in browser |
| Typical error |
Cache delay up to 24 hours |
Incorrect app signature |
Cross-Platform Frameworks
React Native: Use the Linking API from react-native core, and for navigation, @react-navigation/native with the linking config. A common mistake is forgetting to handle the case when the app was closed (cold start) vs already running (foreground). These are different events. Additionally, check the scheme settings in Info.plist and AndroidManifest.
Flutter: The go_router package supports deep links natively; you only need to configure routerConfig with GoRouter and add configuration in native modules via flutter_deeplinking_enabled in Info.plist/manifest. Alternatively, use the app_links package.
Common Testing Mistakes
Deep links are often tested only through Safari/Chrome, but the case where the app is installed but closed is forgotten. On iOS with Universal Links, there can be a delay in AASA file verification on first launch—the app opens via browser instead of the deep link, and the team thinks something is broken. This is normal behavior; the cache updates within 24 hours. On Android, ensure that assetlinks.json returns 200 and the JSON is valid. Another common issue is using HTTP instead of HTTPS: according to App Store Review Guidelines, all deep links must be HTTPS. As a result, about 10% of all failures are related to HTTP redirects.
| Problem |
Cause |
Solution |
| Deep link doesn't open on cold start |
Only foreground handling |
Implement handling in AppDelegate/Application for cold start |
| Parameters passed with errors |
Using manual string split |
Use URLComponents/URI for parsing |
| Universal Link doesn't work on iOS |
AASA verification delay |
Wait up to 24 hours, check SSL certificate |
What Our Work Includes
- Audit of the current deep linking scheme
- Design of the target architecture (URL scheme, Universal/App Links)
- Implementation on the chosen stack (iOS/Android/Flutter/React Native)
- Configuration of verification files on the server
- Testing scenarios: cold start, foreground, background
- Integration with analytics (Firebase, AppsFlyer)
- Documentation and developer training
Case Study: 30% of Errors Caught During Testing
One project was an e-commerce app with a large user base. After implementing Universal Links, we discovered 30% of cold-start failures due to incorrect parameter handling in AppDelegate. After fixing, conversion to the target screen increased by 15%. We guarantee such issues will be eliminated during the audit phase.
Service Timeline and Pricing
The timeline ranges from 1 to 2 weeks depending on the complexity of the ecosystem and the need for cross-platform support. The exact cost is determined after a thorough analysis of the current scheme and requirements. We do not offer fixed prices—each project is unique. Contact us for a deep linking audit and get a ready configuration in a short timeframe. Get a consultation—we will show you implementation examples for your stack.
How to Start Integrating API into a Mobile App?
The request goes out, the response doesn't come, timeout — 30 seconds. The user stares at the spinner. No network — mobile card in the subway. Or the network is there, but the server returns 200 with an HTML error page instead of JSON — and the app crashes on JSONDecoder.decode(). We see such cases on every second project. So integrating API into a mobile app is not just calling an endpoint, but designing a reliable network layer: error handling, caching, offline mode, certificate pinning. Order an audit of your current network layer — we will evaluate the project in 1 day. Our team guarantees a thorough analysis and provides a detailed roadmap.
Standard libraries like URLSession and OkHttp provide basic HTTP clients, but for production you need retries with exponential backoff, status code validation, typed deserialization, and network state monitoring. Without this, the app loses data and users. We have been doing mobile development for 5 years and implemented more than 30 projects with API integration on iOS, Android, and Flutter — from startups to enterprise solutions.
How to Choose a Protocol for API Integration?
| Protocol |
Response Size |
Parsing Speed |
Caching |
Suitable For |
| REST |
Large (fixed structure) |
Medium |
HTTP cache + local |
CRUD, typical screens |
| GraphQL |
Minimal (only needed fields) |
Medium (normalized cache) |
In-memory cache (Apollo) |
Complex UIs with different queries |
| gRPC |
Minimal (protobuf) |
High |
Stream-level |
High-load, real-time, IoT |
| WebSocket |
— (binary/text) |
— |
Manual |
Chats, quotes, synchronization |
REST remains the standard for most projects. But when a profile screen needs 5 fields out of 40, GraphQL eliminates over-fetching and reduces traffic by 30–60%. gRPC is justified for thousands of requests per minute (trading, IoT) — binary serialization is 3–5 times faster than JSON. WebSocket is the only choice for real-time without polling (messages, notifications).
Practical example: For a fintech app, we replaced REST (40 fields) with GraphQL — response size dropped from 12 KB to 2.5 KB, screen render time decreased by 70%. Traffic savings were significant. Our certified iOS and Android developers have deep experience with all these protocols — you can rely on proven solutions.
How to Ensure Reliable Connection and Offline-First?
Users lose network in the subway, elevator, tunnel. A mobile app must work without internet — at least in read-only mode. We implement the offline-first pattern:
- On screen open, first show data from the local cache (Core Data / Room).
- Simultaneously perform a network request, update UI after response.
- If network is unavailable — show cached data and a 'no connection' label.
- When network is restored, automatically synchronize changes.
For HTTP response caching we use URLCache (iOS) and OkHttp Cache (Android) with Cache-Control support. For structured data — SwiftData / Room. NWPathMonitor / ConnectivityManager.NetworkCallback monitor network state and trigger updates.
REST and Client Library Selection
Alamofire (iOS) — de facto standard for Swift projects. On top of URLSession it adds request chaining, response validation, automatic retry, certificate pinning via ServerTrustManager. AF.request() with .validate() returns an error for any status code outside 200–299. Without .validate(), Alamofire considers 404 and 500 as successful responses. With Swift Concurrency — async version via serializingDecodable.
Retrofit (Android) — annotation-based HTTP client on top of OkHttp. An interface with annotations compiles into implementation. @GET, @POST, @Path, @Query, @Body — declarative API description. OkHttp under the hood: connection pooling, transparent gzip, HTTP/2 multiplex. HttpLoggingInterceptor — logging in debug builds. Authenticator — automatic token refresh on 401.
Ktor (KMM/Flutter) — multiplatform HTTP client. On iOS it works via Darwin engine (URLSession), on Android — via OkHttp. Single code for both platforms with KMM architecture.
GraphQL: When REST Falls Short
REST returns a fixed structure. A profile screen needs name, avatar, email — the server sends 40 fields. Over-fetching. GraphQL solves this: the client requests exactly the needed fields. This is critical for mobile where traffic and parsing time are real constraints. Apollo iOS and Apollo Kotlin generate typed classes from schema: schema.graphql + query files → strict types at compile time. Subscriptions via WebSocket — real-time without polling. Limitation: GraphQL is harder to cache at the HTTP level. Apollo uses a normalized in-memory cache InMemoryNormalizedCache — requests with overlapping data update the cache without duplication.
WebSocket: Real-Time Without Extra Traffic
Polling (setInterval every 5 seconds) — battery and traffic waste. WebSocket is a persistent bidirectional connection. iOS: URLSessionWebSocketTask (native, iOS 13+). Android: OkHttp WebSocket. Mandatory reconnect handling: on onFailure — exponential backoff (1s → 2s → 4s → 8s → max 60s). Socket.IO is an overlay with automatic reconnect, but for new projects native WebSocket is preferable (fewer dependencies).
gRPC: For High-Load Services
gRPC with protobuf — binary serialization: smaller size, faster parsing. grpc-swift for iOS, grpc-kotlin for Android. The protobuf schema compiles to typed classes. Streaming (server-side, client-side, bidirectional) is a native feature. Application threshold: high request frequency (trading, IoT) or critical latency. For regular CRUD, REST is simpler to debug and monitor.
Certificate Pinning and Security
A corporate proxy can intercept HTTPS by substituting the certificate. Certificate pinning prevents this: the app accepts only a specific certificate or public key. Alamofire: ServerTrustManager with PinnedCertificatesTrustEvaluator. OkHttp: CertificatePinner with SHA-256 hash. Apple's App Transport Security documentation recommends pinning certificates for sensitive data. Operational complexity: on certificate rotation, older app versions stop working. Solution — pinning to the CA public key or support multiple pins with a grace period.
What Is Included in the Work
| Stage |
Duration |
Result |
| API and requirements analysis |
1–2 days |
Endpoint specification, protocol selection, caching schema |
| Network layer implementation |
3–5 days |
Client library, error handling, retry, pinning |
| Offline mode and caching |
2–3 days |
Local storage, offline-first pattern |
| Integration and testing |
2–3 days |
Unit tests (URLProtocol/OkHttp MockWebServer), UI tests |
| Deployment and documentation |
1 day |
CI/CD, store access, team README |
We deliver: source code of the network layer, documentation on used libraries, certificate rotation instructions, 2 weeks post-delivery support. Our experience guarantees that the solution will be stable and maintainable.
Timeline and Cost
Implementation of a network layer with REST, retry, caching, and offline mode — 1–2 weeks. Adding GraphQL or WebSocket — another 1–2 weeks. gRPC — 2–3 weeks, including code generation. The cost is calculated individually after analyzing the API and offline behavior requirements. We will evaluate the project in 1 day — contact us for a consultation. Get a reliable API integration with guaranteed quality.