├── .ruby-version ├── MastodonIntent ├── hy-AM.lproj │ └── Intents.strings └── MastodonIntent.entitlements ├── AppVersion.xcconfig ├── Mastodon ├── Supporting Files │ ├── hy.lproj │ │ ├── Main.strings │ │ └── LaunchScreen.strings │ └── Settings.bundle │ │ └── en.lproj │ │ └── Root.strings ├── Resources │ ├── BoopSound.caf │ ├── Preview Assets.xcassets │ │ ├── Contents.json │ │ ├── Athens.imageset │ │ │ ├── IMG_1010.jpg │ │ │ └── Contents.json │ │ ├── mrdongok.imageset │ │ │ ├── mrdongok-Z53ognhPjek-unsplash.jpg │ │ │ └── Contents.json │ │ ├── tiraya-adam.imageset │ │ │ ├── tiraya-adam-QfHEWqPelsc-unsplash.jpg │ │ │ └── Contents.json │ │ ├── bradley-dunn.imageset │ │ │ ├── bradley-dunn-miqbDWtOG-o-unsplash.jpg │ │ │ └── Contents.json │ │ ├── lucas-ludwig.imageset │ │ │ ├── lucas-ludwig-8ARg12PU8nE-unsplash.jpg │ │ │ └── Contents.json │ │ └── markus-spiske.imageset │ │ │ ├── markus-spiske-45R3oFOJt2k-unsplash.jpg │ │ │ └── Contents.json │ ├── ko.lproj │ │ └── infoPlist.strings │ ├── Base.lproj │ │ └── infoPlist.strings │ ├── da.lproj │ │ └── infoPlist.strings │ ├── en-US.lproj │ │ └── infoPlist.strings │ ├── he.lproj │ │ └── infoPlist.strings │ ├── hi.lproj │ │ └── infoPlist.strings │ ├── hy-AM.lproj │ │ └── InfoPlist.strings │ ├── pl.lproj │ │ └── infoPlist.strings │ ├── pt-BR.lproj │ │ └── infoPlist.strings │ ├── ro.lproj │ │ └── infoPlist.strings │ ├── si.lproj │ │ └── infoPlist.strings │ ├── cy.lproj │ │ └── infoPlist.strings │ ├── is.lproj │ │ └── infoPlist.strings │ ├── lv.lproj │ │ └── infoPlist.strings │ ├── an.lproj │ │ └── infoPlist.strings │ ├── my.lproj │ │ └── infoPlist.strings │ ├── et.lproj │ │ └── infoPlist.strings │ ├── lt.lproj │ │ └── infoPlist.strings │ ├── id.lproj │ │ └── infoPlist.strings │ ├── uk.lproj │ │ └── infoPlist.strings │ └── pt.lproj │ │ └── infoPlist.strings ├── .sourcery.yml ├── Vender │ ├── Mastodon-Bridging-Header.h │ └── HandleTapAction.swift ├── Coordinator │ └── Coordinator.swift ├── Scene │ ├── Settings │ │ ├── Server Details │ │ │ └── Table View Components │ │ │ │ ├── AdminTableViewCell.swift │ │ │ │ └── AboutInstance.swift │ │ ├── General Settings │ │ │ └── GeneralSettingsDiffableTableViewDataSource.swift │ │ ├── Beta Testing Settings │ │ │ └── BetaTestSettingsDiffableTableViewDataSource.swift │ │ └── Privacy and Safety │ │ │ └── CheckableButton.swift │ ├── Share │ │ ├── View │ │ │ ├── TableView │ │ │ │ └── PollTableView.swift │ │ │ └── Control │ │ │ │ └── RefreshControl.swift │ │ ├── Webview │ │ │ └── WebViewModel.swift │ │ └── ContextMenu │ │ │ └── ImagePreview │ │ │ ├── TimelineTableViewCellContextMenuConfiguration.swift │ │ │ └── ContextMenuImagePreviewViewModel.swift │ ├── Notification │ │ └── Notification Filtering │ │ │ └── Requests │ │ │ ├── NotificationRequestConstants.swift │ │ │ └── NotificationRequestsViewModel.swift │ ├── Onboarding │ │ ├── Privacy │ │ │ └── PrivacyTableViewCell.swift │ │ ├── PickServer │ │ │ └── MastodonPickServerAppearance.swift │ │ ├── ServerRules │ │ │ └── ServerRuleItem.swift │ │ └── Login │ │ │ └── ContentSizedTableView.swift │ ├── MediaPreview │ │ └── Paging │ │ │ └── MediaPreviewPagingViewController.swift │ ├── Transition │ │ └── MediaPreview │ │ │ ├── MediaPreviewingViewController.swift │ │ │ └── MediaPreviewTransitionViewController.swift │ ├── SuggestionAccount │ │ └── RecommendAccountItem.swift │ ├── Search │ │ └── SearchDetail │ │ │ └── SearchHistory │ │ │ └── SearchHistoryItem.swift │ ├── Discovery │ │ └── DiscoveryItem.swift │ ├── Root │ │ └── Sidebar │ │ │ └── SecondaryPlaceholderViewController.swift │ └── Profile │ │ └── Header │ │ └── View │ │ └── ProfileFieldCollectionViewHeaderFooterView.swift ├── Diffable │ ├── Onboarding │ │ ├── RegisterSection.swift │ │ └── RegisterItem.swift │ ├── Search │ │ └── SearchItem.swift │ └── User │ │ └── UserItem.swift ├── Template │ ├── AutoGenerateProtocolDelegate.swift │ ├── AutoGenerateTableViewDelegate.swift │ └── AutoGenerateProtocolRelayDelegate.swift ├── Extension │ ├── Collection+IsNotEmpty.swift │ ├── UIImage+SFSymbols.swift │ ├── NSKeyValueObservation.swift │ ├── UITabBarController.swift │ ├── UIInterfaceOrientationMask.swift │ ├── UIView+Remove.swift │ ├── UIBarButtonItem.swift │ ├── Double.swift │ ├── UITableViewCell.swift │ ├── UIFont.swift │ └── AVPlayer.swift ├── Protocol │ ├── DisposeBagCollectable.swift │ ├── Provider │ │ ├── DataSourceFacade.swift │ │ ├── DataSourceProvider+NotificationTableViewCellDelegate.swift │ │ ├── DataSourceFacade+Status+History.swift │ │ └── DataSourceFacade+Model.swift │ └── ScrollViewContainer.swift ├── Activity │ └── ShareActivityProvider.swift ├── Helper │ ├── PortraitAlertController.swift │ ├── MastodonLocalCode.swift │ └── URLActivityItem.swift ├── Preference │ └── KeyboardPreference.swift └── Mastodon.entitlements ├── WidgetExtension ├── hy-AM.lproj │ └── WidgetExtension.strings ├── Assets.xcassets │ ├── Contents.json │ ├── missingAvatar.imageset │ │ ├── missing.png │ │ └── Contents.json │ ├── Colors │ │ └── Contents.json │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── WidgetBackground.colorset │ │ └── Contents.json │ ├── BrandIconColored.imageset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── BrandIcon.imageset │ │ └── Contents.json ├── WidgetExtension.swift ├── WidgetExtension.entitlements ├── Info.plist ├── WidgetExtensionBundle.swift ├── View+WidgetBackground.swift ├── ar.lproj │ └── WidgetExtension.strings ├── ca.lproj │ └── WidgetExtension.strings ├── cs.lproj │ └── WidgetExtension.strings ├── de.lproj │ └── WidgetExtension.strings ├── en.lproj │ └── WidgetExtension.strings ├── es.lproj │ └── WidgetExtension.strings ├── eu.lproj │ └── WidgetExtension.strings ├── fi.lproj │ └── WidgetExtension.strings ├── fr.lproj │ └── WidgetExtension.strings ├── gd.lproj │ └── WidgetExtension.strings ├── gl.lproj │ └── WidgetExtension.strings ├── it.lproj │ └── WidgetExtension.strings ├── ja.lproj │ └── WidgetExtension.strings ├── ku.lproj │ └── WidgetExtension.strings ├── nl.lproj │ └── WidgetExtension.strings ├── ru.lproj │ └── WidgetExtension.strings ├── sl.lproj │ └── WidgetExtension.strings ├── sv.lproj │ └── WidgetExtension.strings ├── th.lproj │ └── WidgetExtension.strings ├── tr.lproj │ └── WidgetExtension.strings ├── vi.lproj │ └── WidgetExtension.strings ├── ckb.lproj │ └── WidgetExtension.strings ├── es-AR.lproj │ └── WidgetExtension.strings ├── kab.lproj │ └── WidgetExtension.strings ├── zh-Hans.lproj │ └── WidgetExtension.strings └── zh-Hant.lproj │ └── WidgetExtension.strings ├── ShareActionExtension ├── hy.lproj │ └── MainInterface.strings └── ShareActionExtension.entitlements ├── MastodonSDK ├── README.md ├── Sources │ ├── MastodonUI │ │ ├── import.swift │ │ ├── Helper │ │ │ └── DateTimeProvider.swift │ │ ├── Extension │ │ │ ├── CGSize+Hashable.swift │ │ │ ├── UIScreen.swift │ │ │ ├── UIView.swift │ │ │ ├── View.swift │ │ │ ├── UIColor+Extensions.swift │ │ │ └── AXCustomContent.swift │ │ ├── Protocol │ │ │ └── StatusCompatible.swift │ │ ├── Vendor │ │ │ └── VisualEffectView.swift │ │ ├── View │ │ │ └── Button │ │ │ │ └── RoundedEdgesButton.swift │ │ └── Scene │ │ │ └── ComposeContent │ │ │ └── AutoComplete │ │ │ └── AutoCompleteViewModel+Diffable.swift │ ├── CoreDataStack │ │ ├── .sourcery.yml │ │ ├── Protocol │ │ │ └── NetworkUpdatable.swift │ │ ├── CoreData.xcdatamodeld │ │ │ └── .xccurrentversion │ │ ├── Template │ │ │ ├── AutoUpdatableObject.swift │ │ │ ├── AutoGenerateProperty.swift │ │ │ ├── AutoGenerateRelationship.swift │ │ │ └── Stencil │ │ │ │ └── AutoUpdatableObject.stencil │ │ └── Entity │ │ │ └── Transient │ │ │ ├── Feed+Kind.swift │ │ │ ├── MastodonTagHistory.swift │ │ │ ├── MastodonField.swift │ │ │ └── MastodonFollowRequestState.swift │ ├── MastodonAsset │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── Colors │ │ │ │ ├── Donations │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Primary │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Secondary │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ └── on.container.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── UpdatedPostLayout_2025 │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Border │ │ │ │ │ └── Contents.json │ │ │ │ ├── Brand │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Eggplant.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Dark Blurple.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Light Blurple.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Button │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── userBlocked.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── userFollow.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Icon │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── plus.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Label │ │ │ │ │ └── Contents.json │ │ │ │ ├── Poll │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── disabled.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Shadow │ │ │ │ │ └── Contents.json │ │ │ │ ├── Slider │ │ │ │ │ └── Contents.json │ │ │ │ ├── Notification │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── favourite.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── TextField │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── invalid.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── valid.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── deprecated │ │ │ │ │ └── Contents.json │ │ │ │ ├── danger.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── goldenrod.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── alert.yellow.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── danger.border.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── success.green.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── system.orange.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── badge.background.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── battleshipGrey.colorset │ │ │ │ │ └── Contents.json │ │ │ │ └── media.type.indicotor.colorset │ │ │ │ │ └── Contents.json │ │ │ ├── Theme │ │ │ │ ├── system │ │ │ │ │ ├── Background │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Asset │ │ │ │ ├── friends.imageset │ │ │ │ │ ├── friends 1.png │ │ │ │ │ ├── friends 2.png │ │ │ │ │ ├── friends 3.png │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── email.imageset │ │ │ │ │ ├── c1 1~universal.pdf │ │ │ │ │ └── Contents.json │ │ │ │ ├── donationThankYou.imageset │ │ │ │ │ ├── donation_successful_art.png │ │ │ │ │ └── Contents.json │ │ │ │ ├── scribble.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── mastodon.text.logo.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Arrow │ │ │ │ ├── Contents.json │ │ │ │ └── square.and.arrow.up.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Circles │ │ │ │ ├── Contents.json │ │ │ │ ├── plus.circle.imageset │ │ │ │ │ └── Contents.json │ │ │ │ ├── forbidden.20.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── plus.circle.fill.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Editing │ │ │ │ ├── Contents.json │ │ │ │ ├── xmark.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── checkmark.20.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Human │ │ │ │ ├── Contents.json │ │ │ │ ├── eye.circle.fill.imageset │ │ │ │ │ └── Contents.json │ │ │ │ ├── eye.slash.circle.fill.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── face.smiling.adaptive.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Scene │ │ │ │ ├── Contents.json │ │ │ │ ├── Compose │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Attachment │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ ├── stop.imageset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── retry.imageset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── questionmark.circle.imageset │ │ │ │ │ │ ├── questionmark.circle.pdf │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── emoji.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── media.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── poll.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── emoji.fill.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── poll.fill.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── chat.warning.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── reorder.dot.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── chat.warning.fill.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Profile │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── About │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ └── verified_checkmark.imageset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Banner │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ ├── username.gray.colorset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── name.edit.background.gray.colorset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── RelationshipButton │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Report │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── report.banner.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Setting │ │ │ │ │ └── Contents.json │ │ │ │ ├── Sidebar │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── logo.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Welcome │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── illustration │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ ├── cloud.base.extend.imageset │ │ │ │ │ │ │ ├── cloud.base.extend.png │ │ │ │ │ │ │ ├── cloud.base.extend@2x.png │ │ │ │ │ │ │ ├── cloud.base.extend@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── cloud.base.imageset │ │ │ │ │ │ │ ├── Untitled-1_0007_Group-6 1.png │ │ │ │ │ │ │ ├── Untitled-1_0007_Group-6 1@2x.png │ │ │ │ │ │ │ ├── Untitled-1_0007_Group-6 1@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── elephant.three.on.grass.imageset │ │ │ │ │ │ │ ├── Untitled-1_0003_Group-1 1.png │ │ │ │ │ │ │ ├── Untitled-1_0003_Group-1 1@2x.png │ │ │ │ │ │ │ ├── Untitled-1_0003_Group-1 1@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── elephant.on.airplane.with.contrail.imageset │ │ │ │ │ │ │ ├── untitled10006Group21.png │ │ │ │ │ │ │ ├── untitled10006Group21@2x.png │ │ │ │ │ │ │ ├── untitled10006Group21@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── elephant.three.on.grass.with.tree.two.imageset │ │ │ │ │ │ │ ├── untitled10004Group111.png │ │ │ │ │ │ │ ├── untitled10004Group111@2x.png │ │ │ │ │ │ │ ├── untitled10004Group111@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── elephant.three.on.grass.extend.imageset │ │ │ │ │ │ │ ├── elephant.three.on.grass.extend.png │ │ │ │ │ │ │ ├── elephant.three.on.grass.extend@2x.png │ │ │ │ │ │ │ ├── elephant.three.on.grass.extend@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── elephant.three.on.grass.with.tree.three.imageset │ │ │ │ │ │ │ ├── untitled10005Group101.png │ │ │ │ │ │ │ ├── untitled10005Group101@2x.png │ │ │ │ │ │ │ ├── untitled10005Group101@3x.png │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ ├── background.cyan.colorset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── background.green.colorset │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── mastodon.logo.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Discovery │ │ │ │ │ └── Contents.json │ │ │ │ ├── Edit History │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── Edit.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Notification │ │ │ │ │ └── Contents.json │ │ │ │ └── Onboarding │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── avatar.placeholder.imageset │ │ │ │ │ ├── Frame 82.jpg │ │ │ │ │ ├── Frame 82@2x.png │ │ │ │ │ ├── Frame 82@3x.png │ │ │ │ │ └── Contents.json │ │ │ ├── Settings │ │ │ │ ├── Contents.json │ │ │ │ └── about_instance_placeholder.imageset │ │ │ │ │ ├── about_instance_placeholder@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── Communication │ │ │ │ ├── Contents.json │ │ │ │ ├── boost.symbolset │ │ │ │ │ └── Contents.json │ │ │ │ └── share.imageset │ │ │ │ │ └── Contents.json │ │ │ ├── Connectivity │ │ │ │ ├── Contents.json │ │ │ │ └── photo.fill.split.imageset │ │ │ │ │ └── Contents.json │ │ │ └── ObjectsAndTools │ │ │ │ ├── Contents.json │ │ │ │ ├── bookmark.imageset │ │ │ │ ├── bookmark-regular.pdf │ │ │ │ └── Contents.json │ │ │ │ ├── bookmark.fill.imageset │ │ │ │ ├── bookmark-solid.pdf │ │ │ │ └── Contents.json │ │ │ │ ├── gear.imageset │ │ │ │ └── Contents.json │ │ │ │ ├── star.imageset │ │ │ │ └── Contents.json │ │ │ │ └── star.fill.imageset │ │ │ │ └── Contents.json │ │ ├── Font │ │ │ └── Staatliches-Regular.ttf │ │ └── MastodonAsset+Bundle.swift │ ├── MastodonCore │ │ ├── Model │ │ │ ├── Poll │ │ │ │ ├── PollSection.swift │ │ │ │ ├── PollComposeSection.swift │ │ │ │ └── PollItem.swift │ │ │ ├── Compose │ │ │ │ ├── ComposeStatusPollSection.swift │ │ │ │ ├── ComposeStatusAttachmentSection.swift │ │ │ │ ├── CustomEmojiPickerSection.swift │ │ │ │ ├── AutoCompleteSection.swift │ │ │ │ └── ComposeStatusAttachmentItem.swift │ │ │ └── PlaintextMetaContent.swift │ │ ├── Service │ │ │ ├── PublisherService │ │ │ │ ├── StatusPublisherReactor.swift │ │ │ │ ├── StatusPublisherState.swift │ │ │ │ ├── StatusPublishResult.swift │ │ │ │ └── StatusPublisher.swift │ │ │ └── API │ │ │ │ ├── APIService+Marker.swift │ │ │ │ └── APIService+Filter.swift │ │ ├── AppError.swift │ │ ├── Extension │ │ │ ├── NSKeyValueObservation.swift │ │ │ ├── MastodonSDK │ │ │ │ ├── Mastodon+Entity+Link.swift │ │ │ │ ├── Mastodon+Entity+Tag.swift │ │ │ │ └── Mastodon+Entity+Account.swift │ │ │ └── CoreDataStack │ │ │ │ ├── Subscription.swift │ │ │ │ ├── MastodonMention.swift │ │ │ │ └── MastodonField.swift │ │ ├── Persistence │ │ │ └── FileManager+Shared.swift │ │ └── UserDefaults+Authentication.swift │ ├── MastodonExtension │ │ ├── UInt64.swift │ │ ├── UIEdgeInsets.swift │ │ └── NSManagedObjectContext.swift │ ├── MastodonCommon │ │ ├── AppName.swift │ │ ├── Extension │ │ │ └── UserDefaults.swift │ │ └── Preference │ │ │ ├── Preference+Wizard.swift │ │ │ ├── Preference+Discovery.swift │ │ │ ├── Preference+Language.swift │ │ │ ├── Preference+App.swift │ │ │ └── Preference+StoreReview.swift │ ├── MastodonSDK │ │ ├── Entity │ │ │ ├── Mastodon+Entity+Empty.swift │ │ │ ├── Mastodon+Entity+DefaultServer.swift │ │ │ ├── Mastodon+Entity.swift │ │ │ ├── Mastodon+Entity+StatusSource.swift │ │ │ ├── Mastodon+Entity+Suggestion.swift │ │ │ ├── Mastodon+Entity+Context.swift │ │ │ ├── Mastodon+Entity+ExtendedDescription.swift │ │ │ ├── Mastodon+Entity+FamiliarFollowers.swift │ │ │ ├── Mastodon+Entity+Activity.swift │ │ │ └── Mastodon+Entity+History.swift │ │ ├── Extension │ │ │ └── Bool.swift │ │ ├── Mastodon.swift │ │ ├── API │ │ │ └── Mastodon+API+Disputes.swift │ │ └── InstanceConfigLimitingPropertyContaining.swift │ └── MastodonLocalization │ │ └── MastodonLocalization+Bundle.swift └── Tests │ └── MastodonSDKTests │ └── MastodonSDKTests.swift ├── env └── .env ├── fastlane ├── Appfile ├── Deliverfile ├── devices.txt.example ├── Pluginfile └── Matchfile ├── OpenInActionExtension ├── Media.xcassets │ ├── Contents.json │ └── Icon.appiconset │ │ ├── MastodonActionExtensionIcon@3x.png │ │ └── Contents.json └── OpenInActionExtension.entitlements ├── AppIcon.icon └── Assets │ └── Icon-Dark-1024x1024.png ├── Mastodon.xcodeproj ├── xcshareddata │ └── IDETemplateMacros.plist └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── .env.example ├── .github ├── scripts │ ├── setup.sh │ └── build.sh └── support │ └── ExportOptions.plist ├── Localization └── StringsConvertor │ └── input │ ├── zh-Hant.lproj │ └── ios-infoPlist.json │ ├── zh-Hans.lproj │ └── ios-infoPlist.json │ ├── ja.lproj │ └── ios-infoPlist.json │ ├── ko.lproj │ └── ios-infoPlist.json │ ├── ckb.lproj │ └── ios-infoPlist.json │ ├── th.lproj │ └── ios-infoPlist.json │ ├── da.lproj │ └── ios-infoPlist.json │ ├── he.lproj │ └── ios-infoPlist.json │ ├── hi.lproj │ └── ios-infoPlist.json │ ├── pt-BR.lproj │ └── ios-infoPlist.json │ ├── ro.lproj │ └── ios-infoPlist.json │ ├── si.lproj │ └── ios-infoPlist.json │ ├── vi.lproj │ └── ios-infoPlist.json │ ├── ar.lproj │ └── ios-infoPlist.json │ ├── en-US.lproj │ └── ios-infoPlist.json │ ├── hy.lproj │ └── ios-infoPlist.json │ ├── sv.lproj │ └── ios-infoPlist.json │ ├── cy.lproj │ └── ios-infoPlist.json │ ├── is.lproj │ └── ios-infoPlist.json │ ├── lv.lproj │ └── ios-infoPlist.json │ ├── pl.lproj │ └── ios-infoPlist.json │ ├── an.lproj │ └── ios-infoPlist.json │ ├── fi.lproj │ └── ios-infoPlist.json │ ├── ca.lproj │ └── ios-infoPlist.json │ ├── gl.lproj │ └── ios-infoPlist.json │ ├── my.lproj │ └── ios-infoPlist.json │ ├── ru.lproj │ └── ios-infoPlist.json │ ├── cs.lproj │ └── ios-infoPlist.json │ ├── es-AR.lproj │ └── ios-infoPlist.json │ ├── et.lproj │ └── ios-infoPlist.json │ ├── hu.lproj │ └── ios-infoPlist.json │ ├── it.lproj │ └── ios-infoPlist.json │ ├── lt.lproj │ └── ios-infoPlist.json │ ├── nl.lproj │ └── ios-infoPlist.json │ ├── es.lproj │ └── ios-infoPlist.json │ ├── id.lproj │ └── ios-infoPlist.json │ ├── tr.lproj │ └── ios-infoPlist.json │ ├── be.lproj │ └── ios-infoPlist.json │ ├── de.lproj │ └── ios-infoPlist.json │ ├── eu.lproj │ └── ios-infoPlist.json │ ├── sl.lproj │ └── ios-infoPlist.json │ ├── uk.lproj │ └── ios-infoPlist.json │ ├── kab.lproj │ └── ios-infoPlist.json │ ├── kmr.lproj │ └── ios-infoPlist.json │ ├── gd.lproj │ └── ios-infoPlist.json │ ├── el.lproj │ └── ios-infoPlist.json │ ├── fr.lproj │ └── ios-infoPlist.json │ └── pt.lproj │ └── ios-infoPlist.json ├── Gemfile ├── NotificationService └── NotificationService.entitlements └── swiftgen.yml /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.3.5 2 | -------------------------------------------------------------------------------- /MastodonIntent/hy-AM.lproj/Intents.strings: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AppVersion.xcconfig: -------------------------------------------------------------------------------- 1 | MARKETING_VERSION = 2025.10 2 | -------------------------------------------------------------------------------- /Mastodon/Supporting Files/hy.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /WidgetExtension/hy-AM.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ShareActionExtension/hy.lproj/MainInterface.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Mastodon/Supporting Files/hy.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /MastodonSDK/README.md: -------------------------------------------------------------------------------- 1 | # MastodonSDK 2 | 3 | A description of this package. 4 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/import.swift: -------------------------------------------------------------------------------- 1 | @_exported import MastodonExtension 2 | -------------------------------------------------------------------------------- /env/.env: -------------------------------------------------------------------------------- 1 | # Required 2 | NotificationEndpointDebug="" 3 | NotificationEndpointRelease="" -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier("org.joinmastodon.app") 2 | team_id("5Z4GVSS33P") 3 | -------------------------------------------------------------------------------- /fastlane/Deliverfile: -------------------------------------------------------------------------------- 1 | force true 2 | app_identifier "org.joinmastodon.app" 3 | precheck_include_in_app_purchases false -------------------------------------------------------------------------------- /fastlane/devices.txt.example: -------------------------------------------------------------------------------- 1 | Device ID Device Name Device Platform 2 | 00000000-0000000000000000 Your-Device-Name ios -------------------------------------------------------------------------------- /Mastodon/Resources/BoopSound.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/BoopSound.caf -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/.sourcery.yml: -------------------------------------------------------------------------------- 1 | sources: 2 | - . 3 | templates: 4 | - ./Template 5 | output: 6 | Generated -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/.sourcery.yml: -------------------------------------------------------------------------------- 1 | sources: 2 | - . 3 | - ../MastodonSDK/Sources 4 | templates: 5 | - ./Template 6 | output: 7 | Generated 8 | -------------------------------------------------------------------------------- /OpenInActionExtension/Media.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AppIcon.icon/Assets/Icon-Dark-1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/AppIcon.icon/Assets/Icon-Dark-1024x1024.png -------------------------------------------------------------------------------- /Mastodon.xcodeproj/xcshareddata/IDETemplateMacros.plist: -------------------------------------------------------------------------------- 1 | { 2 | FILEHEADER = " Copyright © ___YEAR___ Mastodon gGmbH. All rights reserved."; 3 | } -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-versioning' 6 | -------------------------------------------------------------------------------- /Mastodon/Vender/Mastodon-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Donations/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Background/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/UpdatedPostLayout_2025/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Coordinator/Coordinator.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | protocol Coordinator { 6 | func start() 7 | } 8 | -------------------------------------------------------------------------------- /Mastodon/Supporting Files/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Supporting Files/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Font/Staatliches-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Font/Staatliches-Regular.ttf -------------------------------------------------------------------------------- /WidgetExtension/WidgetExtension.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import MastodonCore 4 | import MastodonSDK 5 | import MastodonLocalization 6 | 7 | -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/missingAvatar.imageset/missing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/WidgetExtension/Assets.xcassets/missingAvatar.imageset/missing.png -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Required 2 | 3 | # https:///relay-to/development 4 | NotificationEndpointDebug="" 5 | 6 | # https:///relay-to/production 7 | NotificationEndpointRelease="" 8 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/Athens.imageset/IMG_1010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/Preview Assets.xcassets/Athens.imageset/IMG_1010.jpg -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/Colors/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Mastodon.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/friends 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/friends 1.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/friends 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/friends 2.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/friends 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/friends 3.png -------------------------------------------------------------------------------- /.github/scripts/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | brew install swiftgen@6.6.2 4 | brew install sourcery@2.1.3 5 | 6 | # Install Ruby Bundler 7 | gem install bundler:2.5.21 8 | 9 | # Install Ruby Gems 10 | bundle install 11 | 12 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Arrow/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/email.imageset/c1 1~universal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/email.imageset/c1 1~universal.pdf -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Circles/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Editing/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Human/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Settings/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OpenInActionExtension/Media.xcassets/Icon.appiconset/MastodonActionExtensionIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/OpenInActionExtension/Media.xcassets/Icon.appiconset/MastodonActionExtensionIcon@3x.png -------------------------------------------------------------------------------- /Mastodon/Resources/ko.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "게시물에 사용할 사진을 찍기 위해 쓰임"; 2 | "NSPhotoLibraryAddUsageDescription" = "갤러리에 사진을 저장하기 위해 쓰임"; 3 | "NewPostShortcutItemTitle" = "새 글"; 4 | "SearchShortcutItemTitle" = "검색"; -------------------------------------------------------------------------------- /Mastodon/Scene/Settings/Server Details/Table View Components/AdminTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import UIKit 4 | 5 | typealias AdminTableViewCell = SearchResultsProfileTableViewCell 6 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Border/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Brand/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Button/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Icon/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Label/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Poll/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Shadow/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Slider/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Communication/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Connectivity/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Report/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Setting/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Sidebar/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Theme/system/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/mrdongok.imageset/mrdongok-Z53ognhPjek-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/Preview Assets.xcassets/mrdongok.imageset/mrdongok-Z53ognhPjek-unsplash.jpg -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Notification/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/TextField/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/deprecated/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Discovery/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Edit History/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Notification/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/About/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Mastodon/Scene/Share/View/TableView/PollTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PollTableView.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-3-3. 6 | // 7 | 8 | import UIKit 9 | 10 | final class PollTableView: UITableView { } 11 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Donations/Primary/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/Banner/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/WidgetBackground.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Donations/Secondary/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Mastodon/Diffable/Onboarding/RegisterSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RegisterSection.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-5. 6 | // 7 | 8 | import UIKit 9 | 10 | enum RegisterSection: Hashable { 11 | case main 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/tiraya-adam.imageset/tiraya-adam-QfHEWqPelsc-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/Preview Assets.xcassets/tiraya-adam.imageset/tiraya-adam-QfHEWqPelsc-unsplash.jpg -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/RelationshipButton/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "properties" : { 7 | "provides-namespace" : true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/bradley-dunn.imageset/bradley-dunn-miqbDWtOG-o-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/Preview Assets.xcassets/bradley-dunn.imageset/bradley-dunn-miqbDWtOG-o-unsplash.jpg -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/lucas-ludwig.imageset/lucas-ludwig-8ARg12PU8nE-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/Preview Assets.xcassets/lucas-ludwig.imageset/lucas-ludwig-8ARg12PU8nE-unsplash.jpg -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/markus-spiske.imageset/markus-spiske-45R3oFOJt2k-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/Mastodon/Resources/Preview Assets.xcassets/markus-spiske.imageset/markus-spiske-45R3oFOJt2k-unsplash.jpg -------------------------------------------------------------------------------- /Mastodon/Template/AutoGenerateProtocolDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoGenerateProtocolDelegate.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-13. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol AutoGenerateProtocolDelegate { } 11 | -------------------------------------------------------------------------------- /Mastodon/Template/AutoGenerateTableViewDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoGenerateTableViewDelegate.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-13. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol AutoGenerateTableViewDelegate { } 11 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/bookmark.imageset/bookmark-regular.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/bookmark.imageset/bookmark-regular.pdf -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Poll/PollSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PollSection.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-1-12. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum PollSection: Hashable { 11 | case main 12 | } 13 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/zh-Hant.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "用以拍照發嘟文", 3 | "NSPhotoLibraryAddUsageDescription": "用以儲存照片至圖片庫", 4 | "NewPostShortcutItemTitle": "新增嘟文", 5 | "SearchShortcutItemTitle": "搜尋" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/zh-Hans.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "用于在嘟文中附加图片", 3 | "NSPhotoLibraryAddUsageDescription": "用于将图片保存到照片图库", 4 | "NewPostShortcutItemTitle": "新嘟文", 5 | "SearchShortcutItemTitle": "搜索" 6 | } 7 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/donationThankYou.imageset/donation_successful_art.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/donationThankYou.imageset/donation_successful_art.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/bookmark.fill.imageset/bookmark-solid.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/bookmark.fill.imageset/bookmark-solid.pdf -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Frame 82.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Frame 82.jpg -------------------------------------------------------------------------------- /Mastodon/Template/AutoGenerateProtocolRelayDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoGenerateProtocolRelayDelegate.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-13. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol AutoGenerateProtocolRelayDelegate { } 11 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Frame 82@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Frame 82@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Frame 82@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Frame 82@3x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonExtension/UInt64.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UInt64.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-4-13. 6 | // 7 | 8 | import Foundation 9 | 10 | extension UInt64 { 11 | public static let nanosPerUnit: UInt64 = 1_000_000_000 12 | } 13 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ja.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "投稿用の写真撮影に使用します", 3 | "NSPhotoLibraryAddUsageDescription": "写真をフォトライブラリに保存するために使用します", 4 | "NewPostShortcutItemTitle": "新規投稿", 5 | "SearchShortcutItemTitle": "検索" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ko.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "게시물에 사용할 사진을 찍기 위해 쓰임", 3 | "NSPhotoLibraryAddUsageDescription": "갤러리에 사진을 저장하기 위해 쓰임", 4 | "NewPostShortcutItemTitle": "새 글", 5 | "SearchShortcutItemTitle": "검색" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Resources/Base.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "Search"; -------------------------------------------------------------------------------- /Mastodon/Resources/da.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Bruges til at tage foto til indlæg"; 2 | "NSPhotoLibraryAddUsageDescription" = "Bruges til at gemme foto i fotobiblioteket"; 3 | "NewPostShortcutItemTitle" = "Nyt indlæg"; 4 | "SearchShortcutItemTitle" = "Søg"; -------------------------------------------------------------------------------- /Mastodon/Resources/en-US.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "Search"; -------------------------------------------------------------------------------- /Mastodon/Resources/he.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "Search"; -------------------------------------------------------------------------------- /Mastodon/Resources/hi.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "Search"; -------------------------------------------------------------------------------- /Mastodon/Resources/hy-AM.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "Search"; -------------------------------------------------------------------------------- /Mastodon/Resources/pl.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "Nowy wpis"; 4 | "SearchShortcutItemTitle" = "Szukaj"; -------------------------------------------------------------------------------- /Mastodon/Resources/pt-BR.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Usado para tirar uma foto para postagem"; 2 | "NSPhotoLibraryAddUsageDescription" = "Usado para salvar foto na Galeria"; 3 | "NewPostShortcutItemTitle" = "Novo Toot"; 4 | "SearchShortcutItemTitle" = "Buscar"; -------------------------------------------------------------------------------- /Mastodon/Resources/ro.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "Search"; -------------------------------------------------------------------------------- /Mastodon/Resources/si.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Used to take photo for post status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Used to save photo into the Photo Library"; 3 | "NewPostShortcutItemTitle" = "New Post"; 4 | "SearchShortcutItemTitle" = "සොයන්න"; -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/BrandIconColored.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Logo.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/missingAvatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "missing.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Diffable/Search/SearchItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-18. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | enum SearchItem: Hashable { 12 | case trend(Mastodon.Entity.Tag) 13 | } 14 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/Athens.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_1010.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Scene/Notification/Notification Filtering/Requests/NotificationRequestConstants.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | import UIKit 4 | 5 | enum NotificationRequestConstants { 6 | static let dismissIcon = UIImage(systemName: "trash") 7 | } 8 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/questionmark.circle.imageset/questionmark.circle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/questionmark.circle.imageset/questionmark.circle.pdf -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Poll/PollComposeSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PollComposeSection.swift 3 | // 4 | // 5 | // Created by MainasuK on 2021-11-29. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum PollComposeSection: Hashable { 11 | case main 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/cy.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Defnyddir hwn i gymryd llun am bost"; 2 | "NSPhotoLibraryAddUsageDescription" = "Defnyddir hwn i gadw llun yn eich Photo Library"; 3 | "NewPostShortcutItemTitle" = "Post Newydd"; 4 | "SearchShortcutItemTitle" = "Chwilio"; -------------------------------------------------------------------------------- /Mastodon/Resources/is.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Notað til að taka mynd fyrir stöðufærslu"; 2 | "NSPhotoLibraryAddUsageDescription" = "Notað til að vista mynd inn í ljósmyndasafnið"; 3 | "NewPostShortcutItemTitle" = "Ný færsla"; 4 | "SearchShortcutItemTitle" = "Leita"; -------------------------------------------------------------------------------- /Mastodon/Resources/lv.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Izmanto, lai fotografētu ziņas statusu"; 2 | "NSPhotoLibraryAddUsageDescription" = "Izmanto, lai saglabātu fotoattēlu Photo Library"; 3 | "NewPostShortcutItemTitle" = "Jauna Ziņa"; 4 | "SearchShortcutItemTitle" = "Meklēt"; -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Service/PublisherService/StatusPublisherReactor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusPublisherReactor.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022/10/27. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol StatusPublisherReactor: AnyObject { } 11 | -------------------------------------------------------------------------------- /Mastodon/Extension/Collection+IsNotEmpty.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Array+IsNotEmpty.swift 3 | // Mastodon 4 | // 5 | // Created by Marcus Kida on 01.12.22. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Collection { 11 | var isNotEmpty: Bool { 12 | !isEmpty 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Resources/an.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "S'usa pa quitar fotos pa las publicacions"; 2 | "NSPhotoLibraryAddUsageDescription" = "S'usa pa alzar fotos en a Galería de Fotos"; 3 | "NewPostShortcutItemTitle" = "Nueva Publicación"; 4 | "SearchShortcutItemTitle" = "Buscar"; -------------------------------------------------------------------------------- /Mastodon/Resources/my.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "ပို့စ်အခြေအနေအတွက် ပုံရိုက်ရန် အသုံးပြုခဲ့သည်"; 2 | "NSPhotoLibraryAddUsageDescription" = "ဓာတ်ပုံပြခန်းတွင် ပုံသိမ်းရန် အသုံးပြုခဲ့သည်"; 3 | "NewPostShortcutItemTitle" = "ပို့စ်အသစ်"; 4 | "SearchShortcutItemTitle" = "ရှာဖွေရန်"; -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/scribble.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "scribble.svg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/AppName.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppName.swift 3 | // MastodonCommon 4 | // 5 | // Created by MainasuK Cirno on 2021-4-27. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum AppName { 11 | public static let groupID = "group.org.joinmastodon.app" 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+Empty.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // 4 | // 5 | // Created by sxiaojian on 2021/4/30. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity { 11 | public struct Empty: Codable { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "xcpretty" 4 | gem "abbrev" # Required for Ruby 3.4+ compatibility 5 | 6 | # Fastlane 7 | gem "fastlane" 8 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 9 | eval_gemfile(plugins_path) if File.exist?(plugins_path) 10 | -------------------------------------------------------------------------------- /Mastodon/Resources/et.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Kasutatkse postitusele lisatava foto pildistamiseks"; 2 | "NSPhotoLibraryAddUsageDescription" = "Kasutatakse foto salvestamiseks Fotode kogusse"; 3 | "NewPostShortcutItemTitle" = "Uus postitus"; 4 | "SearchShortcutItemTitle" = "Otsi"; -------------------------------------------------------------------------------- /Mastodon/Resources/lt.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Naudojamas daryti nuotrauką įrašo būsenai"; 2 | "NSPhotoLibraryAddUsageDescription" = "Naudojamas išsaugoti nuotrauką į nuotraukų biblioteką"; 3 | "NewPostShortcutItemTitle" = "Naujas įrašas"; 4 | "SearchShortcutItemTitle" = "Paieška"; -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/cloud.base.extend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/cloud.base.extend.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Untitled-1_0007_Group-6 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Untitled-1_0007_Group-6 1.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Extension/Bool.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bool.swift 3 | // 4 | // 5 | // Created by MainasuK Cirno on 2021/1/27. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Bool { 11 | var queryItemValue: String { 12 | return self ? "true" : "false" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Extension/UIImage+SFSymbols.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+SFSymbols.swift 3 | // Mastodon 4 | // 5 | // Created by Marcus Kida on 18.11.22. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIImage { 11 | static let chevronUpChevronDown = UIImage(systemName: "chevron.up.chevron.down") 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/mrdongok.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "mrdongok-Z53ognhPjek-unsplash.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/id.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Gunakan untuk mengambil foto untuk postingan status"; 2 | "NSPhotoLibraryAddUsageDescription" = "Gunakan untuk menyimpan foto ke dalam Galeri Foto"; 3 | "NewPostShortcutItemTitle" = "Postingan Baru"; 4 | "SearchShortcutItemTitle" = "Cari"; -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Protocol/NetworkUpdatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkUpdatable.swift 3 | // CoreDataStack 4 | // 5 | // Created by Cirno MainasuK on 2020-9-4. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol NetworkUpdatable { 11 | var networkDate: Date { get } 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/cloud.base.extend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/cloud.base.extend@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/cloud.base.extend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/cloud.base.extend@3x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Untitled-1_0007_Group-6 1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Untitled-1_0007_Group-6 1@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Untitled-1_0007_Group-6 1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Untitled-1_0007_Group-6 1@3x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Settings/about_instance_placeholder.imageset/about_instance_placeholder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Settings/about_instance_placeholder.imageset/about_instance_placeholder@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Compose/ComposeStatusPollSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ComposeStatusPollSection.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-6-29. 6 | // 7 | 8 | import Foundation 9 | 10 | enum ComposeStatusPollSection: Hashable { 11 | case main 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Helper/DateTimeProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateTimeProvider.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-1-29. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol DateTimeProvider { 11 | func shortTimeAgoSinceNow(to date: Date?) -> String? 12 | } 13 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ckb.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "بەکار دێت بۆ گرتنی وێنەیەک بۆ پۆستەکە", 3 | "NSPhotoLibraryAddUsageDescription": "بەکار دێت بۆ هەڵگرتنی وێنە", 4 | "NewPostShortcutItemTitle": "پۆستی نوێ", 5 | "SearchShortcutItemTitle": "بگەڕێ" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/th.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "ใช้เพื่อถ่ายรูปสำหรับโพสต์สถานะ", 3 | "NSPhotoLibraryAddUsageDescription": "ใช้เพื่อบันทึกรูปภาพลงในคลังรูปภาพ", 4 | "NewPostShortcutItemTitle": "โพสต์ใหม่", 5 | "SearchShortcutItemTitle": "ค้นหา" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/bradley-dunn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bradley-dunn-miqbDWtOG-o-unsplash.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/lucas-ludwig.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "lucas-ludwig-8ARg12PU8nE-unsplash.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/tiraya-adam.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "tiraya-adam-QfHEWqPelsc-unsplash.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/Extension/UserDefaults.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserDefaults.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-4-29. 6 | // 7 | 8 | import Foundation 9 | 10 | extension UserDefaults { 11 | public static let shared = UserDefaults(suiteName: AppName.groupID)! 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/AppError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppError.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-8-8. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum AppError: Error { 11 | case badRequest 12 | case badAuthentication 13 | case unexpected(String? = nil) 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Resources/Preview Assets.xcassets/markus-spiske.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "markus-spiske-45R3oFOJt2k-unsplash.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Mastodon/Resources/uk.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Використовується, щоб зробити фотографію для статусу публікації"; 2 | "NSPhotoLibraryAddUsageDescription" = "Використовується для збереження фото в бібліотеку"; 3 | "NewPostShortcutItemTitle" = "Новий допис"; 4 | "SearchShortcutItemTitle" = "Пошук"; -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/mastodon.text.logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "mastodon.title.logo.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/mastodon.logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "mastodon_logo.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/da.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Bruges til at tage foto til indlæg", 3 | "NSPhotoLibraryAddUsageDescription": "Bruges til at gemme foto i fotobiblioteket", 4 | "NewPostShortcutItemTitle": "Nyt indlæg", 5 | "SearchShortcutItemTitle": "Søg" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/he.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Used to take photo for post status", 3 | "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", 4 | "NewPostShortcutItemTitle": "New Post", 5 | "SearchShortcutItemTitle": "Search" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/hi.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Used to take photo for post status", 3 | "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", 4 | "NewPostShortcutItemTitle": "New Post", 5 | "SearchShortcutItemTitle": "Search" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/pt-BR.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Usado para tirar uma foto para postagem", 3 | "NSPhotoLibraryAddUsageDescription": "Usado para salvar foto na Galeria", 4 | "NewPostShortcutItemTitle": "Novo Toot", 5 | "SearchShortcutItemTitle": "Buscar" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ro.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Used to take photo for post status", 3 | "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", 4 | "NewPostShortcutItemTitle": "New Post", 5 | "SearchShortcutItemTitle": "Search" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/si.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Used to take photo for post status", 3 | "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", 4 | "NewPostShortcutItemTitle": "New Post", 5 | "SearchShortcutItemTitle": "සොයන්න" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/vi.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Được sử dụng để chụp ảnh cho tút", 3 | "NSPhotoLibraryAddUsageDescription": "Được sử dụng để lưu ảnh vào Thư viện ảnh", 4 | "NewPostShortcutItemTitle": "Soạn tút", 5 | "SearchShortcutItemTitle": "Tìm kiếm" 6 | } 7 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/donationThankYou.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "donation_successful_art.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Communication/boost.symbolset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "symbols" : [ 7 | { 8 | "filename" : "arrow.2.squarepath.checkmark.svg", 9 | "idiom" : "universal" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/MastodonAsset+Bundle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonAsset+Bundle.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-1-10. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum MastodonAsset { 11 | public static var bundle: Bundle { 12 | Bundle.module 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ar.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "يُستخدم لالتقاط الصورة عِندَ نشر الحالات", 3 | "NSPhotoLibraryAddUsageDescription": "يُستخدم لحِفظ الصورة في مكتبة الصور", 4 | "NewPostShortcutItemTitle": "مَنشُورٌ جَديد", 5 | "SearchShortcutItemTitle": "البحث" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/en-US.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Used to take photo for post status", 3 | "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", 4 | "NewPostShortcutItemTitle": "New Post", 5 | "SearchShortcutItemTitle": "Search" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/hy.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Used to take photo for post status", 3 | "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", 4 | "NewPostShortcutItemTitle": "Նոր գրառում", 5 | "SearchShortcutItemTitle": "Որոնել" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/sv.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Används för att ta foto till inlägg", 3 | "NSPhotoLibraryAddUsageDescription": "Används för att spara foto till bildbiblioteket", 4 | "NewPostShortcutItemTitle": "Nytt inlägg", 5 | "SearchShortcutItemTitle": "Sök" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Protocol/DisposeBagCollectable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DisposeBagCollectable.swift 3 | // Mastodon 4 | // 5 | // Created by sxiaojian on 2021/2/5. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | 11 | protocol DisposeBagCollectable: AnyObject { 12 | var disposeBag: Set { get set } 13 | } 14 | -------------------------------------------------------------------------------- /Mastodon/Scene/Onboarding/Privacy/PrivacyTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PrivacyTableViewCell.swift 3 | // Mastodon 4 | // 5 | // Created by Nathan Mattes on 15.12.22. 6 | // 7 | 8 | import UIKit 9 | 10 | class PrivacyTableViewCell: UITableViewCell { 11 | static let reuseIdentifier = "PrivacyTableViewCell" 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Untitled-1_0003_Group-1 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Untitled-1_0003_Group-1 1.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Compose/ComposeStatusAttachmentSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ComposeStatusAttachmentSection.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-6-29. 6 | // 7 | 8 | import Foundation 9 | 10 | enum ComposeStatusAttachmentSection: Hashable { 11 | case main 12 | } 13 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/cy.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Defnyddir hwn i gymryd llun am bost", 3 | "NSPhotoLibraryAddUsageDescription": "Defnyddir hwn i gadw llun yn eich Photo Library", 4 | "NewPostShortcutItemTitle": "Post Newydd", 5 | "SearchShortcutItemTitle": "Chwilio" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/is.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Notað til að taka mynd fyrir stöðufærslu", 3 | "NSPhotoLibraryAddUsageDescription": "Notað til að vista mynd inn í ljósmyndasafnið", 4 | "NewPostShortcutItemTitle": "Ný færsla", 5 | "SearchShortcutItemTitle": "Leita" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/lv.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Izmanto, lai fotografētu ziņas statusu", 3 | "NSPhotoLibraryAddUsageDescription": "Izmanto, lai saglabātu fotoattēlu Photo Library", 4 | "NewPostShortcutItemTitle": "Jauna Ziņa", 5 | "SearchShortcutItemTitle": "Meklēt" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/pl.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Służy do robienia zdjęć do statusu posta", 3 | "NSPhotoLibraryAddUsageDescription": "Służy do zapisywania zdjęć w bibliotece zdjęć", 4 | "NewPostShortcutItemTitle": "Nowy wpis", 5 | "SearchShortcutItemTitle": "Szukaj" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Activity/ShareActivityProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShareActivityProvider.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-25. 6 | // 7 | 8 | import UIKit 9 | 10 | protocol ShareActivityProvider { 11 | var activities: [Any] { get } 12 | var applicationActivities: [UIActivity] { get } 13 | } 14 | -------------------------------------------------------------------------------- /Mastodon/Scene/MediaPreview/Paging/MediaPreviewPagingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MediaPreviewPagingViewController.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-4-28. 6 | // 7 | 8 | import UIKit 9 | import Pageboy 10 | 11 | final class MediaPreviewPagingViewController: PageboyViewController { } 12 | -------------------------------------------------------------------------------- /Mastodon/Scene/Onboarding/PickServer/MastodonPickServerAppearance.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonPickServerAppearance.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021/3/6. 6 | // 7 | 8 | import UIKit 9 | 10 | enum MastodonPickServerAppearance { 11 | static let tableViewCornerRadius: CGFloat = 10 12 | } 13 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/an.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "S'usa pa quitar fotos pa las publicacions", 3 | "NSPhotoLibraryAddUsageDescription": "S'usa pa alzar fotos en a Galería de Fotos", 4 | "NewPostShortcutItemTitle": "Nueva Publicación", 5 | "SearchShortcutItemTitle": "Buscar" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/fi.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Käytetään kuvan ottamiseen julkaisua varten", 3 | "NSPhotoLibraryAddUsageDescription": "Käytetään kuvan tallentamiseen kuvakirjastoon", 4 | "NewPostShortcutItemTitle": "Uusi julkaisu", 5 | "SearchShortcutItemTitle": "Haku" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Mastodon/Resources/pt.lproj/infoPlist.strings: -------------------------------------------------------------------------------- 1 | "NSCameraUsageDescription" = "Utilizado para tirar fotografias para o estado da publicação"; 2 | "NSPhotoLibraryAddUsageDescription" = "Utilizado para guardar a fotografia na biblioteca de fotografias"; 3 | "NewPostShortcutItemTitle" = "Nova publicação"; 4 | "SearchShortcutItemTitle" = "Pesquisar"; -------------------------------------------------------------------------------- /Mastodon/Scene/Onboarding/ServerRules/ServerRuleItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ServerRuleItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-5. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | enum ServerRuleItem: Hashable { 12 | case rule(index: Int, rule: Mastodon.Entity.Instance.Rule) 13 | } 14 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Untitled-1_0003_Group-1 1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Untitled-1_0003_Group-1 1@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Untitled-1_0003_Group-1 1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Untitled-1_0003_Group-1 1@3x.png -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ca.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "S'utilitza per fer fotos per les publicacions", 3 | "NSPhotoLibraryAddUsageDescription": "S'utilitza per a desar fotos en la Fototeca", 4 | "NewPostShortcutItemTitle": "Nova Publicació", 5 | "SearchShortcutItemTitle": "Cerca" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/gl.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Utilizado para facer foto e publicar estado", 3 | "NSPhotoLibraryAddUsageDescription": "Utilizado para gardar a foto na Biblioteca", 4 | "NewPostShortcutItemTitle": "Nova publicación", 5 | "SearchShortcutItemTitle": "Buscar" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/my.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "ပို့စ်အခြေအနေအတွက် ပုံရိုက်ရန် အသုံးပြုခဲ့သည်", 3 | "NSPhotoLibraryAddUsageDescription": "ဓာတ်ပုံပြခန်းတွင် ပုံသိမ်းရန် အသုံးပြုခဲ့သည်", 4 | "NewPostShortcutItemTitle": "ပို့စ်အသစ်", 5 | "SearchShortcutItemTitle": "ရှာဖွေရန်" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/ru.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Используется для съемки фото для статуса поста", 3 | "NSPhotoLibraryAddUsageDescription": "Используется для сохранения фотографии в Фототеке", 4 | "NewPostShortcutItemTitle": "Новая почта", 5 | "SearchShortcutItemTitle": "Поиск" 6 | } 7 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/untitled10006Group21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/untitled10006Group21.png -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/cs.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Slouží k pořízení fotografie pro příspěvek", 3 | "NSPhotoLibraryAddUsageDescription": "Slouží k uložení fotografie do knihovny fotografií", 4 | "NewPostShortcutItemTitle": "Nový příspěvek", 5 | "SearchShortcutItemTitle": "Hledat" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/es-AR.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Usado para tomar fotos para los mensajes", 3 | "NSPhotoLibraryAddUsageDescription": "Usado para guardar la foto en la Biblioteca de fotos", 4 | "NewPostShortcutItemTitle": "Nuevo mensaje", 5 | "SearchShortcutItemTitle": "Buscar" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/et.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Kasutatkse postitusele lisatava foto pildistamiseks", 3 | "NSPhotoLibraryAddUsageDescription": "Kasutatakse foto salvestamiseks Fotode kogusse", 4 | "NewPostShortcutItemTitle": "Uus postitus", 5 | "SearchShortcutItemTitle": "Otsi" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/hu.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Használva a bejegyzés státuszhoz készített fotókhoz", 3 | "NSPhotoLibraryAddUsageDescription": "Használva a fotók Fotókönyvtárba mentéséhez", 4 | "NewPostShortcutItemTitle": "Új bejegyzés", 5 | "SearchShortcutItemTitle": "Keresés" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/it.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Usato per scattare foto per lo stato del post", 3 | "NSPhotoLibraryAddUsageDescription": "Utilizzato per salvare la foto nella galleria immagini", 4 | "NewPostShortcutItemTitle": "Nuovo post", 5 | "SearchShortcutItemTitle": "Cerca" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/lt.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Naudojamas daryti nuotrauką įrašo būsenai", 3 | "NSPhotoLibraryAddUsageDescription": "Naudojamas išsaugoti nuotrauką į nuotraukų biblioteką", 4 | "NewPostShortcutItemTitle": "Naujas įrašas", 5 | "SearchShortcutItemTitle": "Paieška" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/nl.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Gebruikt om foto's te nemen voor je berichten", 3 | "NSPhotoLibraryAddUsageDescription": "Gebruikt om foto's op te slaan in de fotobibliotheek", 4 | "NewPostShortcutItemTitle": "Nieuw bericht", 5 | "SearchShortcutItemTitle": "Zoek" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Scene/Share/Webview/WebViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewModel.swift 3 | // Mastodon 4 | // 5 | // Created by xiaojian sun on 2021/3/30. 6 | // 7 | 8 | import Foundation 9 | 10 | final class WebViewModel { 11 | public init(url: URL) { 12 | self.url = url 13 | } 14 | 15 | // input 16 | let url: URL 17 | } 18 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/untitled10006Group21@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/untitled10006Group21@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/untitled10006Group21@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/untitled10006Group21@3x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/untitled10004Group111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/untitled10004Group111.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Service/PublisherService/StatusPublisherState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusPublisherState.swift 3 | // 4 | // 5 | // Created by MainasuK on 2021-11-26. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum StatusPublisherState { 11 | case pending 12 | case failure(Error) 13 | case success 14 | } 15 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/es.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Se usa para sacar fotos para las publicaciones", 3 | "NSPhotoLibraryAddUsageDescription": "Se usa para guardar fotos en la Galería de Fotos", 4 | "NewPostShortcutItemTitle": "Nueva Publicación", 5 | "SearchShortcutItemTitle": "Buscar" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/id.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Gunakan untuk mengambil foto untuk postingan status", 3 | "NSPhotoLibraryAddUsageDescription": "Gunakan untuk menyimpan foto ke dalam Galeri Foto", 4 | "NewPostShortcutItemTitle": "Postingan Baru", 5 | "SearchShortcutItemTitle": "Cari" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/tr.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Fotoğraf çekerek durum paylaşmak için kullanılır", 3 | "NSPhotoLibraryAddUsageDescription": "Fotoğraf Albümü'ne fotoğraf kaydetmek için kullanılır", 4 | "NewPostShortcutItemTitle": "Yeni Gönderi", 5 | "SearchShortcutItemTitle": "Arama" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Extension/NSKeyValueObservation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSKeyValueObservation.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-2-24. 6 | // 7 | 8 | import Foundation 9 | 10 | extension NSKeyValueObservation { 11 | func store(in set: inout Set) { 12 | set.insert(self) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Scene/Transition/MediaPreview/MediaPreviewingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MediaPreviewingViewController.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-4-28. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol MediaPreviewingViewController: AnyObject { 11 | func isInteractiveDismissible() -> Bool 12 | } 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/elephant.three.on.grass.extend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/elephant.three.on.grass.extend.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/untitled10005Group101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/untitled10005Group101.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonLocalization/MastodonLocalization+Bundle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonLocalization+Bundle.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-5-17. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum MastodonLocalization { 11 | public static var bundle: Bundle { 12 | Bundle.module 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Extension/UITabBarController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITabBarController.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-3-31. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UITabBarController { 11 | open override var childForStatusBarStyle: UIViewController? { 12 | return selectedViewController 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/CoreData.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | CoreData 9.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/elephant.three.on.grass.extend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/elephant.three.on.grass.extend@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/elephant.three.on.grass.extend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/elephant.three.on.grass.extend@3x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/untitled10005Group101@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/untitled10005Group101@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/untitled10005Group101@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/untitled10005Group101@3x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/untitled10004Group111@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/untitled10004Group111@2x.png -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/untitled10004Group111@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastodon/mastodon-ios/develop/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/untitled10004Group111@3x.png -------------------------------------------------------------------------------- /.github/support/ExportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | app-store 7 | manageAppVersionAndBuildNumber 8 | 9 | 10 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/be.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Выкарыстоўваецца, каб зрабіць фатаграфію для статусу допісу", 3 | "NSPhotoLibraryAddUsageDescription": "Выкарыстоўваецца для захавання фатаграфій у бібліятэку", 4 | "NewPostShortcutItemTitle": "Новы допіс", 5 | "SearchShortcutItemTitle": "Пошук" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/de.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Wird verwendet, um Fotos für neue Beiträge aufzunehmen", 3 | "NSPhotoLibraryAddUsageDescription": "Wird verwendet, um Foto in der Foto-Mediathek zu speichern", 4 | "NewPostShortcutItemTitle": "Neuer Beitrag", 5 | "SearchShortcutItemTitle": "Suchen" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/eu.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Bidalketetarako argazkiak ateratzeko erabiltzen da", 3 | "NSPhotoLibraryAddUsageDescription": "Argazkiak Argazki-liburutegian gordetzeko erabiltzen da", 4 | "NewPostShortcutItemTitle": "Bidalketa berria", 5 | "SearchShortcutItemTitle": "Bilatu" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/sl.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Uporabljeno za zajem fotografij za stanje objave", 3 | "NSPhotoLibraryAddUsageDescription": "Uporabljeno za shranjevanje fotografije v knjižnico fotografij", 4 | "NewPostShortcutItemTitle": "Nova objava", 5 | "SearchShortcutItemTitle": "Iskanje" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/uk.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Використовується, щоб зробити фотографію для статусу публікації", 3 | "NSPhotoLibraryAddUsageDescription": "Використовується для збереження фото в бібліотеку", 4 | "NewPostShortcutItemTitle": "Новий допис", 5 | "SearchShortcutItemTitle": "Пошук" 6 | } 7 | -------------------------------------------------------------------------------- /OpenInActionExtension/Media.xcassets/Icon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "MastodonActionExtensionIcon@3x.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | } 9 | ], 10 | "info" : { 11 | "author" : "xcode", 12 | "version" : 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/kab.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Yettwaseqdac i tuṭṭfa n tewlafin deg usuffeɣ n waddaden", 3 | "NSPhotoLibraryAddUsageDescription": "Yettwaseqdac i usekles n tewlafin deg temkarḍit n tewlafin", 4 | "NewPostShortcutItemTitle": "Tasuffeɣt tamaynut", 5 | "SearchShortcutItemTitle": "Nadi" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/kmr.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Bo kişandina wêneyê ji bo rewşa şandiyan tê bikaranîn", 3 | "NSPhotoLibraryAddUsageDescription": "Ji bo tomarkirina wêneyê di pirtûkxaneya wêneyan de tê bikaranîn", 4 | "NewPostShortcutItemTitle": "Şandiya nû", 5 | "SearchShortcutItemTitle": "Bigere" 6 | } 7 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Compose/CustomEmojiPickerSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomEmojiPickerSection.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-3-24. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum CustomEmojiPickerSection: Equatable, Hashable { 11 | case uncategorized 12 | case emoji(name: String) 13 | } 14 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Extension/CGSize+Hashable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGSize.swift 3 | // 4 | // 5 | // Created by Jed Fox on 2022-12-20. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | extension CGSize: Hashable { 11 | public func hash(into hasher: inout Hasher) { 12 | hasher.combine(width) 13 | hasher.combine(height) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/gd.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "’Ga chleachdadh airson dealbh a thogail do staid puist", 3 | "NSPhotoLibraryAddUsageDescription": "’Ga chleachdadh airson dealbh a shàbhaladh ann an tasg-lann nan dealbhan", 4 | "NewPostShortcutItemTitle": "Post ùr", 5 | "SearchShortcutItemTitle": "Lorg" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Scene/SuggestionAccount/RecommendAccountItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RecommendAccountItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-2-10. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | enum RecommendAccountItem: Hashable { 12 | case account(Mastodon.Entity.Account, relationship: Mastodon.Entity.Relationship?) 13 | } 14 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Mastodon.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon.swift 3 | // 4 | // 5 | // Created by xiaojian sun on 2021/1/25. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum Mastodon { 11 | public enum Request { } 12 | public enum Response { } 13 | public enum API { } 14 | public enum Entity { } 15 | public enum Query { } 16 | } 17 | -------------------------------------------------------------------------------- /Mastodon/Helper/PortraitAlertController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PortraitAlertController.swift 3 | // Mastodon 4 | // 5 | // Created by Jed Fox on 2022-12-31. 6 | // 7 | 8 | import UIKit 9 | 10 | class PortraitAlertController: UIAlertController { 11 | override var supportedInterfaceOrientations: UIInterfaceOrientationMask { 12 | .portraitOnPhone 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Editing/xmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "xmark.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/el.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Χρησιμοποιείται για λήψη φωτογραφίας για την κατάσταση της ανάρτησης", 3 | "NSPhotoLibraryAddUsageDescription": "Χρησιμοποιείται για αποθήκευση φωτογραφιών στις Φωτογραφίες", 4 | "NewPostShortcutItemTitle": "Νέα Ανάρτηση", 5 | "SearchShortcutItemTitle": "Αναζήτηση" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/fr.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Utilisé pour prendre une photo lors de la publication d’un message", 3 | "NSPhotoLibraryAddUsageDescription": "Utilisé pour enregistrer les photos dans la Photothèque", 4 | "NewPostShortcutItemTitle": "Nouvelle Publication", 5 | "SearchShortcutItemTitle": "Rechercher" 6 | } 7 | -------------------------------------------------------------------------------- /Localization/StringsConvertor/input/pt.lproj/ios-infoPlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "NSCameraUsageDescription": "Utilizado para tirar fotografias para o estado da publicação", 3 | "NSPhotoLibraryAddUsageDescription": "Utilizado para guardar a fotografia na biblioteca de fotografias", 4 | "NewPostShortcutItemTitle": "Nova publicação", 5 | "SearchShortcutItemTitle": "Pesquisar" 6 | } 7 | -------------------------------------------------------------------------------- /Mastodon/Scene/Search/SearchDetail/SearchHistory/SearchHistoryItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchHistoryItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-7-15. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | enum SearchHistoryItem: Hashable { 12 | case hashtag(Mastodon.Entity.Tag) 13 | case account(Mastodon.Entity.Account) 14 | } 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/email.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "c1 1~universal.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Communication/share.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "share.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/gear.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "gear.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/star.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "star.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/emoji.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "emoji.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/media.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "media.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/poll.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "poll.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Sidebar/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "logo.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonIntent/MastodonIntent.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.org.joinmastodon.app 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Template/AutoUpdatableObject.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoUpdatableObject.swift 3 | // AutoUpdatableObject 4 | // 5 | // Created by Cirno MainasuK on 2021-8-18. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // Stencil protocol 12 | protocol AutoUpdatableObject { } 13 | 14 | // - autoUpdatableObject 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Circles/plus.circle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "plus.circle.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Edit History/Edit.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "edit.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WidgetExtension/WidgetExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.org.joinmastodon.app 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Template/AutoGenerateProperty.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoGenerateProperty.swift 3 | // AutoGenerateProperty 4 | // 5 | // Created by Cirno MainasuK on 2021-8-18. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // Stencil protocol 12 | protocol AutoGenerateProperty { } 13 | 14 | // - autoGenerateProperty 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Arrow/square.and.arrow.up.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Share iOS.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Circles/forbidden.20.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "forbidden.20.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Editing/checkmark.20.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkmark.20.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/star.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "star.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/emoji.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "emoji.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/poll.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "poll.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WidgetExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSExtension 6 | 7 | NSExtensionPointIdentifier 8 | com.apple.widgetkit-extension 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Mastodon/Extension/UIInterfaceOrientationMask.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIInterfaceOrientationMask.swift 3 | // Mastodon 4 | // 5 | // Created by Jed Fox on 2022-12-30. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIInterfaceOrientationMask { 11 | public static var portraitOnPhone: Self { 12 | return UIDevice.current.userInterfaceIdiom == .phone ? .portrait : .all 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Helper/MastodonLocalCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonLocalCode.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-11-4. 6 | // 7 | 8 | import Foundation 9 | 10 | // https://github.com/gunchleoc/mastodon/blob/ed6153b8f24d3a8f5a124cc95683bd1f20aec882/app/helpers/settings_helper.rb 11 | // last update 2021/11/4 12 | typealias MastodonLocalCode = [String: String] 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Circles/plus.circle.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "plus.circle.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Connectivity/photo.fill.split.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Frame 2.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Human/eye.circle.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "eye.circle.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/bookmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bookmark-regular.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Dismiss.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/chat.warning.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "chat.warning.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/reorder.dot.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "reorder.dot.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/API/Mastodon+API+Disputes.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | extension Mastodon.API { 6 | public static func disputesEndpoint(domain: String, strikeId: String) -> URL { 7 | return Mastodon.API.webURL(domain: domain).appendingPathComponent("disputes/strikes/\(strikeId)") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /NotificationService/NotificationService.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.org.joinmastodon.app 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ShareActionExtension/ShareActionExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.org.joinmastodon.app 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | # build with SwiftPM: 6 | # https://developer.apple.com/documentation/swift_packages/building_swift_packages_or_apps_that_use_them_in_continuous_integration_workflows 7 | 8 | xcodebuild \ 9 | -scheme Mastodon \ 10 | -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)" \ 11 | clean \ 12 | build | xcpretty 13 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/ObjectsAndTools/bookmark.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bookmark-solid.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Arrow Clockwise.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /OpenInActionExtension/OpenInActionExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.org.joinmastodon.app 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Human/eye.slash.circle.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "eye.slash.circle.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/chat.warning.fill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "chat.warning.fill.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WidgetExtension/WidgetExtensionBundle.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import WidgetKit 4 | import SwiftUI 5 | 6 | @main 7 | struct WidgetExtensionBundle: WidgetBundle { 8 | var body: some Widget { 9 | FollowersCountWidget() 10 | MultiFollowersCountWidget() 11 | LatestFollowersWidget() 12 | HashtagWidget() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Mastodon/Diffable/Onboarding/RegisterItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RegisterItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-5. 6 | // 7 | 8 | import Foundation 9 | 10 | enum RegisterItem: Hashable { 11 | case header(domain: String) 12 | case avatar 13 | case name 14 | case username 15 | case email 16 | case password 17 | case hint 18 | case reason 19 | } 20 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Template/AutoGenerateRelationship.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoGenerateRelationship.swift 3 | // AutoGenerateRelationship 4 | // 5 | // Created by Cirno MainasuK on 2021-8-19. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // Stencil protocol 12 | protocol AutoGenerateRelationship { } 13 | 14 | // - autoGenerateRelationship 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/questionmark.circle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "questionmark.circle.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Compose/AutoCompleteSection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoCompleteSection.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-5-17. 6 | // 7 | 8 | import UIKit 9 | import MastodonSDK 10 | import MastodonMeta 11 | import MastodonAsset 12 | import MastodonLocalization 13 | 14 | public enum AutoCompleteSection: Equatable, Hashable { 15 | case main 16 | } 17 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Extension/UIScreen.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreen.swift 3 | // 4 | // 5 | // Created by Jed Fox on 2022-12-15. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIScreen { 11 | public var pixelSize: CGFloat { 12 | if scale > 0 { 13 | return 1 / scale 14 | } 15 | // should never happen but just in case 16 | return 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Compose/ComposeStatusAttachmentItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ComposeStatusAttachmentItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-6-29. 6 | // 7 | 8 | import Foundation 9 | 10 | enum ComposeStatusAttachmentItem { 11 | case attachment(attachmentService: MastodonAttachmentService) 12 | } 13 | 14 | extension ComposeStatusAttachmentItem: Hashable { } 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Entity/Transient/Feed+Kind.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Feed+Kind.swift 3 | // CoreDataStack 4 | // 5 | // Created by MainasuK on 2022-1-11. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Feed { 11 | public enum Kind: String, CaseIterable, Hashable { 12 | case none 13 | case home 14 | case notificationAll 15 | case notificationMentions 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Service/PublisherService/StatusPublishResult.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusPublishResult.swift 3 | // 4 | // 5 | // Created by MainasuK on 2021-11-26. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | public enum StatusPublishResult { 12 | case post(Mastodon.Response.Content) 13 | case edit(Mastodon.Response.Content) 14 | } 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/Preference/Preference+Wizard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WizardPreference.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-9-15. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UserDefaults { 11 | @objc public dynamic var didShowMultipleAccountSwitchWizard: Bool { 12 | get { return bool(forKey: #function) } 13 | set { self[#function] = newValue } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/NSKeyValueObservation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSKeyValueObservation.swift 3 | // Twidere 4 | // 5 | // Created by Cirno MainasuK on 2020-7-20. 6 | // Copyright © 2020 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension NSKeyValueObservation { 12 | public func store(in set: inout Set) { 13 | set.insert(self) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Mastodon/Protocol/Provider/DataSourceFacade.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataSourceFacade.swift 3 | // DataSourceFacade 4 | // 5 | // Created by Cirno MainasuK on 2021-8-30. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum DataSourceFacade { 12 | enum StatusTarget { 13 | case status // remove reblog wrapper 14 | case reblog // keep reblog wrapper 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/InstanceConfigLimitingPropertyContaining.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | public protocol InstanceConfigLimitingPropertyContaining { 4 | var statuses: Mastodon.Entity.Instance.Configuration.Statuses? { get } 5 | var mediaAttachments: Mastodon.Entity.Instance.Configuration.MediaAttachments? { get } 6 | var polls: Mastodon.Entity.Instance.Configuration.Polls? { get } 7 | } 8 | -------------------------------------------------------------------------------- /Mastodon/Diffable/User/UserItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserItem.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-11-1. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | import CoreDataStack 11 | import MastodonSDK 12 | 13 | enum UserItem: Hashable { 14 | case account(account: Mastodon.Entity.Account, relationship: Mastodon.Entity.Relationship?) 15 | case bottomLoader 16 | case bottomHeader(text: String) 17 | } 18 | -------------------------------------------------------------------------------- /Mastodon/Extension/UIView+Remove.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Remove.swift 3 | // Mastodon 4 | // 5 | // Created by xiaojian sun on 2021/4/16. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | extension UIView { 12 | func removeFromStackView() { 13 | if let stackView = self.superview as? UIStackView { 14 | stackView.removeArrangedSubview(self) 15 | } 16 | self.removeFromSuperview() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Mastodon/Scene/Discovery/DiscoveryItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-4-13. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | enum DiscoveryItem: Hashable { 12 | case hashtag(Mastodon.Entity.Tag) 13 | case link(Mastodon.Entity.Link) 14 | case account(Mastodon.Entity.Account, relationship: Mastodon.Entity.Relationship?) 15 | case bottomLoader 16 | } 17 | -------------------------------------------------------------------------------- /WidgetExtension/View+WidgetBackground.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | import SwiftUI 4 | 5 | extension View { 6 | func emptyWidgetBackground() -> some View { 7 | widgetBackground(EmptyView()) 8 | } 9 | 10 | func widgetBackground(_ backgroundView: some View) -> some View { 11 | return containerBackground(for: .widget) { 12 | backgroundView 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Protocol/StatusCompatible.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | import CoreDataStack 5 | import MastodonSDK 6 | 7 | public protocol StatusCompatible { 8 | var reblog: Status? { get } 9 | var attachments: [MastodonAttachment] { get } 10 | var isMediaSensitive: Bool { get } 11 | var isSensitiveToggled: Bool { get } 12 | } 13 | 14 | extension Status: StatusCompatible {} 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/Preference/Preference+Discovery.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Preference+Discovery.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-4-19. 6 | // 7 | 8 | import Foundation 9 | 10 | extension UserDefaults { 11 | 12 | @objc public dynamic var discoveryIntroBannerNeedsHidden: Bool { 13 | get { 14 | return bool(forKey: #function) 15 | } 16 | set { self[#function] = newValue } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Mastodon/Vender/HandleTapAction.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HandleTapAction.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-9-28. 6 | // 7 | 8 | import Foundation 9 | 10 | @objc class HandleTapAction: NSObject { 11 | @objc static let statusBarTappedNotification = Notification(name: .statusBarTapped) 12 | } 13 | 14 | extension Notification.Name { 15 | static let statusBarTapped = Notification.Name(rawValue: "org.joinmastodon.app.statusBarTapped") 16 | } 17 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/Preference/Preference+Language.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | extension UserDefaults { 6 | 7 | @objc public dynamic var defaultPostLanguage: String { 8 | get { 9 | return object(forKey: #function) as? String ?? Locale.current.language.languageCode?.identifier ?? "en" 10 | } 11 | set { self[#function] = newValue } 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+DefaultServer.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | extension Mastodon.Entity { 6 | public struct DefaultServer: Codable { 7 | public let domain: String 8 | public let weight: Int 9 | 10 | public init(domain: String, weight: Int) { 11 | self.domain = domain 12 | self.weight = weight 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity.swift 3 | // 4 | // 5 | // Created by xiaojian sun on 2021/1/25. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity { 11 | public enum V2 { } 12 | } 13 | 14 | // MARK: - Entity Document Template 15 | /// Entity Name 16 | /// 17 | /// - Since: 0.1.0 18 | /// - Version: x.x.x 19 | /// # Last Update 20 | /// yyyy/MM/dd 21 | /// # Reference 22 | /// [Title](link) 23 | 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/danger.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.353", 9 | "green" : "0.251", 10 | "red" : "0.875" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/goldenrod.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x28", 9 | "green" : "0xB9", 10 | "red" : "0xF9" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Brand/Eggplant.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x3B", 9 | "green" : "0x06", 10 | "red" : "0x17" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Icon/plus.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.349", 9 | "green" : "0.780", 10 | "red" : "0.098" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Poll/disabled.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.784", 9 | "green" : "0.682", 10 | "red" : "0.608" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/alert.yellow.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.016", 9 | "green" : "0.561", 10 | "red" : "0.792" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/danger.border.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.259", 9 | "green" : "0.180", 10 | "red" : "0.639" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/success.green.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.604", 9 | "green" : "0.741", 10 | "red" : "0.475" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/system.orange.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.039", 9 | "green" : "0.624", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WidgetExtension/Assets.xcassets/BrandIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Logo.svg", 5 | "idiom" : "universal" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "filename" : "Logo 1.svg", 15 | "idiom" : "universal" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Brand/Dark Blurple.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x7A", 9 | "green" : "0x0C", 10 | "red" : "0x2F" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Brand/Light Blurple.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFA", 9 | "green" : "0x8A", 10 | "red" : "0x85" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Button/userBlocked.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x30", 9 | "green" : "0x3B", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Button/userFollow.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.800", 9 | "green" : "0.227", 10 | "red" : "0.337" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/TextField/invalid.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x30", 9 | "green" : "0x3B", 10 | "red" : "0xFF" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/TextField/valid.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.349", 9 | "green" : "0.780", 10 | "red" : "0.204" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/badge.background.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.188", 9 | "green" : "0.231", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/battleshipGrey.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "0.200", 8 | "blue" : "0.502", 9 | "green" : "0.471", 10 | "red" : "0.471" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Report/report.banner.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x55", 9 | "green" : "0x98", 10 | "red" : "0x03" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Notification/favourite.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.000", 9 | "green" : "0.800", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/media.type.indicotor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "0.600", 8 | "blue" : "0.000", 9 | "green" : "0.000", 10 | "red" : "0.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/Preference/Preference+App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppPreference.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-7-8. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UserDefaults { 11 | 12 | @objc public dynamic var preferredUsingDefaultBrowser: Bool { 13 | get { 14 | register(defaults: [#function: false]) 15 | return bool(forKey: #function) 16 | } 17 | set { self[#function] = newValue } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/Banner/username.gray.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "0.600", 8 | "blue" : "0.961", 9 | "green" : "0.922", 10 | "red" : "0.922" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Colors/Donations/Secondary/on.container.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xCF", 10 | "red" : "0xD6" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Settings/about_instance_placeholder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "about_instance_placeholder@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Mastodon/Protocol/Provider/DataSourceProvider+NotificationTableViewCellDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataSourceProvider+NotificationTableViewCellDelegate.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-26. 6 | // 7 | 8 | import UIKit 9 | import MetaTextKit 10 | import CoreDataStack 11 | import MastodonCore 12 | import MastodonUI 13 | import MastodonSDK 14 | 15 | 16 | private struct NotificationMediaTransitionContext { 17 | let status: MastodonStatus 18 | let needsToggleMediaSensitive: Bool 19 | } 20 | 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/background.cyan.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.910", 9 | "green" : "0.812", 10 | "red" : "0.235" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/background.green.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.416", 9 | "green" : "0.557", 10 | "red" : "0.278" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/Banner/name.edit.background.gray.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "0.360", 8 | "blue" : "0.502", 9 | "green" : "0.471", 10 | "red" : "0.471" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/MastodonSDK/Mastodon+Entity+Link.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+Link.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-4-13. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | extension Mastodon.Entity.Link { 12 | 13 | /// the sum of recent 2 days 14 | public var talkingPeopleCount: Int? { 15 | return history 16 | .prefix(2) 17 | .compactMap { Int($0.accounts) } 18 | .reduce(0, +) 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/MastodonSDK/Mastodon+Entity+Tag.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+Tag.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-4-13. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | 11 | extension Mastodon.Entity.Tag { 12 | 13 | /// the sum of recent 2 days 14 | public var talkingPeopleCount: Int? { 15 | return history? 16 | .prefix(2) 17 | .compactMap { Int($0.accounts) } 18 | .reduce(0, +) 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/CoreDataStack/Subscription.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Subscription.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-4-25. 6 | // 7 | 8 | import Foundation 9 | import CoreDataStack 10 | import MastodonSDK 11 | 12 | public typealias NotificationSubscription = Subscription 13 | 14 | extension Subscription { 15 | 16 | public var policy: Mastodon.API.Subscriptions.Policy? { 17 | return Mastodon.API.Subscriptions.Policy(rawValue: policyRaw) 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonExtension/UIEdgeInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIEdgeInsets.swift 3 | // 4 | // 5 | // Created by Jed Fox on 2022-11-24. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIEdgeInsets { 11 | public init(horizontal: CGFloat, vertical: CGFloat) { 12 | self.init(top: vertical, left: horizontal, bottom: vertical, right: horizontal) 13 | } 14 | public static func constant(_ offset: CGFloat) -> Self { 15 | UIEdgeInsets(top: offset, left: offset, bottom: offset, right: offset) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+StatusSource.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | extension Mastodon.Entity { 6 | public struct StatusSource: Codable { 7 | public let id: String 8 | public let text: String 9 | public let spoilerText: String 10 | 11 | enum CodingKeys: String, CodingKey { 12 | case id 13 | case text 14 | case spoilerText = "spoiler_text" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Extension/UIView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-4-13. 6 | // 7 | 8 | import UIKit 9 | import MastodonCore 10 | 11 | extension UIView { 12 | public static var separatorLine: UIView { 13 | let line = UIView() 14 | line.backgroundColor = .separator 15 | return line 16 | } 17 | 18 | public static func separatorLineHeight(of view: UIView) -> CGFloat { 19 | return 1.0 / view.traitCollection.displayScale 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /swiftgen.yml: -------------------------------------------------------------------------------- 1 | xcassets: 2 | inputs: MastodonSDK/Sources/MastodonAsset/Assets.xcassets 3 | outputs: 4 | templateName: swift5 5 | output: MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift 6 | params: 7 | bundle: Bundle.module 8 | publicAccess: true 9 | fonts: 10 | inputs: MastodonSDK/Sources/MastodonAsset/Font 11 | outputs: 12 | templateName: swift5 13 | output: MastodonSDK/Sources/MastodonAsset/Generated/Fonts.swift 14 | params: 15 | bundle: Bundle.module 16 | publicAccess: true 17 | -------------------------------------------------------------------------------- /Mastodon/Scene/Settings/Server Details/Table View Components/AboutInstance.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | import MastodonSDK 5 | import MastodonLocalization 6 | 7 | enum AboutInstanceSection: Int, Hashable { 8 | case main = 0 9 | 10 | var title: String { 11 | return L10n.Scene.Settings.ServerDetails.AboutInstance.title 12 | } 13 | } 14 | 15 | enum AboutInstanceItem: Hashable { 16 | case adminAccount(Mastodon.Entity.Account) 17 | case contactAdmin(String) 18 | } 19 | -------------------------------------------------------------------------------- /Mastodon/Scene/Share/ContextMenu/ImagePreview/TimelineTableViewCellContextMenuConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimelineTableViewCellContextMenuConfiguration.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-4-30. 6 | // 7 | 8 | import UIKit 9 | 10 | // note: use subclass configuration not custom NSCopying identifier due to identifier cause crash issue 11 | final class TimelineTableViewCellContextMenuConfiguration: UIContextMenuConfiguration { 12 | 13 | var indexPath: IndexPath? 14 | var index: Int? 15 | 16 | } 17 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Service/PublisherService/StatusPublisher.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatusPublisher.swift 3 | // 4 | // 5 | // Created by MainasuK on 2021-11-26. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | 11 | @MainActor 12 | public protocol StatusPublisher: ProgressReporting { 13 | var state: Published.Publisher { get } 14 | var reactor: StatusPublisherReactor? { get set } 15 | func publish(api: APIService, authenticationBox: MastodonAuthenticationBox) async throws -> StatusPublishResult 16 | } 17 | -------------------------------------------------------------------------------- /Mastodon/Extension/UIBarButtonItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021/2/3. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIBarButtonItem { 11 | 12 | static var activityIndicatorBarButtonItem: UIBarButtonItem { 13 | let activityIndicatorView = UIActivityIndicatorView(style: .medium) 14 | let barButtonItem = UIBarButtonItem(customView: activityIndicatorView) 15 | activityIndicatorView.startAnimating() 16 | return barButtonItem 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Asset/friends.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "friends 3.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "friends 2.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "friends 1.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/CoreDataStack/MastodonMention.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonMention.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-17. 6 | // 7 | 8 | import Foundation 9 | import CoreDataStack 10 | import MastodonSDK 11 | 12 | extension MastodonMention { 13 | public convenience init(mention: Mastodon.Entity.Mention) { 14 | self.init( 15 | id: mention.id, 16 | username: mention.username, 17 | acct: mention.acct, 18 | url: mention.url 19 | ) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WidgetExtension/ar.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/ca.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/cs.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/de.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/en.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/es.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/eu.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/fi.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/fr.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/gd.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/gl.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/it.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/ja.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/ku.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/nl.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/ru.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/sl.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/sv.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/th.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/tr.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/vi.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url("git@github.com:mastodon/mastodon-ios-match.git") 2 | storage_mode("git") 3 | git_branch("main") 4 | type("appstore") # The default type, can be: appstore, adhoc, enterprise or development 5 | 6 | app_identifier([ 7 | "org.joinmastodon.app", 8 | "org.joinmastodon.app.MastodonIntent", 9 | "org.joinmastodon.app.NotificationService", 10 | "org.joinmastodon.app.ShareActionExtension", 11 | "org.joinmastodon.app.OpenInActionExtension", 12 | "org.joinmastodon.app.WidgetExtension" 13 | ]) 14 | # username("fastlane@joinmastodon.org") 15 | -------------------------------------------------------------------------------- /Mastodon/Scene/Root/Sidebar/SecondaryPlaceholderViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondaryPlaceholderViewController.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-9-29. 6 | // 7 | 8 | import UIKit 9 | import Combine 10 | import MastodonCore 11 | 12 | final class SecondaryPlaceholderViewController: UIViewController { 13 | var disposeBag = Set() 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | view.backgroundColor = .secondarySystemBackground 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Profile/About/verified_checkmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkmark.seal.svg", 5 | "idiom" : "universal" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "filename" : "checkmark.seal.fill.svg", 15 | "idiom" : "universal" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/PlaintextMetaContent.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlaintextMetaContent.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-1-10. 6 | // 7 | 8 | import Foundation 9 | import Meta 10 | 11 | public struct PlaintextMetaContent: MetaContent { 12 | public let string: String 13 | public let entities: [Meta.Entity] = [] 14 | 15 | public init(string: String) { 16 | self.string = string 17 | } 18 | 19 | public func metaAttachment(for entity: Meta.Entity) -> MetaAttachment? { 20 | return nil 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Model/Poll/PollItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PollItem.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-1-12. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | import CoreDataStack 11 | import MastodonSDK 12 | 13 | public enum PollItem: Hashable { 14 | @available(*, deprecated, message: "migrate to pollOption wrapping a Mastodon.Entity.Poll.Option") 15 | case option(record: MastodonPollOption) 16 | case pollOption(Mastodon.Entity.Poll.Option) 17 | case history(option: Mastodon.Entity.StatusEdit.Poll.Option) 18 | } 19 | -------------------------------------------------------------------------------- /WidgetExtension/ckb.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/es-AR.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/kab.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/zh-Hans.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /WidgetExtension/zh-Hant.lproj/WidgetExtension.strings: -------------------------------------------------------------------------------- 1 | "3d6HSO" = "Enter username"; 2 | 3 | "7DZrRA" = "Username"; 4 | 5 | "82L4Nj" = "Yes"; 6 | 7 | "BFppgH" = "Username"; 8 | 9 | "OL6lkx" = "Account"; 10 | 11 | "ZLZ6sg" = "Latest Followers"; 12 | 13 | "e0W2wo" = "Multi Followers Count"; 14 | 15 | "fovmPX" = "Accounts"; 16 | 17 | "gpCwrM" = "Followers Count"; 18 | 19 | "jg9D5P" = "No"; 20 | 21 | "sOLUtG" = "Enter follower Username"; 22 | 23 | "tVvJ9c" = "Followers"; 24 | 25 | "xVtyec" = "Show chart"; 26 | 27 | "zeJo4f" = "Should the Widget show a chart?"; 28 | 29 | -------------------------------------------------------------------------------- /Mastodon/Extension/Double.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Double.swift 3 | // Mastodon 4 | // 5 | // Created by sxiaojian on 2021/3/8. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Double { 11 | func asString(style: DateComponentsFormatter.UnitsStyle) -> String { 12 | let formatter = DateComponentsFormatter() 13 | formatter.allowedUnits = [.minute, .second] 14 | formatter.unitsStyle = style 15 | formatter.zeroFormattingBehavior = .pad 16 | guard let formattedString = formatter.string(from: self) else { return "" } 17 | return formattedString 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Mastodon/Scene/Settings/General Settings/GeneralSettingsDiffableTableViewDataSource.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import UIKit 4 | 5 | class GeneralSettingsDiffableTableViewDataSource: UITableViewDiffableDataSource { 6 | override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { 7 | guard let settingsSection = sectionIdentifier(for: section) else { return nil } 8 | 9 | return settingsSection.type.sectionTitle.uppercased() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonExtension/NSManagedObjectContext.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSManagedObjectContext.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-3-11. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | 11 | extension NSManagedObjectContext { 12 | public func safeFetch(_ request: NSFetchRequest) -> [T] where T : NSFetchRequestResult { 13 | do { 14 | return try fetch(request) 15 | } catch { 16 | assertionFailure(error.localizedDescription) 17 | return [] 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Onboarding/avatar.placeholder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Frame 82.jpg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Frame 82@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Frame 82@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Mastodon/Preference/KeyboardPreference.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyboardPreference.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-5-20. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UserDefaults { 11 | 12 | @objc dynamic var backKeyCommandPressDate: Date? { 13 | get { 14 | register(defaults: [#function: Date().timeIntervalSinceReferenceDate]) 15 | return Date(timeIntervalSinceReferenceDate: double(forKey: #function)) 16 | } 17 | set { self[#function] = newValue?.timeIntervalSinceReferenceDate } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Template/Stencil/AutoUpdatableObject.stencil: -------------------------------------------------------------------------------- 1 | {% for type in types.implementing.AutoUpdatableObject %} 2 | // sourcery:inline:{{type.name}}.AutoUpdatableObject 3 | 4 | // Generated using Sourcery 5 | // DO NOT EDIT 6 | {% for variable in type.variables|instance where 7 | variable|annotated:"autoUpdatableObject" 8 | %} 9 | public func update({{variable.name}}: {{variable.typeName}}) { 10 | if self.{{variable.name}} != {{variable.name}} { 11 | self.{{variable.name}} = {{variable.name}} 12 | } 13 | } 14 | {% endfor %} 15 | // sourcery:end 16 | {% endfor %} 17 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/CoreDataStack/MastodonField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonField.swift 3 | // TwidereX 4 | // 5 | // Created by Cirno MainasuK on 2021-9-18. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreDataStack 11 | import MastodonSDK 12 | 13 | extension MastodonField { 14 | public convenience init(field: Mastodon.Entity.Field) { 15 | self.init( 16 | name: field.name, 17 | value: field.value, 18 | verifiedAt: field.verifiedAt 19 | ) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+Suggestion.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+Suggestion.swift 3 | // 4 | // 5 | // Created by sxiaojian on 2021/4/20. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity.V2 { 11 | 12 | public struct SuggestionAccount: Codable, Sendable, Hashable { 13 | 14 | public let source: String 15 | public let account: Mastodon.Entity.Account 16 | 17 | 18 | enum CodingKeys: String, CodingKey { 19 | case source 20 | case account 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Persistence/FileManager+Shared.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | import MastodonCommon 5 | 6 | public extension FileManager { 7 | var documentsDirectory: URL? { 8 | urls(for: .documentDirectory, in: .userDomainMask).first 9 | } 10 | 11 | var cachesDirectory: URL? { 12 | urls(for: .cachesDirectory, in: .userDomainMask).first 13 | } 14 | 15 | var sharedDirectory: URL? { 16 | containerURL(forSecurityApplicationGroupIdentifier: AppName.groupID) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Mastodon/Scene/Settings/Beta Testing Settings/BetaTestSettingsDiffableTableViewDataSource.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2025 Mastodon gGmbH. All rights reserved. 2 | 3 | import UIKit 4 | 5 | class BetaTestSettingsDiffableTableViewDataSource: UITableViewDiffableDataSource { 6 | override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { 7 | guard let settingsSectionType = sectionIdentifier(for: section) else { return nil } 8 | 9 | return settingsSectionType.sectionTitle.uppercased() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/UserDefaults+Authentication.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | public extension UserDefaults { 6 | 7 | enum Keys { 8 | static let didMigrateAuthenticationsKey = "didMigrateAuthentications" 9 | } 10 | 11 | @objc dynamic var didMigrateAuthentications: Bool { 12 | get { 13 | return bool(forKey: Keys.didMigrateAuthenticationsKey) 14 | } 15 | 16 | set { 17 | set(newValue, forKey: Keys.didMigrateAuthenticationsKey) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Vendor/VisualEffectView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VisualEffectView.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022/11/8. 6 | // 7 | 8 | import SwiftUI 9 | 10 | // ref: https://stackoverflow.com/a/59111492/3797903 11 | public struct VisualEffectView: UIViewRepresentable { 12 | public var effect: UIVisualEffect? 13 | public func makeUIView(context: UIViewRepresentableContext) -> UIVisualEffectView { UIVisualEffectView() } 14 | public func updateUIView(_ uiView: UIVisualEffectView, context: UIViewRepresentableContext) { uiView.effect = effect } 15 | } 16 | -------------------------------------------------------------------------------- /Mastodon/Scene/Onboarding/Login/ContentSizedTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonLoginTableView.swift 3 | // Mastodon 4 | // 5 | // Created by Nathan Mattes on 13.11.22. 6 | // 7 | 8 | import UIKit 9 | 10 | // Source: https://stackoverflow.com/a/48623673 11 | final class ContentSizedTableView: UITableView { 12 | override var contentSize:CGSize { 13 | didSet { 14 | invalidateIntrinsicContentSize() 15 | } 16 | } 17 | 18 | override var intrinsicContentSize: CGSize { 19 | layoutIfNeeded() 20 | return CGSize(width: UIView.noIntrinsicMetric, height: contentSize.height) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Mastodon/Scene/Transition/MediaPreview/MediaPreviewTransitionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MediaPreviewTransitionViewController.swift 3 | // TwidereX 4 | // 5 | // Created by MainasuK on 2021-12-8. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol MediaPreviewTransitionViewController: UIViewController { 12 | var mediaPreviewTransitionContext: MediaPreviewTransitionContext? { get } 13 | } 14 | 15 | 16 | struct MediaPreviewTransitionContext { 17 | let transitionView: UIView 18 | let snapshot: UIView 19 | let snapshotTransitioning: UIView 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Extension/View.swift: -------------------------------------------------------------------------------- 1 | // 2 | // View.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022/11/8. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension View { 11 | public func badgeView(_ content: Content) -> some View where Content: View { 12 | overlay( 13 | ZStack { 14 | content 15 | } 16 | .alignmentGuide(.top) { $0.height / 2 } 17 | .alignmentGuide(.trailing) { $0.width / 2 } 18 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing) 19 | ) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Mastodon/Scene/Notification/Notification Filtering/Requests/NotificationRequestsViewModel.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | import MastodonSDK 5 | import MastodonCore 6 | 7 | struct NotificationRequestsViewModel { 8 | let authenticationBox: MastodonAuthenticationBox 9 | 10 | var requests: [Mastodon.Entity.NotificationRequest] 11 | 12 | init(authenticationBox: MastodonAuthenticationBox, requests: [Mastodon.Entity.NotificationRequest]) { 13 | self.authenticationBox = authenticationBox 14 | self.requests = requests 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.extend.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "cloud.base.extend.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "cloud.base.extend@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "cloud.base.extend@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Tests/MastodonSDKTests/MastodonSDKTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Combine 3 | @testable import MastodonSDK 4 | 5 | final class MastodonSDKTests: XCTestCase { 6 | 7 | var disposeBag = Set() 8 | 9 | let session = URLSession(configuration: .ephemeral) 10 | var domain: String { MastodonSDKTests.environmentVariable(key: "domain") } 11 | 12 | // TODO: replace with test account token 13 | var testToken = "" 14 | 15 | static func environmentVariable(key: String) -> String { 16 | return ProcessInfo.processInfo.environment[key]! 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Mastodon/Protocol/Provider/DataSourceFacade+Status+History.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | import MastodonCore 5 | import MastodonSDK 6 | import CoreDataStack 7 | 8 | extension DataSourceFacade { 9 | public static func getEditHistory( 10 | forStatus status: Status, 11 | provider: AuthContextProvider 12 | ) async throws -> [Mastodon.Entity.StatusEdit] { 13 | let reponse = try await APIService.shared.getHistory(forStatusID: status.id, authenticationBox: provider.authenticationBox) 14 | 15 | return reponse.value 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Mastodon/Extension/UITableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-7-5. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UITableViewCell { 11 | 12 | /// The color of the cell when it is selected. 13 | @objc dynamic var selectionColor: UIColor? { 14 | get { return selectedBackgroundView?.backgroundColor } 15 | set { 16 | guard selectionStyle != .none else { return } 17 | let view = UIView() 18 | view.backgroundColor = newValue 19 | selectedBackgroundView = view 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Human/face.smiling.adaptive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "emojiIconLight.pdf", 5 | "idiom" : "universal" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "filename" : "emojiIconDark.pdf", 15 | "idiom" : "universal" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | }, 22 | "properties" : { 23 | "preserves-vector-representation" : true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/cloud.base.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Untitled-1_0007_Group-6 1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Untitled-1_0007_Group-6 1@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Untitled-1_0007_Group-6 1@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+Context.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+Context.swift 3 | // 4 | // 5 | // Created by MainasuK Cirno on 2021/1/28. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity { 11 | /// Context 12 | /// 13 | /// - Since: 0.6.0 14 | /// - Version: 3.3.0 15 | /// # Last Update 16 | /// 2021/1/28 17 | /// # Reference 18 | /// [Document](https://docs.joinmastodon.org/entities/context/) 19 | public struct Context: Codable, Sendable { 20 | public let ancestors: [Status] 21 | public let descendants: [Status] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Mastodon/Protocol/Provider/DataSourceFacade+Model.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataSourceFacade+Model.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK on 2022-1-13. 6 | // 7 | 8 | import Foundation 9 | import CoreData 10 | import CoreDataStack 11 | import MastodonUI 12 | import MastodonSDK 13 | 14 | extension DataSourceFacade { 15 | static func status( 16 | status: MastodonStatus, 17 | target: StatusTarget 18 | ) -> MastodonStatus { 19 | switch target { 20 | case .status: 21 | return status.reblog ?? status 22 | case .reblog: 23 | return status 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.on.airplane.with.contrail.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "untitled10006Group21.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "untitled10006Group21@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "untitled10006Group21@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Entity/Transient/MastodonTagHistory.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonTagHistory.swift 3 | // CoreDataStack 4 | // 5 | // Created by MainasuK on 2022-1-20. 6 | // 7 | 8 | import Foundation 9 | 10 | public final class MastodonTagHistory: NSObject, Codable { 11 | 12 | /// UNIX timestamp on midnight of the given day 13 | public let day: Date 14 | public let uses: String 15 | public let accounts: String 16 | 17 | public init(day: Date, uses: String, accounts: String) { 18 | self.day = day 19 | self.uses = uses 20 | self.accounts = accounts 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Untitled-1_0003_Group-1 1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Untitled-1_0003_Group-1 1@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Untitled-1_0003_Group-1 1@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.three.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "untitled10005Group101.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "untitled10005Group101@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "untitled10005Group101@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.with.tree.two.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "untitled10004Group111.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "untitled10004Group111@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "untitled10004Group111@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+ExtendedDescription.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Foundation 4 | 5 | extension Mastodon.Entity { 6 | /// Extended description of the server 7 | 8 | /// ## Reference: 9 | /// [Document](https://docs.joinmastodon.org/entities/ExtendedDescription/) 10 | public struct ExtendedDescription: Codable { 11 | public let updatedAt: Date? 12 | public let content: String 13 | 14 | enum CodingKeys: String, CodingKey { 15 | case updatedAt = "updated_at" 16 | case content 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Mastodon/Extension/UIFont.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont.swift 3 | // Mastodon 4 | // 5 | // Created by BradGao on 2021/2/20. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIFont { 11 | private func withTraits(traits: UIFontDescriptor.SymbolicTraits) -> UIFont { 12 | let descriptor = fontDescriptor.withSymbolicTraits(traits) 13 | return UIFont(descriptor: descriptor!, size: 0) //size 0 means keep the size as it is 14 | } 15 | 16 | func bold() -> UIFont { 17 | return withTraits(traits: .traitBold) 18 | } 19 | 20 | func italic() -> UIFont { 21 | return withTraits(traits: .traitItalic) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Extension/MastodonSDK/Mastodon+Entity+Account.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+Account.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-5-16. 6 | // 7 | 8 | import Foundation 9 | import MastodonSDK 10 | import MastodonMeta 11 | 12 | extension Mastodon.Entity.Account { 13 | public var emojiMeta: MastodonContent.Emojis { 14 | let isAnimated = !UserDefaults.shared.preferredStaticEmoji 15 | 16 | var dict = MastodonContent.Emojis() 17 | for emoji in emojis { 18 | dict[emoji.shortcode] = isAnimated ? emoji.url : emoji.staticURL 19 | } 20 | return dict 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+FamiliarFollowers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+FamiliarFollowers.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-5-16. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity { 11 | 12 | /// FamiliarFollowers 13 | /// 14 | /// - Since: 3.5.2 15 | /// - Version: 3.5.2 16 | /// # Last Update 17 | /// 2022/5/16 18 | /// # Reference 19 | /// [Document](TBD) 20 | public class FamiliarFollowers: Codable, Sendable { 21 | public let id: Mastodon.Entity.Account.ID 22 | public let accounts: [Mastodon.Entity.Account] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Extension/UIColor+Extensions.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import UIKit 4 | 5 | extension UIColor { 6 | public var hexValue: String { 7 | let components = cgColor.components 8 | 9 | let red: CGFloat = components?[0] ?? 0.0 10 | let green: CGFloat = components?[1] ?? 0.0 11 | let blue: CGFloat = components?[2] ?? 0.0 12 | 13 | return String( 14 | format: "#%02lX%02lX%02lX", 15 | lroundf(Float(red * 255)), 16 | lroundf(Float(green * 255)), 17 | lroundf(Float(blue * 255)) 18 | ) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/View/Button/RoundedEdgesButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RoundedEdgesButton.swift 3 | // MastodonUI 4 | // 5 | // Created by MainasuK Cirno on 2021-3-12. 6 | // 7 | 8 | import UIKit 9 | 10 | open class RoundedEdgesButton: UIButton { 11 | 12 | public var cornerRadius: CGFloat = .zero { 13 | didSet { 14 | setNeedsDisplay() 15 | } 16 | } 17 | 18 | open override func layoutSubviews() { 19 | super.layoutSubviews() 20 | 21 | layer.masksToBounds = true 22 | layer.cornerRadius = cornerRadius > .zero ? cornerRadius : bounds.height * 0.5 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Mastodon/Mastodon.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.associated-domains 8 | 9 | applinks:mastodon.social 10 | applinks:mastodon.online 11 | 12 | com.apple.developer.siri 13 | 14 | com.apple.security.application-groups 15 | 16 | group.org.joinmastodon.app 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Extension/AXCustomContent.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2023 Mastodon gGmbH. All rights reserved. 2 | 3 | import Accessibility 4 | 5 | extension AXCustomContent { 6 | convenience init?(label: String, value: String?) { 7 | if let value, !value.isEmpty { 8 | self.init(label: label, value: value) 9 | } else { 10 | return nil 11 | } 12 | } 13 | 14 | convenience init?(label: String, value: (some BinaryInteger)?) { 15 | if let value { 16 | self.init(label: label, value: value.formatted()) 17 | } else { 18 | return nil 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Welcome/illustration/elephant.three.on.grass.extend.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "elephant.three.on.grass.extend.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "elephant.three.on.grass.extend@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "elephant.three.on.grass.extend@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Entity/Transient/MastodonField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonField.swift 3 | // CoreDataStack 4 | // 5 | // Created by Cirno MainasuK on 2021-9-18. 6 | // Copyright © 2021 Twidere. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public final class MastodonField: NSObject, Codable { 12 | public let name: String 13 | public let value: String 14 | public let verifiedAt: Date? 15 | 16 | public init( 17 | name: String, 18 | value: String, 19 | verifiedAt: Date? 20 | ) { 21 | self.name = name 22 | self.value = value 23 | self.verifiedAt = verifiedAt 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/CoreDataStack/Entity/Transient/MastodonFollowRequestState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MastodonFollowRequestState.swift 3 | // 4 | // 5 | // Created by MainasuK on 2022-6-29. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public final class MastodonFollowRequestState: NSObject, Codable { 11 | public let state: State 12 | 13 | public init( 14 | state: State 15 | ) { 16 | self.state = state 17 | } 18 | } 19 | 20 | extension MastodonFollowRequestState { 21 | public enum State: String, Codable { 22 | case none 23 | case isAccepting 24 | case isAccept 25 | case isRejecting 26 | case isReject 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Mastodon/Protocol/ScrollViewContainer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScrollViewContainer.swift 3 | // Mastodon 4 | // 5 | // Created by sxiaojian on 2021/2/7. 6 | // 7 | 8 | import UIKit 9 | 10 | protocol ScrollViewContainer: UIViewController { 11 | var scrollView: UIScrollView { get } 12 | func scrollToTop(animated: Bool) 13 | } 14 | 15 | extension ScrollViewContainer { 16 | func scrollToTop(animated: Bool) { 17 | scrollView.scrollToTop(animated: animated) 18 | } 19 | } 20 | 21 | extension UIScrollView { 22 | func scrollToTop(animated: Bool) { 23 | scrollRectToVisible(CGRect(origin: .zero, size: CGSize(width: 1, height: 1)), animated: animated) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Mastodon/Scene/Share/ContextMenu/ImagePreview/ContextMenuImagePreviewViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContextMenuImagePreviewViewModel.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-4-30. 6 | // 7 | 8 | import UIKit 9 | 10 | final class ContextMenuImagePreviewViewModel { 11 | 12 | // input 13 | let assetURL: URL 14 | let thumbnail: UIImage? 15 | let aspectRatio: CGSize 16 | 17 | init( 18 | assetURL: URL, 19 | thumbnail: UIImage?, 20 | aspectRatio: CGSize 21 | ) { 22 | self.assetURL = assetURL 23 | self.aspectRatio = aspectRatio 24 | self.thumbnail = thumbnail 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Mastodon/Extension/AVPlayer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AVPlayer.swift 3 | // Mastodon 4 | // 5 | // Created by xiaojian sun on 2021/3/10. 6 | // 7 | 8 | import AVKit 9 | 10 | // MARK: - CustomDebugStringConvertible 11 | extension AVPlayer.TimeControlStatus: CustomDebugStringConvertible { 12 | public var debugDescription: String { 13 | switch self { 14 | case .paused: return "paused" 15 | case .waitingToPlayAtSpecifiedRate: return "waitingToPlayAtSpecifiedRate" 16 | case .playing: return "playing" 17 | @unknown default: 18 | assertionFailure() 19 | return "" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Mastodon/Helper/URLActivityItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URLActivityItem.swift 3 | // Mastodon 4 | // 5 | // Created by Jed Fox on 2022-12-03. 6 | // 7 | 8 | import UIKit 9 | import LinkPresentation 10 | 11 | class URLActivityItem: NSObject, UIActivityItemSource { 12 | let url: URL 13 | 14 | init(url: URL) { 15 | self.url = url 16 | } 17 | 18 | func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any { 19 | return url 20 | } 21 | 22 | func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? { 23 | return url 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Mastodon/Scene/Settings/Privacy and Safety/CheckableButton.swift: -------------------------------------------------------------------------------- 1 | // Copyright © 2024 Mastodon gGmbH. All rights reserved. 2 | 3 | import SwiftUI 4 | import MastodonAsset 5 | 6 | struct CheckableButton: View { 7 | let text: String 8 | let isChecked: Bool 9 | let action: () -> Void 10 | 11 | var body: some View { 12 | Button(action: action) { 13 | HStack { 14 | Text(text) 15 | Spacer() 16 | if isChecked { 17 | Image(systemName: "checkmark") 18 | .foregroundStyle(Asset.Colors.Brand.blurple.swiftUIColor) 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCommon/Preference/Preference+StoreReview.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StoreReviewPreference.swift 3 | // Mastodon 4 | // 5 | // Created by Cirno MainasuK on 2021-11-3. 6 | // 7 | 8 | import Foundation 9 | 10 | extension UserDefaults { 11 | 12 | @objc public dynamic var processCompletedCount: Int { 13 | get { 14 | return integer(forKey: #function) 15 | } 16 | set { self[#function] = newValue } 17 | } 18 | 19 | @objc public dynamic var lastVersionPromptedForReview: String? { 20 | get { 21 | return string(forKey: #function) 22 | } 23 | set { self[#function] = newValue } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Service/API/APIService+Marker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // APIService+Marker.swift 3 | // MastodonSDK 4 | // 5 | // Created by Shannon Hughes on 2/24/25. 6 | // 7 | 8 | import MastodonSDK 9 | 10 | extension APIService { 11 | 12 | public func lastReadMarkers( 13 | authenticationBox: MastodonAuthenticationBox 14 | ) async throws -> Mastodon.Entity.Marker { 15 | let domain = authenticationBox.domain 16 | let authorization = authenticationBox.userAuthorization 17 | 18 | let response = try await Mastodon.API.Marker.lastReadMarkers(domain: domain, session: session, authorization: authorization) 19 | 20 | return response 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+Activity.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+Activity.swift 3 | // 4 | // 5 | // Created by MainasuK Cirno on 2021/1/28. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity { 11 | /// Activity 12 | /// 13 | /// - Since: 2.1.2 14 | /// - Version: 3.3.0 15 | /// # Last Update 16 | /// 2021/1/28 17 | /// # Reference 18 | /// [Document](https://docs.joinmastodon.org/entities/activity/) 19 | public struct Activity: Codable, Sendable { 20 | public let week: Date 21 | public let statuses: Int 22 | public let logins: Int 23 | public let registrations: Int 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Mastodon/Scene/Profile/Header/View/ProfileFieldCollectionViewHeaderFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileFieldCollectionViewHeaderFooterView.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-5-26. 6 | // 7 | 8 | import UIKit 9 | 10 | final class ProfileFieldCollectionViewHeaderFooterView: UICollectionReusableView { 11 | 12 | static let headerReuseIdentifer = "ProfileFieldCollectionViewHeaderFooterView.Header" 13 | static let footerReuseIdentifer = "ProfileFieldCollectionViewHeaderFooterView.Footer" 14 | 15 | override init(frame: CGRect) { 16 | super.init(frame: frame) 17 | } 18 | 19 | required init?(coder: NSCoder) { fatalError("Not implemented") } 20 | } 21 | -------------------------------------------------------------------------------- /Mastodon/Scene/Share/View/Control/RefreshControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RefreshControl.swift 3 | // Mastodon 4 | // 5 | // Created by Kyle Bashour on 11/14/22. 6 | // 7 | 8 | import UIKit 9 | 10 | /// RefreshControl subclass that properly displays itself behind table view contents. 11 | class RefreshControl: UIRefreshControl { 12 | override init() { 13 | super.init() 14 | } 15 | 16 | override init(frame: CGRect) { 17 | super.init(frame: frame) 18 | } 19 | 20 | required init?(coder: NSCoder) { 21 | super.init(coder: coder) 22 | } 23 | 24 | override func didMoveToSuperview() { 25 | super.didMoveToSuperview() 26 | layer.zPosition = -1 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonSDK/Entity/Mastodon+Entity+History.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Mastodon+Entity+History.swift 3 | // 4 | // 5 | // Created by MainasuK Cirno on 2021/1/28. 6 | // 7 | 8 | import Foundation 9 | 10 | extension Mastodon.Entity { 11 | /// History 12 | /// 13 | /// - Since: 2.4.1 14 | /// - Version: 3.3.0 15 | /// # Last Update 16 | /// 2021/1/28 17 | /// # Reference 18 | /// [Document](https://docs.joinmastodon.org/entities/history/) 19 | public struct History: Hashable, Codable, Sendable { 20 | /// UNIX timestamp on midnight of the given day 21 | public let day: Date 22 | public let uses: String 23 | public let accounts: String 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+Diffable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoCompleteViewModel+Diffable.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-5-17. 6 | // 7 | 8 | import UIKit 9 | import MastodonCore 10 | 11 | extension AutoCompleteViewModel { 12 | 13 | func setupDiffableDataSource( 14 | tableView: UITableView 15 | ) { 16 | diffableDataSource = AutoCompleteSection.tableViewDiffableDataSource(tableView: tableView) 17 | 18 | var snapshot = NSDiffableDataSourceSnapshot() 19 | snapshot.appendSections([.main]) 20 | diffableDataSource?.apply(snapshot) 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /MastodonSDK/Sources/MastodonCore/Service/API/APIService+Filter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // APIService+Filter.swift 3 | // Mastodon 4 | // 5 | // Created by MainasuK Cirno on 2021-7-9. 6 | // 7 | 8 | import Combine 9 | import CoreData 10 | import CoreDataStack 11 | import Foundation 12 | import MastodonSDK 13 | 14 | extension APIService { 15 | 16 | func filters( 17 | mastodonAuthenticationBox: MastodonAuthenticationBox 18 | ) async throws -> [Mastodon.Entity.FilterInfo] { 19 | let authorization = mastodonAuthenticationBox.userAuthorization 20 | let domain = mastodonAuthenticationBox.domain 21 | 22 | return try await Mastodon.API.Account.filters(session: session, domain: domain, authorization: authorization) 23 | } 24 | } 25 | --------------------------------------------------------------------------------