-
Notifications
You must be signed in to change notification settings - Fork 21
iOS MOE Guide [deprecated]
NOTE! Firebase Crash Reporting will be unavailable after 9 September 2018. Crash reporting should be done by Crashlytics and Fabric. Read this Crashlytics wiki page if you need it
iOS platform is more challenging than Android, please read the all 4 steps of following guide.
Multi-OS engine 1.3.6+
Open xcode project (you can find it inside ios-moe module or you can open it by right click on ios-moe
module and choosing Open Xcode Project) and drag GoogleService-Info.plist
file (you can download it from firebase console) to project root folder. Path should be as follows: ios-moe/xcode/ios-moe/GoogleService-Info.plist
2.1 Init pods
$ cd ios-moe/xcode
$ pod init
2.2 Add pods ios-moe/xcode/Podfile
target 'ios-moe' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for ios-moe
pod 'Firebase/Core', '5.2.0'
pod 'Firebase/Storage', '5.2.0'
pod 'Firebase/Database', '5.2.0'
pod 'Firebase/Auth', '5.2.0'
pod 'Firebase/Messaging', '5.2.0'
pod 'GoogleSignIn', '4.1.2'
pod 'Fabric', '~> 1.7.11'
pod 'Crashlytics', '~> 3.10.7'
end
# !! add this also !!
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
2.3 Install
$ pod install
2.4 Add Pods.xconfig
to custom.xconfig
. Open ios-moe/build.gradle
and look for copyNatives task
Replace this:
def outFlags = file("xcode/ios-moe/custom.xcconfig");
outFlags.write LD_FLAGS
With this:
def outFlags = file("xcode/ios-moe/custom.xcconfig");
def FIREBASE_PODS = "#include \"Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.release.xcconfig\"\n"
outFlags.write FIREBASE_PODS + LD_FLAGS
Add workspace and mainScheme to moe/xcode settings: ios-moe/build.gradle
// Setup Multi-OS Engine
moe {
xcode {
project 'xcode/ios-moe.xcodeproj'
workspace 'xcode/ios-moe.xcworkspace' // Workspace is needed when Pods was included in project
mainScheme 'ios-moe'
mainTarget 'ios-moe'
testTarget 'ios-moe-Test'
}
}
4. Update proguard files and all is done!
- Getting started
-
Usage 2.x/3.x
- Promises
- Filtering API
- Google Sign in
- Apple Sign in
- Mock other platforms
- Debug
- Database POJO Conversion
-
Examples
- Anonymous authentication
- Create user
- Sign in / Sign out
- Google sign in
- User management
- Upload image to storage
- Download image from storage
- Upload bytes to storage
- Download bytes from storage
- Delete something from storage
- Analytics API methods
- Crash API methods
- Database read value
- Database read object
- Database set value
- Database limit equal
- Database reference listener
- Database read objects list
- Database child event
- Database transaction
- Database sharding
- Database onDisconnect
- General examples
- Kotlin
- Usage 1.x
- Donate