Deep linking in Gospel Library for iOS

Discussions around the iPhone/iPad/iPod Touch versions of the Gospel Library application.
User avatar
sbradshaw
Senior Member
Posts: 2484
Joined: Mon Sep 26, 2011 8:42 pm
Location: Provo, UT
Contact:

Deep linking in Gospel Library for iOS

Postby sbradshaw » Sat Mar 14, 2015 1:14 pm

Gospel Library 3.4.8 for iOS is in beta, and one feature I'm really excited about is the ability to "deep link" into the app. This will allow a web site or a third-party app to link directly to a scripture verse, manual, etc. by using the gospellibrary:// URL scheme. For example:

gospellibrary://content/scriptures/bofm/1-ne/1.1?lang=eng
gospellibrary://content/manual/teachings-of-presidents-of-the-church-ezra-taft-benson?lang=eng
gospellibrary://content/manual/hymns/the-morning-breaks?lang=eng

A few things that aren't working now but I hope will be fixed by the time 3.4.8 is released:
  • The ability to link to content in other languages (using "?lang=spa")
  • The ability to link to content in the user's current content language (leave off the "?lang=")
  • The ability to notify a user when content that's linked to hasn't been downloaded yet instead of saying it doesn't exist

The LDS Music app for iOS has a similar system with ldsmusic:// that is undergoing changes to follow the same URL pattern as Gospel Library. The current system for LDS Music is documented here:
https://tech.lds.org/wiki/Syntax_for_linking_into_the_LDS_Music_app_(ldsmusic://)
Samuel Bradshaw • Interested in church apps and sites, creative recordkeeping, clerk support, YSA wards and stakes, LDS music, Vineyard at BYU, and online service.

muckel522
New Member
Posts: 1
Joined: Sun Apr 12, 2015 8:08 pm

Re: Deep linking in Gospel Library for iOS

Postby muckel522 » Sun Apr 12, 2015 8:09 pm

So will this potentially allow for linking between, say, Gospel Library and Deseret Bookshelf? It'd be great to do that, since my books are in DB, but I use the scriptures in GL.

User avatar
sbradshaw
Senior Member
Posts: 2484
Joined: Mon Sep 26, 2011 8:42 pm
Location: Provo, UT
Contact:

Re: Deep linking in Gospel Library for iOS

Postby sbradshaw » Sun Apr 12, 2015 9:24 pm

You could potentially link from a Deseret Bookshelf note to anywhere in Gospel Library, but not vice versa. As far as I know Deseret Bookshelf doesn't provide a way to link into it from other apps or sites.
Samuel Bradshaw • Interested in church apps and sites, creative recordkeeping, clerk support, YSA wards and stakes, LDS music, Vineyard at BYU, and online service.

davidbcarter
New Member
Posts: 32
Joined: Sun Mar 11, 2007 6:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

Postby davidbcarter » Mon Apr 13, 2015 7:53 am

I'm super excited about this feature. is there any documentation that provides a reference for learning the content hierarchy so that we can know how to create links to various pieces of content?

rickferguson
New Member
Posts: 6
Joined: Thu Jun 13, 2013 1:12 pm

Re: Deep linking in Gospel Library for iOS

Postby rickferguson » Mon Apr 13, 2015 8:44 am

This sounds like a great feature. I agree that some documentation on how to create the links is needed. Better yet, when text is highlighted, give the option to "copy link" to the clipboard. This could be a separate choice along with Mark, Note, Tag, Link, Copy, Share, Define, & Search; or (since this list is getting a bit crowded) it could be a "sub-item" of the Link, Copy, or Share choices.

davidbcarter
New Member
Posts: 32
Joined: Sun Mar 11, 2007 6:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

Postby davidbcarter » Mon Apr 13, 2015 11:04 am

In the meantime, I've found that, if you turn on "Show Source" in the advanced settings, you can select some text and press "Share" and one of the options will be "Debug." This will bring up the source code for the page you're looking at. Using this source code, find the URI for the paragraph you're wanting to link to. Your link will then be "gospellibrary://content/" followed by the URI you found in the source code.

You can also get a link by choosing "Messages" from the "Share" options, copying the link at the bottom of the message text, and changing the "http://www.lds.org/" to "gospellibrary://content/". The only limitation with this method is that the link is only to the chapter. It doesn't go all the way to the verse. You would then have to append a "." followed by the verse number or ".p" followed by the paragraph number (if you're linking to a manual or something that's not chapter and verse).

One bug that I've found (at least on my devices) is that the links only work if you already have the Gospel Library app open. If it's not open, tapping the link will open the app, but it won't take you to the desired location.

User avatar
sbradshaw
Senior Member
Posts: 2484
Joined: Mon Sep 26, 2011 8:42 pm
Location: Provo, UT
Contact:

Re: Deep linking in Gospel Library for iOS

Postby sbradshaw » Wed Apr 15, 2015 3:26 pm

davidbcarter wrote:You can also get a link by choosing "Messages" from the "Share" options, copying the link at the bottom of the message text, and changing the "http://www.lds.org/" to "gospellibrary://content/". The only limitation with this method is that the link is only to the chapter. It doesn't go all the way to the verse. You would then have to append a "." followed by the verse number or ".p" followed by the paragraph number (if you're linking to a manual or something that's not chapter and verse).

Good catch with the .p1 feature!
EDIT: I'm not getting this to work. Could you post an example link?
Samuel Bradshaw • Interested in church apps and sites, creative recordkeeping, clerk support, YSA wards and stakes, LDS music, Vineyard at BYU, and online service.

davidbcarter
New Member
Posts: 32
Joined: Sun Mar 11, 2007 6:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

Postby davidbcarter » Thu Apr 16, 2015 3:52 am

sbradshaw wrote:Good catch with the .p1 feature!
EDIT: I'm not getting this to work. Could you post an example link?

Here's a link to one of my favorite paragraphs from FSOY:

Code: Select all

gospellibrary://content/manual/for-the-strength-of-youth/language.p5

Remember, the links only work when Gospel Library app is already open. If it's not, the link will trigger the app to open, but it won't deep link to the desired location. Hopefully that will be fixed soon in an update. Deep links to the LDS Music app do not have this problem.

davidbcarter
New Member
Posts: 32
Joined: Sun Mar 11, 2007 6:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

Postby davidbcarter » Thu Apr 16, 2015 4:00 am

sbradshaw wrote:Good catch with the .p1 feature!
EDIT: I'm not getting this to work. Could you post an example link?

Something else that could be an issue is that not all "paragraphs" are tagged with a ".p#" syntax. Some headings, tables, etc. are tagged differently. The only way to know for sure is to use the "source code" view I described previously to look up the exact URI of the item you're wanting to link to.

Also, it's worth noting that you can highlight multiple verses or paragraphs in a single link by doing the following:

Code: Select all

gospellibrary://content/manual/for-the-strength-of-youth/language.p5-p7
gospellibrary://content/scriptures/bofm/moro/10.3-5

User avatar
sbradshaw
Senior Member
Posts: 2484
Joined: Mon Sep 26, 2011 8:42 pm
Location: Provo, UT
Contact:

Re: Deep linking in Gospel Library for iOS

Postby sbradshaw » Thu Apr 16, 2015 11:09 pm

OK, cool! I knew about the verse ranges (3-5) for scriptures, but I wouldn't have figured out the paragraph ranges (p5-p7) in other collections. It works on LDS.org, too:
https://www.lds.org/manual/for-the-strength-of-youth/language.p5-p7

On LDS.org the behavior is a little different in the scriptures vs. other manuals. If I go to this link: https://www.lds.org/manual/for-the-strength-of-youth/language.p5-p7
it automatically jumps to the highlighted section. If I go to this link it stays at the top of the page: https://www.lds.org/scriptures/bofm/moro/10.3-5
I have to add an anchor to the end like so to get it to jump: https://www.lds.org/scriptures/bofm/moro/10.3-5#3
(Or you can jump to the previous verse's spot so the selected verses aren't covered by the header bar: https://www.lds.org/scriptures/bofm/moro/10.3-5#2)
Samuel Bradshaw • Interested in church apps and sites, creative recordkeeping, clerk support, YSA wards and stakes, LDS music, Vineyard at BYU, and online service.


Return to “iPhone/iPad Gospel Library”

Who is online

Users browsing this forum: No registered users and 1 guest