# CocoaPods mirror (pkg.shecan.ir)

> Mirror of the CocoaPods trunk CDN (cdn.cocoapods.org): the Specs index files and podspecs, used as a CDN source in the Podfile.

- Upstream: cdn.cocoapods.org
- Mirror URL: <https://mirror-cocoapods.pkg.shecan.ir/>
- Clients: cocoapods
- Service status: <https://pkg.shecan.ir/status.json> (key `cocoapods`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/cocoapods/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/cocoapods.json>

## Limitations

- Only the spec repository is mirrored: the pods' own sources (git repositories, mostly on GitHub, or http archives named in each podspec) are downloaded from their own hosts during pod install.
- Replace source "https://cdn.cocoapods.org/" in the Podfile; other (private) spec repositories are not affected.
- pod trunk (push, register) and full-text search (pod search --full) are not supported.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### cocoapods: project (files inside the project)

Configuration file (macos): `Podfile`

```ruby
source 'https://mirror-cocoapods.pkg.shecan.ir/'
```

### cocoapods: persistent (user- or system-wide configuration)

Run (macos)

```sh
pod repo add-cdn shecan https://mirror-cocoapods.pkg.shecan.ir/
pod repo remove trunk
```

Undo / restore the default (macos) (checked by hand)

```sh
pod repo remove shecan
pod repo add-cdn trunk https://cdn.cocoapods.org/
```
