Deep linking in Gospel Library for iOS

Discussions around the iPhone/iPad/iPod Touch versions of the Gospel Library application.
Post Reply
User avatar
sbradshaw
Community Moderators
Posts: 6246
Joined: Mon Sep 26, 2011 9:42 pm
Location: Utah
Contact:

Deep linking in Gospel Library for iOS

#1

Post by sbradshaw »

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:

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

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_li ... smusic://)
Samuel Bradshaw • If you desire to serve God, you are called to the work.
muckel522
New Member
Posts: 1
Joined: Sun Apr 12, 2015 9:08 pm

Re: Deep linking in Gospel Library for iOS

#2

Post by muckel522 »

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
Community Moderators
Posts: 6246
Joined: Mon Sep 26, 2011 9:42 pm
Location: Utah
Contact:

Re: Deep linking in Gospel Library for iOS

#3

Post by sbradshaw »

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 • If you desire to serve God, you are called to the work.
davidbcarter
New Member
Posts: 35
Joined: Sun Mar 11, 2007 7:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

#4

Post by davidbcarter »

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 2:12 pm

Re: Deep linking in Gospel Library for iOS

#5

Post by rickferguson »

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: 35
Joined: Sun Mar 11, 2007 7:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

#6

Post by davidbcarter »

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
Community Moderators
Posts: 6246
Joined: Mon Sep 26, 2011 9:42 pm
Location: Utah
Contact:

Re: Deep linking in Gospel Library for iOS

#7

Post by sbradshaw »

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 • If you desire to serve God, you are called to the work.
davidbcarter
New Member
Posts: 35
Joined: Sun Mar 11, 2007 7:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

#8

Post by davidbcarter »

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: 35
Joined: Sun Mar 11, 2007 7:35 pm
Location: Tennessee, USA

Re: Deep linking in Gospel Library for iOS

#9

Post by davidbcarter »

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
Community Moderators
Posts: 6246
Joined: Mon Sep 26, 2011 9:42 pm
Location: Utah
Contact:

Re: Deep linking in Gospel Library for iOS

#10

Post by sbradshaw »

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-stre ... uage.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-stre ... uage.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 • If you desire to serve God, you are called to the work.
Post Reply

Return to “iPhone/iPad Gospel Library”