IOS
Last updated
Last updated
Copies the OmniLinkframewrok in the target App directory.
Next, import the library to Embed & Sign that is in Project setting - General - Frameworks, Libraries, and Embedded Content.
Run an App with the Universal Link method in an iOS 9 or above environment. For details regarding the Universal Link please check the developer site (https://developer.apple.com/ios/universal-links/).
Requires a Trusted SSL applied domain in order to support the Universal Link. And position it on "URL root/apple-app-site-association" or "URL root/.well-known/apple-app-site-association" by creating a file that has no accessible "apple-app-site-association" extension in that domain. (Ex: https://cloud.raonmobilesecurity.com/.well-known/apple-app-site-association)
Enter the file with the text editor below.
"paths" from the above contents is an address which corresponds to universalLink defined on Javascript RSBridge.conf.js. Moreover, "appID" is composited with "#Prefix.#BundleID#" and please check below for more details.
Activate "Associated Domains" as shown below in the target App on a App IDs(https://developer.apple.com/account/ios/identifier/bundle) of the Developer site.
Prefix and BundleID can be checked
Activate the Associated Domains function in the Capabilities in project settings in the Xcode. Click the below + button to enter URL to apply to the Universal Link (ex: applinks:#DomainName#)
When processing without any error, it will automatically create the entitlements file as below.
In order to go back from the Receive App to the Send App or browser, it is required to input in advance in a custom scheme which is supported by the Send App and browser. Add LSApplicationQueriesSchemes as below in the Xcode - Project setting - Info - Custom iOS Target Properties or info.plist
info.plist can also add through the editor.
Set Custom Scheme for the environment that does not support the Universal Link. Enter the scheme name as below in the Xcode - Project setting - Info - URL Types or info.plist.
CLASS
Content
Purpose
Directs to the market when the target App is not stored in the device
Use
ToAppManager.sharedInstance.setFallbackURL(url: "App Store URL")
Parameter
url Required
Return
void
Example
ToAppManager.sharedInstance.setFallbackURL(url: "App Store URL")
Note
Uses the transmitting App
CLASS
Content
Purpose
Use it when calling and forwarding data from the transmitting App to the target App
Use
ToAppManager.sharedInstance.callApp
(scheme: "sendappScheme", host: "sendappHost", type: "type", select: "select"
, responseHost: "myHost", responseScheme: "myScheme")
Parameter
host Required, scheme Required, type Optional, select Optional
, responseHost Required, responseScheme Required
Return
void
Example
ToAppManager.sharedInstance.callApp
(scheme: "receivescheme", host: "receivehost", type: "didauth", select: ""
, responseHost: "sendhost", responseScheme: "sendscheme")
Note
Uses the transmitting App
CLASS
Content
Purpose
A function that runs on the Appdelegate when the target App runs
Forwarded data setting on the transmitting App
Use
ToAppManager.sharedInstance.receive(url: URL)
Parameter
url Required
Return
NSMutableDictionary
Example
let receiveData = try? ToAppManager.sharedInstance.receive(url: url)
Note
Uses the target App
CLASS
Content
Purpuse
Uses when calling and forwarding data from the target App to transmitting App
Use
try? ToAppManager.sharedInstance.returnResult(result: "base64 encoded string")
Parameter
result Required
Return
void
Example
let resultText = "callback results for test AppToApp" let encoded = resultText.toBase64()
try? ToAppManager.sharedInstance.returnResult(result: encoded)
Note
Uses the target App
CLASS
Content
Purpose
Extracts received data from the target App
Use
try? ToAppManager.sharedInstance.resultReceive(resultEnc: "call back data encoded base 64")
Parameter
resultEnc Required
Return
String
Example
let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)
let items = urlComponents?.queryItems
if let result = items?.filter({$0.name == "result"}).first?.value {
vc.callbackString = try? ToAppManager.sharedInstance.resultReceive(resultEnc: result)
}
Note
Uses the transmitting App