Facebook 提供の製品で、Facebook アカウントと連携している Instagram ビジネスアカウント向けの WEB API サービス。Instagram が Facebook 傘下になったことからか、旧 Instagram API は 2020 年までに廃止されることとなり Instagram Graph API として Facebook の製品群に取り込まれる形になった。利用するためにはアプリケーションレビュー ( = 審査 ) が必要で、Sandbox 的な グラフ API エクスプローラ でアプリを開発/テストしレビューを経て認可を受けなければならない。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+OpenUrl.swift | |
// | |
// Created by James Sedlacek on 11/26/24. | |
// | |
/// This file provides a safe way to open URLs in SwiftUI applications. | |
/// It adds a view modifier that handles URL opening with user confirmation | |
/// and multiple opening options (browser, in-app, or copy to clipboard). | |
/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.01 | |
0.99 | |
0.98 | |
0.98 | |
0.98 | |
0.95 | |
0.93 | |
0.91 | |
0.9 | |
0.92 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mailAddress = "YOUR_EMAIL_ADDRSS"; | |
var slackToken = "SLACK_TOKEN"; | |
var searchMailQuery = 'SEARCH_QUERY'; // example: '[from:[email protected] YOUR_APP_NAME]'; | |
var slackChannelId = "SLACK_CHANNEL_ID"; | |
function getAttachment(message) { | |
var subject = message.getSubject(); | |
var body = message.getPlainBody(); | |
bonus tip: for more darkness > https://darkreader.org/
この投稿では、iOSのファイルシステムについて理解し、データを永続化(iCloud含む)する方法を紹介する。尚、サンプルコードは動かない可能性もあるので参考程度にして下さい。
アプリがファイルシステムとやり取り出来る場所は、ほぼアプリのサンドボックス内のディレクトリに制限されている。新しいアプリがインストールされる際、インストーラーはサンドボックス内に複数のコンテナを作成し、図1に示す構成をとる。各コンテナには役割があり、Bundle Containerはアプリのバンドルを保持し、Data Containerはアプリとユーザ両方のデータを保持する。Data Containerは用途毎に、さらに複数のディレクトリに分けられる。アプリは、例えばiCloud Containerのように、実行時に追加のコンテナへのアクセスをリクエストすることもある。
図1. An iOS app operating within its own sandbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# includesでentriesとそれに紐づくcommentsをロードしておく。 | |
# そうすることで以後の処理でentriesとそれに紐づくcommentsを取得するさいに | |
# 毎回SQLを発行することを防ぐ。 | |
# | |
# includesのかわりにjoinsを使うと事前ロードはされないため、 | |
# 以後の処理でSQLが吐かれてしまうので注意する。 | |
# | |
blog = Blog.includes(:entries => :comments).find_by_id(1) |