Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 2.77 KB

Log To GoogleDocs.md

File metadata and controls

62 lines (48 loc) · 2.77 KB

Log Storage in GoogleDocs

  1. Open Google Drive, click New > More > Google Forms.
  2. Enter a title to your form from the top left corner
  3. The first field which is "Question Title" should be "App Version" and "Question Type" should be "Text" (Or "Short Answer" in new version)
  4. Click Done. Add 3 more questions like this, their texts should be "User Information", "Code Information", "Log Text".
  5. Make sure it looks like this at the end:
  6. Click "View Live Form", https://docs.google.com/forms/d/19MbGnGA54cj9nobK5FxvRNcXJ-Gtudb_xSA3VChzSxU/viewform a link like this opens up. Use the link as the first paramater in your code like this:
QorumOnlineLogs.setupOnlineLogs(formLink: "https://docs.google.com/forms/d/19MbGnGA54cj9nobK5FxvRNcXJ-Gtudb_xSA3VChzSxU/formResponse", 
versionField: <#String#>, userInfoField: <#String#>, methodInfoField: <#String#>, textField: <#String#>)

With one difference: change "viewform" to "formResponse".

  1. Go back to your live form, under App Version, select the text field, right click and select "Inspect Element" (I am using Chrome, might be different in your browser)

    demo

  2. Get the value of "id" from that text fields HTML.

Edit: In new version scroll down until you see something like:

<input type="hidden" name="entry.473505335" jsname="L9xHkb">

Get the contents of "name".

  1. Use that as the second parameter in your code:
QorumOnlineLogs.setupOnlineLogs(formLink: "https://docs.google.com/forms/d/19MbGnGA54cj9nobK5FxvRNcXJ-Gtudb_xSA3VChzSxU/formResponse", 
versionField: "entry_631576183", userInfoField: <#String#>, methodInfoField: <#String#>, textField: <#String#>)
  1. Repeat the same process for the other text fields:
QorumOnlineLogs.setupOnlineLogs(formLink: "https://docs.google.com/forms/d/19MbGnGA54cj9nobK5FxvRNcXJ-Gtudb_xSA3VChzSxU/formResponse", 
versionField: "entry_631576183", userInfoField: "entry_922538006", methodInfoField: "entry_836974774", textField: "entry_526236259")
  1. Type these after your setup:
QorumLogs.enabled = false // This should be disabled for OnlineLogs to work
QorumOnlineLogs.enabled = true
QorumOnlineLogs.test()
  1. Go back to the screen where you edited the form and click "View Responses"
  2. Run your application, you should see this in the Xcode debugger:

demo

and this in your form responses:

demo

Here is the public demo sheet: https://docs.google.com/spreadsheets/d/1rYRStyI46L2sjiFF9DTDMlCb2qR2FMtKrZk3USRdXkA/

Congratulations!