Mopicker is a sample app, that has been written in native Swift programming language using SwiftUI and Combine frameworks in order to demonstrate the AppsflyerSDK implementation.
- Clone the repository or download it as a .zip archive;
- Go to the cloned or unarchived project directory using terminal and run
pod install
command. If this command is unavailable to you, please install Cocoapods dependency manager (https://cocoapods.org/). - To be able to test AppsFlyer SDK, open the
mopicker-sample-app.xcworkspace
file, go toAssets/Info.plist
and add your af_dev_key and af_app_id (Appendix 1).
Appendix 1
In order to launch the project in full-mode with Firebase authentification and Google Sign-in features, please do the following after completing first three steps:
- Create projects in Google and Firebase dashboards to see the data flow in consoles, after launch of full-mode application (https://firebase.google.com/, https://developers.google.com/identity/sign-in/ios);
- Open the Info.plist file and add your google_client_id (Appendix 1) and add your REVERSED_CLIENT_ID to the url-scheme as it is described in (https://developers.google.com/identity/sign-in/ios/sdk) in order to activate Google Sign-In;
- To enable Firebase in the app you should remove existing
GoogleService-Info.plist
file inAssets
folder and add your own file to the project navigator, which you will recieve after creating a project in Firebase Console (https://console.firebase.google.com/)(Appendix 2);
Appendix 2
- Go to the
AppConstants.swift
file and changevar isOpenSource
property tofalse
;
NOTE: If you change the app to the open source and do not provide Firebase of Google Sign-in identifiers, the app will crash.