{"id":15371454,"url":"https://github.com/nathanwalker/seattlemeetupdemo","last_synced_at":"2025-08-03T15:32:00.781Z","repository":{"id":142263133,"uuid":"80185483","full_name":"NathanWalker/SeattleMeetupDemo","owner":"NathanWalker","description":null,"archived":false,"fork":false,"pushed_at":"2017-01-27T06:26:48.000Z","size":41830,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T07:05:54.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NathanWalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-27T06:12:00.000Z","updated_at":"2017-01-27T06:21:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"99d9e51b-c609-46fc-9eb8-832e3b8fb45d","html_url":"https://github.com/NathanWalker/SeattleMeetupDemo","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"2f4f2bd48d48b53a7c307a1324e28de35f1feebf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NathanWalker/SeattleMeetupDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2FSeattleMeetupDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2FSeattleMeetupDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2FSeattleMeetupDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2FSeattleMeetupDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NathanWalker","download_url":"https://codeload.github.com/NathanWalker/SeattleMeetupDemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2FSeattleMeetupDemo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268567174,"owners_count":24271310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T13:47:02.049Z","updated_at":"2025-08-03T15:32:00.738Z","avatar_url":"https://github.com/NathanWalker.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo created at Seattle Angular Meetup on Jan. 26, 2017\n\n* [Run demo](#run-demo)\n* [Explanation of what happened at end of Meetup](#explanation-of-what-happened-at-end-of-meetup)\n\n\n## Run Demo\n\n1. `npm i`\n2. Compile custom pdf plugin using Swift Cocoapod:\n\n```\ntsc nativescript-pdf/pdf.ios.ts --types tns-core-modules --experimentalDecorators true\n```\n\n3. Ensure latest plugin is included:\n\n```\ntns plugin remove nativescript-pdf\ntns plugin add nativescript-pdf\n```\n\n4. Run iOS app\n\n```\ntns run ios --emulator\n```\n\n5. When app launches, click 'Create PDF'\n\n6. View console and copy the path it wrote the pdf to, then open that path from the terminal. For example (the path provided is just from my system run of the app - your path will be different):\n\n```\nopen /Users/nathan/Library/Developer/CoreSimulator/Devices/50661F53-A3AF-4858-AB9E-DFD7D9F88746/data/Containers/Data/Application/D5DC81DE-52BC-4BE2-815C-4CA967379554/Documents/test.pdf\n```\n\n## Explanation of what happened at end of Meetup\n\nAs expected, it was something incredibly silly simple. It wasn't even related to the Swift CocoaPod - we had that perfect! It was related to the NSData (Data) call we converted, here is what we had:\n\n```\npdfData.writeToFileAtomically(path);\n```\n\nAnd this is what was needed:\n\n```\npdfData.writeToFileAtomically(path, true);\n```\n\nWhy?\n\nVery simple. When translating Swift or Objective C to NativeScript, when the function calls combine to become JavaScript calls, each combined argument identifier must also be passed. Here's the Swift/ObjC api for the above:\n\n```\nfunc write(toFile: String, atomically: Bool) -\u003e Bool\n```\n\nReferenced here: https://developer.apple.com/reference/foundation/n...\nWhen translating to NativeScript, the argument identifiers combine (capitalizing first char), but the passed arguments must match, so:\n\n```\n             toFile, atomically\n             path, true  \n             ...to become...\npdfData.writeToFileAtomically(path, true);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanwalker%2Fseattlemeetupdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanwalker%2Fseattlemeetupdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanwalker%2Fseattlemeetupdemo/lists"}