# Build NetExperts Phone 1.0.0 (40)

This release corresponds to app commit `33660e5be52aa50ff58a41bc9c272aea3e179a17`. The app archive includes source, tests, privacy manifests, licence notices and the later media patches. [Release notes in the archive](#app-build) describe the public source build and its replacement cassette illustration.

## Download and check the files

Download the app archive and all five SDK and dependency archives linked from the [build 40 source entry](https://www.netexperts.com.au/source-code.html#netexperts-phone-ios-1-0-0-40). Check the app archive against this release’s `SHA256SUMS`. The shared SDK, wrapper, dependency and build tool archives use the [shared checksums](https://www.netexperts.com.au/opensource/netexperts-phone/1.0.0-25/SHA256SUMS). Extract the app into an empty directory. The archive creates `app/`. The SDK package belongs under sibling directory `sdk/private-package/`, which is the relative path in the Xcode project.

## Build the SDK

The release uses Linphone SDK 5.5.39 at commit `4d00285c92511acbeba7b2c7c9c621599192584f`. The SDK archive includes the pinned recursive iOS sources. Extract it and the shared build materials and apply the patches in this order.

```sh
mkdir -p sdk/source sdk/original-package
tar -xzf linphone-sdk-5.5.39-ios-source.tar.gz -C sdk/source
tar -xzf linphone-sdk-5.5.39-swift-wrapper.tar.gz -C sdk/original-package
tar -xzf linphone-sdk-5.5.39-netexperts-build-materials.tar.gz -C sdk
for patch_file in sdk/0[1-3]-*.patch; do
    patch -f -d sdk/source -p1 < "$patch_file" || exit
done
patch -f -d sdk/source/mediastreamer2 -p1 < sdk/04-turn-readiness.patch
patch -f -d sdk/source -p1 < app/SDKPrivacy/patches/mediastreamer2-saved-wav.patch
patch -f -d sdk/source -p1 < app/SDKPrivacy/patches/mediastreamer2-directional-wav.patch
```

The shared materials contain the configuration, package assembly, Swift sources and patch manifests. `app/docs/SDK-PROVENANCE.json` identifies the patches used in build 40. In the SDK build environment, compile for iOS arm64 and iOS Simulator arm64.

Use Xcode 27.2, CMake 4.4.5, Ninja 1.13.2, Python 3.9.6 and yasm 1.3.0. Install meson, nasm, autoconf, automake, perl and pkg-config. Prepare `sdk/tools-venv` using the pinned Python and install pystache 0.6.8, six 1.17.0, importlib_metadata 8.7.1 and zipp 3.23.1. Build yasm from the supplied tool archive with its prefix set to `sdk/tools` and copy the supplied executable `xcrun` launcher into `sdk/tools/bin`. Point both build scripts and the launcher to the selected Xcode installation. The upstream per-architecture builder clears its parent environment.

```sh
cd sdk
bash configure-ios.sh
bash build-ios.sh
python3 assemble-private-package.py
cd ..
```

The assembly step uses the original wrapper and the 17 generated XCFrameworks. An independently built SDK can have different binary hashes. `app/SDKPrivacy/verify-sdk.py` checks the exact package used for the NetExperts build. To use your own SDK build, review its provenance and privacy manifests, record its file inventory and hashes in your fork’s SDK lock and run the regression tests.

## App build

From the directory containing `app/` and `sdk/`, use Xcode 27.2 and an arm64 iOS Simulator destination. `Package.resolved` pins AppAuth, Elegant Emoji Picker and PhoneNumberKit. The linked dependency archive includes their source and licence files.

```sh
xcodebuild -project app/LinphoneApp.xcodeproj -scheme Linphone \
  -configuration Release -destination 'generic/platform=iOS Simulator' \
  ARCHS=arm64 ONLY_ACTIVE_ARCH=YES MARKETING_VERSION=1.0.0 \
  CURRENT_PROJECT_VERSION=40 CODE_SIGNING_ALLOWED=NO build
```

For a device build, use your own Apple team, bundle identifiers, app groups, keychain and push entitlements. Use only a line and gateway you operate or are authorised to use. Refer to `app/docs/RELEASE.md` and `app/Branding/OpenSourceLicences/` for the release and component notices.
