A fully-featured iOS client for accessing your secure cloud storage and communication tools, powered by MEGA.
This guide will help you build the MEGA iOS application using Xcode on macOS.
-
Update
.gitmodules:- Update:
Modules/DataSource/MEGAChatSDK/Sources/MEGAChatSDKβhttps://github.com/meganz/MEGAchat.gitSDKβhttps://github.com/meganz/SDK.git
- Update:
-
Remove submodules:
iosTransifexModules/MEGASharedRepo
-
Replace Shared Repo:
- Download MEGASharedRepo
- Replace the old one in the
/Modulesdirectory.
-
Install CMake:
- Navigate to the
scriptsfolder and run:./install-cmake.sh
- Alternatively, public users may run from the root folder:
and ignore any non-critical errors.
./config.sh
- Navigate to the
-
Synchronize Git Submodules:
git add .gitmodules git rm --cached Modules/MEGASharedRepo git rm --cached iosTransifex git submodule sync git submodule update --init --recursive
-
Manually Pull Code if Needed:
- For folders that failed to fetch:
Modules/DataSource/MEGAChatSDK/Sources/MEGAChatSDKModules/DataSource/MEGASDK/Sources/MEGASDKiMEGA/Vendor/SVProgressHUDiMEGA/Vendor/LTHPasscodeViewController
Run:
git checkout <latest-commit> git branch -D master git checkout -b master
- For SVProgressHUD (use
custom_megabranch) and LTHPasscodeViewController (usecustom-MEGAbranch):git checkout <latest-commit> git branch -D master git checkout -b <branch_name>
- For folders that failed to fetch:
-
Download and Unzip Required Dependencies: Place these under:
Modules/DataSource/MEGAChatSDK/Sources/MEGAChatSDK/bindings/Objective-C/3rdparty -
Generate the DB Schema: Navigate to:
Modules/DataSource/MEGAChatSDK/Sources/MEGAChatSDK/src
and run:
cmake -P genDbSchema.cmake
-
Update Swift Package Dependency: Replace:
https://code.developers.mega.co.nz/mobile/kmm/mobile-analytics-ioswith:https://github.com/meganz/mobile-analytics-ios.git
- In the terminal, run:
./configure.sh
- Open the Xcode workspace:
open iMEGA.xcworkspace
- Select the
MEGAtarget. - Build and run using βR.
To build third-party dependencies manually:
-
Open a terminal at:
Modules/DataSource/MEGASDK/Sources/MEGASDK/bindings/ios/3rdparty
-
Run:
sh build-all.sh --enable-chat
β οΈ This may take ~30 minutes.
autoconfautomakecmakelibtool
Refer to the official documentation:
π WebRTC for iOS