# Perfilm 1.3 (4) source build

This release is provided as three source archives: application, playback core,
and dependencies. Unpack all three and verify `SHA256SUMS`. `release.json`
identifies the application commit, upstream commits, patches and engine used.
Each archive also contains `FILES.sha256` for its exported files.

The application contains the inherited VLC iOS code and Perfilm changes.
Internal documentation, tests, fixtures, samples, design work, Git history,
credentials, signing profiles, caches and compiled frameworks are omitted.
Build descriptions required by upstream configuration may remain in otherwise
omitted test directories. Test targets are not supported by this source export.
Original copyright and license notices are retained.

Signing teams and service credentials in exported configuration are blank.
Use your own development team, bundle identifier, application groups and service registrations.
For device signing, set `WORLDPLAYER_BUNDLE_IDENTIFIER` in
`Buildsystem/SharedConfig.xcconfig` to an identifier available to your account;
the application group and keychain names are derived from it.
No private key, certificate, developer account or internal server is required
from Perfilm's developer. Optional legacy service constants are intentionally
empty. Configure your own OpenSubtitles and ASSRT credentials in
`Sources/Headers/PerfilmSubtitleCredentials.h` to use online subtitle search.
These export-only changes do not remove playback or library code.

## Requirements

- macOS with Xcode and an installed iPhoneOS SDK; the release used SDK 27.1.
- Python 3.10 or later, GNU Make 4.4 or later, Git, Meson, Ninja, CMake and
  standard Autotools prerequisites required by VLC's supplied build scripts.
- Adequate disk space for compiling VLC and its dependencies.

Use your own installed Ant/JDK if an upstream host-tool step requires Ant. Its
cached precompiled host distribution is intentionally not included here.

This public recipe builds the patched iOS arm64 device slice from source; it does not download or include
precompiled simulator, macOS, watchOS, tvOS or visionOS slices.

## Prepare the source trees

Run the following from the directory containing the three unpacked archives:

```sh
python3 perfilm-1.3-4-a8f54b821-source/prepare.py \
  --app perfilm-1.3-4-a8f54b821-source \
  --core perfilm-core-6b5f85b-a8f54b821-source \
  --deps perfilm-dependencies-a8f54b821-source
```

The helper creates local build inputs under the application's `build/` and
`SourceDependencies/`, and changes Swift package references in that copy to
the supplied local sources. It refuses to reuse an existing prepared directory.
It also applies the supplied media-library relocation patches to the pristine
wrapper and medialibrary sources. It does not compile, sign, upload or contact
an internal service.

The playback core already includes the VLCKit patch series and Perfilm's production
patches listed in Patches/VLCKit. **Do not apply those patches again.** They are also provided separately
for review. The complete engine change patch describes the changes from the
recorded pristine libVLC commit. `SOURCE-ARCHIVES.json` records original and
exported dependency archive checksums: tests, fixtures, credentials and package
metadata were removed, so the supplied local checksum recipes are adjusted for
these source-only archives. Production source retained from those archives is
unchanged except for blank signing configuration.

## Build the device frameworks

```sh
cd perfilm-1.3-4-a8f54b821-source
bash build-core.sh
```

This builds the patched arm64 core and creates
`Vendor/VLCKit/VLCKit.xcframework`. It uses the supplied contrib and tool source
archives. Upstream scripts can still require standard host tools or additional
host prerequisites; this delivery is not a claim that every host tool is bundled.

Build the media library wrapper and its fixed dependencies:

```sh
APP_SOURCE="$PWD"
cd SourceDependencies/VLCMediaLibraryKit
sh buildVLCMediaLibraryKit.sh -n -l -a aarch64 -p "$APP_SOURCE/Vendor/VLCKit" -f
cp -R build/VLCMediaLibraryKit.xcframework .
cd "$APP_SOURCE"
```

The wrapper source corresponds to its pinned SPM release. Its binary-producing
commit differs only in package-distribution metadata; the wrapper implementation
and original build script match. Exported checksum fields are adjusted for the
source-only dependency archives. The fixed medialibrary, libvlcpp, SQLite, utf8proc and
JSON sources are included rather than replaced by links to their latest versions.

## Build the application

Open `VLC.xcworkspace`, select `VLC-iOS`, set your own signing configuration,
then build for an iOS device. An equivalent command is:

```sh
xcodebuild -workspace VLC.xcworkspace -scheme VLC-iOS \
  -configuration Release -destination 'generic/platform=iOS' \
  DEVELOPMENT_TEAM=YOUR_TEAM_ID -allowProvisioningUpdates build
```

The source version is 1.3, build 4. No tests, media, device data or distribution
credentials are supplied. See `LICENSES.md` and the component license files.
The export tools check patch reconstruction, archive integrity and excluded
material. These checks do not establish that a fresh full core rebuild passed;
consult the release verification record for the actual build coverage. Different SDKs and signing identities do not
produce byte-identical signed application bundles.
