OAuthSwift SceneDelegate.swift issue ObjC+Swift project - ios

OAuthSwift(2.2.0) is being added in exisitng iOS OBJC project. The project was developed for iOS version 8 and earlier. For updating the project, we are not taking up full conversion of the project to swift. Decided to retain core ObjC modules, and develop all new features using Swift, for iOS 13.0. More importantly, the project also uses C++ libraries and other 3rd party libraries.
The project has 100+ implementation classes had each have 100s of lines of code. I understands from several guides and articles that there are lot of hiccups in OBJC > SWIFT conversion.
The existing AppDelegate.m has interoperability with several controllers, we are currently held with didFinishLaunchingWithOptions between AppDelegate.m and SceneDelgate.swift.
The actual issue:
we tried,
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let url = URLContexts.first?.url else {
return
}
if url.host == "oauth-callback" {
OAuthSwift.handle(url: url)
}
}
But, Scene mapping causing issues with UIWindow nil, unable to present the rootviewcontroller.
Optionally, I have tried, openURL in AppDelegate.m as below.
(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
if ([url.host isEqualToString:#"oauth-callback"]) {
[OAuthSwift handleWithUrl:url];
}
return YES;
}
The above seems to be accessing the OAuthToken. However, OAuthToken is getting lost somewhere. It would be guiding to know....
Whether our strategy to retain Objc feasible?
How do we solve SceneDelegate.swift and AppDelegate.m interoperability issues, with OAuth? Any reference to OBJC compatible OAuth2.0 Framework?
Can SFSafariController be used, instead to call OAuthSwift, access token?
Thanks in advance.

In OBJC project, using interoperability feature which is available between SWIFT and OBJC code, this url
if ([url.host isEqualToString:#"oauth-callback"]) {
[OAuthSwift handleWithUrl:url];
}
Declaring in header
#class OAuthSwift;
Declaring #objc in Swift
#objc open class func handle(url: URL) {
let notification = Notification(name: OAuthSwift.didHandleCallbackURL, object: nil,
userInfo: [CallbackNotification.optionsURLKey: url])
notificationCenter.post(notification)
}
Used SFSafariViewControllerDelegate.
This implementation, did not insist for SceneDelegate with 'OAuthSwift', '~> 2.2.0'. Interoperability works fine.

Related

How can I set up Amazon Amplify iOS in Objective-C?

The docs show Swift code only. When trying to use Objective-C, I can't access any of the Amplify libraries. Am I missing an installation step?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
do {
try Amplify.add(plugin: AWSCognitoAuthPlugin())
try Amplify.add(plugin: AWSPinpointAnalyticsPlugin())
try Amplify.configure()
print("Amplify configured with Auth and Analytics plugins")
} catch {
print("Failed to initialize Amplify with \(error)")
}
return true
}
How to do the equivalent in Objective-C?
Yes, crusty old Objective C apps still exist. And they have to be maintained. It really isn't reasonable to expect developers to rewrite them in Swift just so they can use Amplify. I was recently asked to add Amplify to an app built in early 2015 before Swift existed. (Gosh -- are there really apps out there that are over 5 years old?!)
Fortunately, if you can bite the bullet and add Swift support to your Objective C project, it isn't so hard to make a Swift wrapper class that you use from Objective C. Here's one I created for free. It would be nice if the highly paid folks at Amazon would be kind enough to help us out with examples like this.
import Amplify
import AmplifyPlugins
#objc
class AmplifyWrapper: NSObject {
override init() {
super.init()
}
#objc
public func initialize() {
do {
try Amplify.add(plugin: AWSCognitoAuthPlugin())
try Amplify.add(plugin: AWSPinpointAnalyticsPlugin())
try Amplify.configure()
print("Amplify configured with Auth and Analytics plugins")
} catch {
print("Failed to initialize Amplify with \(error)")
}
}
#objc
public func recordEvent(name: String, category: String, accountId: String) {
let properties: AnalyticsProperties = [ "category": category, "accountId": accountId]
let event = BasicAnalyticsEvent(name: name, properties: properties)
Amplify.Analytics.record(event: event)
}
}
Use form Objective C like this:
#import "PutYourAppNameHere-Swift.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[[AmplifyWrapper alloc] init] initialize];
...
}
Then later on you can do this:
[[[AmplifyWrapper alloc] init] recordEventWithName:#"App Opened" category:#"Counts" accountId:""];
Am I missing an installation step?
You're not missing anything. Unfortunately there's no Objective-C support on Amplify for iOS. Amplify was built in Swift using its full capabilities and Objective-C support is not currently being considered unless there's a strong demand from the community.
Out of curiosity: are you starting a new app in Objective-C? If so I would be curious to understand why not going with Swift given Apple's investment on Swift lately (Combine, SwiftUI, Swift language updates, etc).
If you're trying to integrate Amplify in an existing Objective-C app, then I'm afraid it won't be possible.

Quickblox Webrtc Video Calling Swift - Documentation understanding

I am trying to integrate the Quickblox Webrtc Video Calling feature into a iOS Swift App. However, i'm having a lot of trouble with their SDK & api documentation, and it seems they don't have a tech team to help people with questions about their platforms, so maybe we can all help each other, so here are a few questions that I've noticed a lot of people have been asking on both StackOverFlow and Github regarding their webrtc SDK. Please restrict answers to the Swift language. The docs link is
http://quickblox.com/developers/SimpleSample-videochat-ios
My code so far:
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
//Firebase config
FIRApp.configure()
//Quickblox config
QBSettings.setApplicationID(xxxxx)
QBSettings.setAuthKey("xxxxxxxxxxx")
QBSettings.setAuthSecret("xxxxxxxx-xxxx")
QBSettings.setAccountKey("xxxxxxxxxxxxxxxxxxxx")
return true
}
Thats my appdelegate.swift now for the part that giving me problems the actual videochatviewcontroller. The documentation is very vague at the start all is says is:
// Initialize QuickbloxWebRTC and configure signaling
// You should call this method before any interact with
QuickbloxWebRTC QBRTCClient.initializeRTC() // Call this method when
you finish your work with QuickbloxWebRTC
QBRTCClient.deinitializeRTC()
I do not know if I am to call this in my appdelegate.swift or if I should call this in VideoChatViewController's viewDidLoad method or should I create a new method altogether?
Secondly,the docs say to CALL USERS use this method, but its not a method, just random variables, also it doesn't tell tell whether it goes to the viewDidLoad or to a newly created method :
QBRTCClient.instance().addDelegate(self) // self class must conform to QBRTCClientDelegate protocol
// 2123, 2123, 3122 - opponent's
let opponentsIDs = [3245, 2123, 3122]
let newSession = QBRTCClient.instance().createNewSessionWithOpponents(opponentsIDs, withConferenceType: QBRTCConferenceType.Video)
// userInfo - the custom user information dictionary for the call. May be nil.
let userInfo :[String:String] = ["key":"value"]
newSession.startCall(userInfo)
Next, they are vague regarding the method to receive a new session, below they refer to self.session which they never explain where this variable is from or what it consist of
func didReceiveNewSession(session: QBRTCSession!, userInfo: [NSObject : AnyObject]!) {
if self.session != nil {
// we already have a video/audio call session, so we reject another one
// userInfo - the custom user information dictionary for the call from caller. May be nil.
let userInfo :[String:String] = ["key":"value"]
session.rejectCall(userInfo)
}
else {
self.session = session
}
}
Does quickblox require authenticated Quickblox users to use their webrtc or can I Authenticate users with Firebase or parse?
Where do I use QBRTCConfig in the appdelegate or the viewDidLoad? I have tried both and have seen it used in both methods.

Exception:Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use

I am trying to implement Google Maps SDK into my project using Swift 2.0. I follow this but when running this, my app is getting the following error:
2015-08-25 19:05:17.337 googleMap[1919:54102] *** Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use
*** First throw call stack:
(
0 CoreFoundation 0x00000001058499b5 __exceptionPreprocess + 165
...
...
...
31 UIKit 0x000000010606699e UIApplicationMain + 171
32 googleMap 0x00000001034b720d main + 109
33 libdyld.dylib 0x0000000107fba92d start + 1
34 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have tried all possible solutions from StackOverflow.
You need to set this both in didFinishLaunchingWithOptions
GMSPlacesClient.provideAPIKey("Your key")
GMSServices.provideAPIKey("Your key")
Just adding to Rajasekaran Gopal
Remember to add
import GoogleMaps
import GooglePlaces
then
GMSPlacesClient.provideAPIKey("Your key")
GMSServices.provideAPIKey("Your key")
in didFinishLaunchingWithOptions
I just had the same problem. I created a GMSMapView object and it was initialized before maybe the api key could be read. So I moved it inside the viewDidLoad method and problem solved.
Before :
class ViewController: ..... {
let mapView = GMSMapView()
After :
class ViewController: ..... {
var mapView : GMSMapView?
override viewDidLoad(){
mapView = GMSMapView()
Here is a Google Maps tutorial for Swift:
http://www.appcoda.com/google-maps-api-tutorial/
Below is quoted from Google Maps Documentation:
Step 5: Get an iOS API key
Using an API key enables you to monitor your application's API usage,
and ensures that Google can contact you about your application if
necessary. The key is free, you can use it with any of your
applications that call the Google Maps SDK for iOS, and it supports an
unlimited number of users. You obtain an API key from the Google
Developers Console by providing your application's bundle identifier.
If your project doesn't already have a key for iOS applications,
follow these steps to create an API key from the Google Developers
Console:
In the sidebar on the left, select Credentials.
If your project doesn't already have an iOS API key, create one now by selecting Add credentials > API key > iOS key.
In the resulting dialog, enter your app's bundle identifier. For example: com.example.hellomap.
Click Create.
Your new iOS API key appears in the list of API keys for your
project. An API key is a string of characters, something like this:
AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0
Add your API key to your AppDelegate.m as follows:
Add the following import statement:
#import GoogleMaps;
Add the following to your application:didFinishLaunchingWithOptions: method, replacing API_KEY with your API key:
[GMSServices provideAPIKey:#"API_KEY"];
Source
If you already set GMSMapView class to your view in interface builder, make GMSServices.provideAPIKey("API key") in initialization methods of viewController which contains GMSMapView.
You should set up API keys before you set up the UIWindow in AppDelgate, if your initial View Controller uses GoogleMaps.
For example:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//MARK: Google Maps setup
GMSServices.provideAPIKey("YOUR API KEY")
GMSPlacesClient.provideAPIKey("YOUR API KEY")
let window = UIWindow(frame: UIScreen.main.bounds)
window.backgroundColor = UIColor.white
window.makeKeyAndVisible()
window.rootViewController = ViewController()
self.window = window
return true
}
In my app i provided key to GMSPlacesClient in AppDelegate -didFinishLaunchingWithOptions
Ex:
#import GooglePlaces;
#import GoogleMaps;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GMSServices provideAPIKey:#"You key"];
[GMSPlacesClient provideAPIKey:#"Your key"];
}
For Swift:
import GoogleMaps
import GooglePlaces
//in application(_:didFinishLaunchingWithOptions:)
GMSServices.provideAPIKey("YOUR_API_KEY")
GMSPlacesClient.provideAPIKey("YOUR_API_KEY")
in my case --didFinishLaunchingWithOptions-- method didn't call because i updated swift version. first make sure this method called normally. and in my case i didn't need to GMSPlacesClient.provideAPIKey("Your key"). however you can initial GMSServices in your initial viewcontroller (if its not contain map or related objet to it)
You are skipping provideAPIKey in your AppDelegate check project
Your_PROJECT -> ios -> Runner -> AppDelegate.m
Replace your file code with below snippet add your APIKEY
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "GoogleMaps/GoogleMaps.h"
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GMSServices provideAPIKey:#"GOOGLE_API_KEY"];
[GeneratedPluginRegistrant registerWithRegistry:self];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
#end
Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...]
XCODE 12.0.1, Swift 5
I was applying constraints to Google Map View by initialising GMSMapView like this:-
private var googleMapsView : GMSMapView = {
let mainView = GMSMapView()
mainView.translatesAutoresizingMaskIntoConstraints = false
mainView.isMyLocationEnabled = true
return mainView
}()
& I was getting this same error, so I tried this making it a lazy property:-
lazy private var googleMapsView : GMSMapView = {
let mainView = GMSMapView()
mainView.translatesAutoresizingMaskIntoConstraints = false
mainView.isMyLocationEnabled = true
return mainView
}()
& voila! It worked like a charm.
Ensure that the lines you added to AppDelegate.m are actually being executed.
Since the integration with Flipper around react-native v0.62, a portion of the AppDelegate.m file is guarded by an ifdef FB_SONARKIT_ENABLED. If Flipper isn't enabled for whatever reason, any code inbetween the ifdef and the closing endif lines will not be executed. Make sure you paste the #import above the ifdef, and the [GMSServices] line in the didFinishLaunchingWithOptions method, immediately after the opening curly brace ({).
More info on Flipper in React Native: https://fbflipper.com/docs/features/react-native/
Added in the necessery functions providing the API Key in your AppDelegate and still getting this issue? Don't forget to ENABLE the specific API you need (i.e. Maps SDK for iOS/Android) in the Google Cloud Console as well:
https://console.cloud.google.com/apis/library
It may take a few minutes for the API to enable/propogate too.

Can I disable custom keyboards (iOS8) for my app?

EDIT: tl;dr - it is possible, see accepted answer below.
Is there any (not only programatic) way of preventing custom keyboards (iOS8) from being used for my application? I am mainly interested in "per-app" setting, so just my app is not allowed to use custom keyboards, but disabling custom keyboards system-wide is last resort.
So far I know that custom keyboards are system-wide and can be used by any application. The OS will fallback to stock keyboard only for secure text entry (text fields with secureTextEntry set to YES). Not much hope here.
I got an impression from App Extension Programming Guide that MDM (Mobile Device Management) can restrict device from using custom keyboards at all, but I didn't find that option in the new beta version of Apple Configurator.app for OS X Yosemite. Is 'Configurator' just missing that option?
Any ideas here? Should I file a radar to suggest that Apple should introduce such functionality?
Looks like you got what you wanted in beta seed 3. Line 440 of UIApplication.h:
// Applications may reject specific types of extensions based on the extension point identifier.
// Constants representing common extension point identifiers are provided further down.
// If unimplemented, the default behavior is to allow the extension point identifier.
- (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier NS_AVAILABLE_IOS(8_0);
It's not currently included in the docs, but sound like it will do exactly what you asked here.
I'm guessing these "extension point identifiers" are not unique identifiers of extensions, but of their types, as there is also this on line 545:
// Extension point identifier constants
UIKIT_EXTERN NSString *const UIApplicationKeyboardExtensionPointIdentifier NS_AVAILABLE_IOS(8_0);
TLDR: to disable custom keyboards you would include something like this in your app delegate:
- (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier {
if ([extensionPointIdentifier isEqualToString: UIApplicationKeyboardExtensionPointIdentifier]) {
return NO;
}
return YES;
}
Swift 3 :
func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplicationExtensionPointIdentifier) -> Bool {
if extensionPointIdentifier == UIApplicationExtensionPointIdentifier.keyboard {
return false
}
return true
}
I just want to add this for those developers who want to implement this method in Xamarin iOS. The idea is to override theShouldAllowExtensionPointIdentifier method in your AppDelegate:
public override bool ShouldAllowExtensionPointIdentifier(UIApplication application, NSString extensionPointIdentifier)
{
if (extensionPointIdentifier == UIExtensionPointIdentifier.Keyboard)
{
return false;
}
return true;
}
In Swift 5, UIApplicationExtensionPointIdentifier was changed to UIApplication.ExtensionPointIdentifier.
func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplication.ExtensionPointIdentifier) -> Bool {
if extensionPointIdentifier == UIApplication.ExtensionPointIdentifier.keyboard {
return false
}
return true
}
In Swift 5 using a switch:
func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplication.ExtensionPointIdentifier) -> Bool {
switch extensionPointIdentifier {
case .keyboard:
return false
default:
return true
}
}

iOS - Open certain view controller with URL scheme

I'm playing around with URL schemes in my app. I easily made one to open my app, just adding the necessary items to info.plist. This current URL "myappname://" takes the user to the initial view controller, FirstTableViewController, but I was wondering if it would be possible to modify that URL scheme so it I can have one that takes the user to a certain view controller, such as ThirdTableViewController. I would use this as a handy feature in something like Launch Center.
This post is a little old but maybe useful for iOS 5 + because the checked answer is not correct.
AppDelegate doesn't have any navigationController property.
Instead you can do in AppDelegate.m :
enter code here
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
MyViewController *controller = [[MyViewController alloc] initWithNibName:#"MyViewController" bundle:[NSBundle mainBundle]];
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
[navController presentModalViewController:controller animated:YES];
return YES;
}
Try look at this: Custom Url Schemes
Hope this will be a useful
In ...AppDelegate.m
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
MyViewController *controller = [[MyViewController alloc] initWithNibName:#"MyViewController" bundle:[NSBundle mainBundle]];
[self.viewController presentModalViewController:controller animated:YES];
[controller release];
return YES;
}
Hi here is my solution.
If you can call your navigation function that called in "application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool" event (with a delay) you can navigate a specific page in the app even is not running before called.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Actived keyboard avoider
changeAppereance()
delay(1) {
deeplink = Deeplink()
self.manageNavigation(launchOptions: launchOptions)
self.navigate()
}
return true
}
private func manageNavigation(launchOptions: [UIApplicationLaunchOptionsKey: Any]?) {
if let url = launchOptions?[UIApplicationLaunchOptionsKey.url] as? URL { //Deeplink
print(url.absoluteString)
deeplink = Deeplink()
deeplink?.url = url
}
else if let activityDictionary = launchOptions?[UIApplicationLaunchOptionsKey.userActivityDictionary] as? [AnyHashable: Any] { //Universal link
for key in activityDictionary.keys {
if let userActivity = activityDictionary[key] as? NSUserActivity {
if let url = userActivity.webpageURL {
deeplink = Deeplink()
deeplink?.url = url
}
}
}
}
}
open func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
print(url.absoluteString)
deeplink = Deeplink()
deeplink?.url = url
navigate()
return true
}
Posting a new answer for Swift 5. Many of the answers are outdated or address handling custom URLs, but not specifically how to open a UIViewController from within the AppDelegate. Run this code within your AppDelegate:
//Get the view controller that is currently displayed upon launch
let rootViewController = window?.rootViewController
//Initialise the view controller you wish to open
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "MyViewController")
//Launch the view controller
rootViewController.present(vc, animated: true)
Yes it is possible to modify URL scheme so that you can jump user to any viewcontroller.I used and implement normal as well as https://hokolinks.com/ deep link.By hoko link deep linking you can modify your URL Scheme ,also you can send data with that URL.
Integrate iOS SDK Using Hoko Link
- Add a URL Scheme to your App
- SDK Setup
To integrate HOKO open source SDK in your app (only iOS 5 and higher) you just have to follow 3 simple steps (either using cocoapods or doing it manually).
Using CocoaPods
1- Install CocoaPods in your system
2- Open your Xcode project folder and create a file called Podfile with the following content:
pod 'Hoko', '~> 2.3.0'
3- Run pod install and wait for CocoaPods to install HOKO SDK. From this moment on, instead of using .xcodeproj file, you should start using .xcworkspace.
Manual integration
1- Download the Hoko SDK.
2- Drag the Hoko folder to your project.
3- Be sure to also add SystemConfiguration.framework and zlib.dylib in case your project does not include it already.
Integrating the SDK with your Swift project
Because the HOKO SDK is written in Objective-C, you’ll have to manually add a Bridging Header file into your project in order to use it with your Swift code:
1- File > New > File... > iOS > Source > Header File
2- Name that header file YourAppName-Bridging-Header.h
3- Inside that header file, import #import
4- Go to your project > Build Settings > Search for Objective-C Bridging Header > Add the path to your bridging header file, from your root folder (e.g. MyApp/MyApp-Bridging-Header.h)
Add a URL Scheme to your App
Next, we need to define your app’s custom URL type, if you don’t have one already. Open your Xcode project settings and under the “Info” tab expand the “URL Types” section. You can skip this step if you already configured a URL type.
If this section is empty, click in the “+” icon to add a new URL type. Let’s say that we want to open the app via “hoko://”. Hence we need to enter “hoko” in URL Schemes.
We also should assign a unique Identifier to this URL type. Apple recommends that you use reverse DNS notation to ensure that there are no name collisions between types. In this example we are going to use “com.hoko.app”.
Take note of your URL Scheme because we will ask you for it, when you are creating an app through the dashboard, e.g. “hoko”.
URL Scheme
Setup Associated Domains (Universal Links) - iOS 9.0+
For your app to fully support the newly introduced Universal Links by Apple you’ll have to enable and add a new entry in the Associated Domains section, inside your application target’s Capabilities tab. Click on the ‘+’ button and add a new entry with the following value: applinks:myapp.hoko.link, being myapp the Hoko subdomain you chose for your app’s Hoko links. You can also have your own link domain (learn more about this on the subdomains section).
URL Scheme
SDK Setup
Add the following line to your applicationDidFinishLaunching method in your AppDelegate class (don’t forget to import the HOKO class by using #import if you’re working with Objective-C).
Objective-C
Swift
#import
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Hoko setupWithToken:#"YOUR-APP-TOKEN"];
// The rest of your code goes here...
return YES;
}
If you are using a custom domain in your smart links, you must setup the iOS SDK using setupWithToken:customDomain: as following:
Objective-C
Swift
#import
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Hoko setupWithToken:#"YOUR-APP-TOKEN"
customDomain:#"your.custom.domain.com"];
// The rest of your code goes here...
return YES;
}
NOTE: make sure to return YES in the application:didFinishLaunchingWithOptions: delegate method to allow incoming deep links that open your app to be processed. Returning NO will block the requests.
Setup your mobile deep linking by using Hoko Link SDK

Resources