Firstly, you need an apple developer program, not the free version, but the paid one that include iCloud, push notifications, and other capabilities available only in the paid program.
- Install Xcode in your system.
- Install CMake, and create a symbolic link in folder '/usr/local/bin' after install so that you can run it directly in the Xcode shell:
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
Repo link: https://github.com/meganz/iOS
- open
.gitmodules
file under repo root directory, and change the URL:
- Change url for karere submodule, use this one: https://github.com/meganz/MEGAchat.git
- Change url for SDK submodule, use this one: https://github.com/meganz/SDK.git
- run command to update:
git submodule update --init --recursive
- Download the prebuilt third party dependencies from this link: https://mega.nz/file/AENVGYjC#HhUgIOBY69zVZZtOa4e6vdySpHefnUo4GcoQYElmEo4
- Uncompress that file and move the folders
webrtc
,include
andlib
intoiMEGA/Vendor/sdk/bindings/ios/3rdparty
.
- Open
iMEGA.xcworkspace
in Xcode, wait Swift Package to update. - Select target MEGA, change Bundle Identifier to your own
com.xxx
, and choose Automatically manage signing with your own account. - Change default App Groups
group.mega.ios
to your own namegroup.com.xxx
, iCloud Containers make the same changeiCloud.com.xxx
. - Do the same for other targets: MEGAPicker, MEGAPickerFileProvider, MEGAShare, MEGANotifications, MEGAWidgetExtension, MEGAIntent.
- Modify file
MEGANotifications.entitlements
, delete this line:com.apple.developer.usernotifications.filtering
. - Modify
MEGAConstants.m
change value of MEGAGroupIdentifier to your own group id:group.com.xxx
. - Modify
AppGroupContainer.swift
change value of identifier to your own group id:group.com.xxx
. - Modify
iMEGA/Extensions/MEGAPickerFileProvider/Info.plist
change NSExtensionFileProviderDocumentGroup to your own group id:group.com.xxx
.
Running in the simulator will crash when app launch.