If you chose to initialize each module separately, add the dependencies as follows:
In the root directory of the project, type the following command on the terminal to create a Podfile:
pod init
Open and edit the Podfile by adding the desired MDM modules:
# Uncomment the next line to define a global platform for your project
platform :ios, '14.0'
target 'My App' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Desired MDM Modules
end
Run the following command to download the dependency:
pod install
Or run the following command to update all dependencies:
pod update
Make sure to open the Xcode .xcworkspace instead of the project file.
Add the modules that your App will use as a dependency in the Podfile (Remember to run pod install
every time a new module is added to your project), and start the module at AppDelegate.m.
GeoBehavior
pod 'MDMGeoBehavior'
import MDMGeoBehavior
MDMCore.start(withAppId: "SEU_APP_ID", kitModules: [MDMGeoBehavior.self()])
AppBehavior
pod 'MDMAppBehavior'
import MDMAppBehavior
MDMCore.start(withAppId: "SEU_APP_ID", kitModules: [MDMAppBehavior.self()])
Notification
pod 'MDMNotification'
import MDMNotification
MDMCore.start(withAppId: "SEU_APP_ID", kitModules: [MDMNotification.self()])
Enable the App Groups option in the Capabilities tab, creating a group, preferably with the bundle identifier name of the main target, preceded by group:
Add to the Info.plist of your target and extension created the NSGroupIdentifier
key of type String filled with the name of the created group, as shown in the example below:
<key>NSGroupIdentifier</key>
<string>NAME OF THE GROUP</string>
Implement each module: