Skip to content

Instantly share code, notes, and snippets.

@theevilbit
Created March 26, 2024 09:13
Show Gist options
  • Save theevilbit/9c4a08d619319ed8ee4bb2d2079fa5a6 to your computer and use it in GitHub Desktop.
Save theevilbit/9c4a08d619319ed8ee4bb2d2079fa5a6 to your computer and use it in GitHub Desktop.
Download Apple Technotes
#!/bin/zsh
#ugly script bu works. Most of the time. You might need to rerun to get all pages.
#need to open the pages before we can do --print-to-pdf or --dump-dom as otherwise it doesn't load them
#doing PDFs as raw htmls look really ugly
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --incognito https://developer.apple.com/documentation/technotes/
sleep 10
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless=new --incognito --dump-dom https://developer.apple.com/documentation/technotes/ > technotes.html
cat technotes.html | grep -Eo "href=\"/documentation/technotes/tn[a-zA-Z0-9/-]*\"" | cut -d "\"" -f 2 | cut -d "/" -f 4 | sort -u > urls.txt
while read link; do
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --incognito https://developer.apple.com/documentation/technotes/$link
sleep 10
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless=new --incognito --print-to-pdf=$link.pdf --no-pdf-header-footer https://developer.apple.com/documentation/technotes/$link
done < urls.txt
tn3102-http3-in-your-app
tn3103-apple-pay-on-the-web-troubleshooting-guide
tn3104-recording-video-in-apple-prores
tn3105-customizing-uistatusbar-syle
tn3106-customizing-uinavigationbar-appearance
tn3107-resolving-sign-in-with-apple-response-errors
tn3108-viewing-the-interface-of-your-swift-code
tn3109-resolving-common-archiving-issues
tn3110-resolving-generic-xcode-archive-issue
tn3111-ios-wifi-api-overview
tn3113-testing-xpc-code-with-an-anonymous-listener
tn3115-bluetooth-state-restoration-app-relaunch-rules
tn3117-resolving-build-errors-for-apple-silicon
tn3118-debugging-your-apps-launch-screen
tn3120-expected-use-cases-for-network-extension-packet-tunnel-providers
tn3121-selecting-a-pixel-format-for-an-avcapturevideodataoutput
tn3122-receipt-validation-with-the-app-store-fails-with-a-non-zero-error-code
tn3123-refactoring-your-storyboard
tn3125-inside-code-signing-provisioning-profiles
tn3126-inside-code-signing-hashes
tn3127-inside-code-signing-requirements
tn3128-starting-shareplay-without-an-existing-facetime-call
tn3129-resolving-build-errors-from-helper-tools-in-xcode-cloud
tn3130-changes-to-eventkit-in-macos13-ventura
tn3132-changes-eventkit-and-eventkitui-in-ios16
tn3133-packaging-a-renderer
tn3134-network-extension-provider-deployment
tn3135-low-level-networking-on-watchos
tn3136-avaudioconverter-performing-sample-rate-conversions
tn3137-on-mac-keychains
tn3138-handling-app-store-receipt-signing-certificate-changes
tn3145-hdr-video-metadata
tn3147-migrating-to-the-latest-notarization-tool
tn3149-fetching-change-history-events
tn3150-getting-ready-for-data-less-files
tn3151-choosing-the-right-networking-api
tn3152-migrating-to-the-latest-calendar-access-levels
tn3153-adopting-api-changes-for-eventkit-in-ios-macos-and-watchos
tn3154-adopting-swiftui-navigation-split-view
tn3155-debugging-universal-links
tn3157-updating-your-watchos-project-for-swiftui-and-widgetkit
tn3158-resolving-xcode-15-device-connection-issues
tn3159-migrating-sign-in-with-apple-users-for-an-app-transfer
tn3161-inside-code-signing-certificates
tn3162-understanding-cloudkit-throttles
tn3163-understanding-the-synchronization-of-nspersistentcloudkitcontainer
tn3164-debugging-the-synchronization-of-nspersistentcloudkitcontainer
tn3165-packet-filter-is-not-api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment