Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8316033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:15:58+00:00 2026-06-08T21:15:58+00:00

I have a need to set some context via Safari (a context token), and

  • 0

I have a need to set some context via Safari (a context token), and then read that context from a native iOS app. What are the best practices for doing this?

A couple thoughts so far:

  1. Set the context in an HTML 5 database, but I’m not sure this will work because the database might be only accessible from Safari. Would using a WebUIView in the native app allow me to access the same HTML5 database / local storage as Safari?
  2. Set the context in device storage, but I’m not sure this will work because I don’t know if Safari can actually write to device storage.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:15:59+00:00Added an answer on June 8, 2026 at 9:15 pm

    I would suggest one of these two options:

    • Let the web server keep track on the user both in the app and on the website, for example by creating a user account.

    or

    • Pass the context token to the app immediately via an URL-scheme by registering your app as a protocol handler, see more info here

      Suggested way:

      1. Send e-mail with link and context token, when user clicks link, save context token in cookie in safari, then redirect to appstore for app download.
      2. When the user downloaded the app and opens it, present a button for the user, when the user clicks it, open a web page in safari.
      3. Safari loads the cookie with the context token, and then triggers another link using a URL-scheme like yourAppName://contextToken=12345678. The link opens your app which reads the context token from the URL.

    There is no best practice for directly sharing data between safari and a native app directly and that it is simply not intended that you should do that. All cookies and storages are sandboxed for each app and safari has its own sandbox.

    Letting your server doing the job via user accounts is the best and clean way i.m.o. That is why you have user accounts. If you didn’t try out the protocol handler for reading specific URLs, that could also be made handy I think.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set inside .bashrc some aliases that I need to be seen inside
I have a page with some HTML in it. and I need to set
I have a Rails app running Mongoid on Heroku and I need to set
I have a vector of booleans. I need to set its elements from n-th
Some context here...I have a System.Windows.Window that is used to display a modal message
I have some tabs that I load the content up via ajax. I am
I have a Spring MVC Controller class that needs a property set from a
I have a query result set that contains data that I need to filter,
I need to set GCGraceSeconds to 0, because I have only one node, but
i need to set image as background in android gridview. I have code which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.