How to display at the top of a Smart banner for Universal Links in Safari

382 Views Asked by At

Implemented Universal link of IOS with iPhone and iPad. My app runs the app by accessing a specific URL in the safari browser. When accessing a specific URL, a Smart banner appears at the top of the web page. This Smart Banner is a smart banner automatically created by AASA (apple-app-site-association).
AASA


{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "<Team_ID>.<Bundle_ID>",
        "paths": [ "/path/test.asp" ]
      }
    ]
  },
  "webcredentials": {
    "apps": [ "<Team_ID>.<Bundle_ID>" ]
  },
  "related_applications": [
    {
      "platform": "ios",
      "url": "https://example.co.kr/path/test.asp",
      "appID": <Bundle_ID>,
      "appName": name
    }
  ],
  "prefer_related_applications": true
}

Get Url Data

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
  self.latestLink = [url absoluteString];
  return YES;
}

- (BOOL)application:(UIApplication *)application
    continueUserActivity:(NSUserActivity *)userActivity
      restorationHandler:(void (^)(NSArray *_Nullable))restorationHandler {
  if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
    self.latestLink = [userActivity.webpageURL absoluteString];
    if (!_eventSink) {
      self.initialLink = self.latestLink;
    }
    return YES;
  }
  return NO;
}

On the iPhone, when you access a specific web page, a Smart Banner is created at the top so you can launch the app through the Open button. However, on the iPad, you have to access a specific web page and scroll down to see the Smart Banner. This creates a Smart Banner, but it seems to be initially hidden.

Is there a way to make the Smart Banner visible on the Ipade as it is on the Iphone, without scrolling?

0

There are 0 best solutions below