Is there a way of using an external markdown editor initiated from within DTTG?

I tried using the share function and I was only able to open a copy in either 1Writer or IAWriter.

Then I tried using the Files app to open the MD files (even though I would have to do this outside of DTG) and it defaulted to a different editor and at this point I don’t how to change the default editor in IOS.

Thanks

Steven

That is not a function of DEVONthink To Go. It is controlled by iOS.

To choose a specific app, Share the file from the Files app and pick the app you want to use. To Share, Tap-hold using touch (finger or Pencil), right-click using a mouse or click with two fingers using a trackpad.

Files is supposed to use the last app you used in Share when you tap the file name twice in the 3-pane view or once in the list view. If you have never used Share, then it seems to open the last app you installed that claims that it supports that file type.

There is no way to ‘set the app for a file type’ like there is on MacOS.

1 Like

Thank you @leebutler! I never knew it was possible to do that, and I’ve been frustrated because I could not change the default app in iOS for years now. Just tested it myself, and it works exactly as you describe. Thanks again.

Thanks @leebutler.

Here is what I found. Using a regular txt file when I select an app via share it becomes the default app that opens it by tapping in the files app.
But for some reason, by a markdown file, no matter what I try it still opens on the same default app. It is only opening in Bear and I am trying to switch it to IAWriter or 1Writer.

I don’t use Bear so I can’t help much there, but the app must be doing something to force all .md files to open in their app.

If you installed iAWriter before Bear, maybe try removing and reinstalling iAWriter so it is ‘newer’.

Try the Bear support forums (which appear to be Reddit…) or contact them directly to ask how to stop that behavior.

When I was giving Bear a try a year ago, I thought you had to manually import a md file into the app…

@leebutler I appreciate your expertise and time. Thanks

Did one of the tips of @leebutler work? Please share the result of trying out and find the solution.

@leebutler I tried everything you said. I even uninstalled Bear totally and then another app was picked at random and only for markdown was the choice made by the share option ignored

Are you running iOS/iPadOS 13.5.1?

This works as I described on my system…

What is the other app, besides Bear, that is opening .md files?

I have Textastic installed and it supports MD files but my Share… choice of iAWriter is working.

Are you running iOS/iPadOS 13.5.1?

Yes

What is the other app, besides Bear, that is opening .md files?

Ulysses. When I uninstall Bear it uses Ulysses.

And yes I tried to make Ulysses the default app with the share function because I saw it became the default after Bear was uninstalled and it still failed.

Pretty frustrating . . .

Did some digging and found this:

LSHandlerRank “Handler rank”
String
Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type. The possible values are: Owner (this app is the primary creator of files of this type), Default (this app is an opener of files of this type; this value is also used if no rank is specified), Alternate (this app is a secondary viewer of files of this type), and None (this app is never selected to open files of this type, but it accepts drops of files of this type). Launch Services uses the value of LSHandlerRank to determine the app to use to open files of this type. The order of precedence is: Owner, Default, Alternate. This key is available in macOS 10.5 and later and iOS 3.0 and later.
iOS, macOS

From: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

Sounds like Bear and Ulysses chose to use Owner, Default or leave it blank while other apps chose to be reasonable and use “Alternate” so they would play nice with other apps.

I read with great interest the information and your thoughts about why this is happening but I did a little bit more experimenting and I think there’s probably some sort of corruption in my system.

I uninstalled both Bear and Ulysses and then I shared the markdown file and opened it in 1Writer which worked well and became the default app. However then I followed up and using the share functionality I opened the markdown file using iawriter. It opened up in iawriter but the default app remained 1writer even after I shared it and opened it in iawriter.

Not sure why this is happening on your system…

I downloaded Bear and using Share on my system is setting the default properly so it doesn’t appear to be an issue with LSHandleRank.

Here are my testing steps:
In Files tap on a md file, expected iAWriter to open as it has been my default
Download Bear
Run Bear
Force Quit both iAWriter and Bear
In Files, tap-hold on a md file and choose share, tap on Bear
Bear opens the md file as expected
Force Quit Bear
In Files, tap on a md file
Bear opens the md file as expected (now the default app for md files)
Force quit Bear
In Files, tap-hold on a md file and choose share, tap on iAWriter
iAWriter opens the md file as expected
Force Quit iAWriter
In Files, tap on a md file
iAWriter opens the md file as expected (now the default app for md files)

I cycled through that 2 times and each time the default app for md files switched as expected.

I did not test 1Writer, they do not have a free version or trial period.

@leebutler much appreciation for your time and knowledge.

I will try to mimic your steps and I will report my findings.

  • delete bear and ulysses apps
  • restart iPhone
  • force quit all the running apps on the phone

Now I will follow your steps substituting 1Writer For iaWriter

  • In Files tap on a md file, expected 1Writer to open as it has been my default
  • Download Bear
  • Run Bear
  • Force Quit both 1Writer and Bear
  • In Files, tap-hold on a md file and choose share, tap on Bear
  • Bear opens the md file as expected
  • Force Quit Bear
  • In Files, tap on a md file
  • Bear opens the md file as expected (now the default app for md files)
  • Force quit Bear
  • In Files, tap-hold on a md file and choose share, tap on 1Writer
  • iAWriter opens the md file as expected
    Nope, same as before. the file opens in Bear.

and I’m stuck