Skip to content

Commit e0cef3c

Browse files
committed
Integrate Latest @ 300019442
Add Firestore testapp and update dependency versions. CL: 300019442
1 parent be3c457 commit e0cef3c

File tree

34 files changed

+2380
-13
lines changed

34 files changed

+2380
-13
lines changed

admob/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# AdMob test application.
44
target 'testapp' do
5-
pod 'Firebase/AdMob', '6.16.0'
5+
pod 'Firebase/AdMob', '6.17.0'
66
end

analytics/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Analytics test application.
44
target 'testapp' do
5-
pod 'Firebase/Analytics', '6.16.0'
5+
pod 'Firebase/Analytics', '6.17.0'
66
end

auth/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Auth test application.
44
target 'testapp' do
5-
pod 'Firebase/Auth', '6.16.0'
5+
pod 'Firebase/Auth', '6.17.0'
66
end

auth/testapp/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Building and Running the testapp
185185
Support
186186
-------
187187
188-
[Firebase Support](https://firebase.google.com/support/)
188+
[https://firebase.google.com/support/](https://firebase.google.com/support/)
189189
190190
License
191191
-------

database/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Firebase Realtime Database test application.
44
target 'testapp' do
5-
pod 'Firebase/Database', '6.16.0'
6-
pod 'Firebase/Auth', '6.16.0'
5+
pod 'Firebase/Database', '6.17.0'
6+
pod 'Firebase/Auth', '6.17.0'
77
end

dynamic_links/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Dynamic Links test application.
44
target 'testapp' do
5-
pod 'Firebase/DynamicLinks', '6.16.0'
5+
pod 'Firebase/DynamicLinks', '6.17.0'
66
end

firestore/testapp/AndroidManifest.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.google.firebase.cpp.firestore.testapp"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8+
<uses-permission android:name="android.permission.WAKE_LOCK" />
9+
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" />
10+
<application android:label="@string/app_name"
11+
android:name="android.support.multidex.MultiDexApplication">
12+
<activity android:name="android.app.NativeActivity"
13+
android:screenOrientation="portrait"
14+
android:configChanges="orientation|screenSize">
15+
<meta-data android:name="android.app.lib_name"
16+
android:value="android_main" />
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
</manifest>

firestore/testapp/CMakeLists.txt

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
# User settings for Firebase samples.
4+
# Path to Firebase SDK.
5+
# Try to read the path to the Firebase C++ SDK from an environment variable.
6+
if (NOT "$ENV{FIREBASE_CPP_SDK_DIR}" STREQUAL "")
7+
set(DEFAULT_FIREBASE_CPP_SDK_DIR "$ENV{FIREBASE_CPP_SDK_DIR}")
8+
else()
9+
set(DEFAULT_FIREBASE_CPP_SDK_DIR "firebase_cpp_sdk")
10+
endif()
11+
if ("${FIREBASE_CPP_SDK_DIR}" STREQUAL "")
12+
set(FIREBASE_CPP_SDK_DIR ${DEFAULT_FIREBASE_CPP_SDK_DIR})
13+
endif()
14+
if(NOT EXISTS ${FIREBASE_CPP_SDK_DIR})
15+
message(FATAL_ERROR "The Firebase C++ SDK directory does not exist: ${FIREBASE_CPP_SDK_DIR}. See the readme.md for more information")
16+
endif()
17+
18+
# Windows runtime mode, either MD or MT depending on whether you are using
19+
# /MD or /MT. For more information see:
20+
# https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
21+
set(MSVC_RUNTIME_MODE MD)
22+
23+
project(firebase_testapp)
24+
25+
# Sample source files.
26+
set(FIREBASE_SAMPLE_COMMON_SRCS
27+
src/main.h
28+
src/common_main.cc
29+
)
30+
31+
# The include directory for the testapp.
32+
include_directories(src)
33+
34+
# Sample uses some features that require C++ 11, such as lambdas.
35+
set (CMAKE_CXX_STANDARD 11)
36+
37+
if(ANDROID)
38+
# Build an Android application.
39+
40+
# Source files used for the Android build.
41+
set(FIREBASE_SAMPLE_ANDROID_SRCS
42+
src/android/android_main.cc
43+
)
44+
45+
# Build native_app_glue as a static lib
46+
add_library(native_app_glue STATIC
47+
${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
48+
49+
# Export ANativeActivity_onCreate(),
50+
# Refer to: https://github.com/android-ndk/ndk/issues/381.
51+
# This also does a workaround that prevents numerous errors that occur when
52+
# building using Android Studio. The errors look like:
53+
# libfirebase_auth.a(auth.o): relocation R_386_GOTOFF against preemptible
54+
# symbol <long_mangled_name> cannot be used when making a shared object.
55+
# Taken from:
56+
# https://github.com/opencv/opencv/issues/10229#issuecomment-359202825
57+
set(CMAKE_SHARED_LINKER_FLAGS
58+
"${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate \
59+
-Wl,--exclude-libs,libfirebase_firestore.a \
60+
-Wl,--exclude-libs,libfirebase_auth.a \
61+
-Wl,--exclude-libs,libfirebase_app.a"
62+
)
63+
64+
# Define the target as a shared library, as that is what gradle expects.
65+
set(target_name "android_main")
66+
add_library(${target_name} SHARED
67+
${FIREBASE_SAMPLE_ANDROID_SRCS}
68+
${FIREBASE_SAMPLE_COMMON_SRCS}
69+
)
70+
71+
target_link_libraries(${target_name}
72+
log android atomic native_app_glue
73+
)
74+
75+
target_include_directories(${target_name} PRIVATE
76+
${ANDROID_NDK}/sources/android/native_app_glue)
77+
78+
set(ADDITIONAL_LIBS)
79+
else()
80+
# Build a desktop application.
81+
82+
# Windows runtime mode, either MD or MT depending on whether you are using
83+
# /MD or /MT. For more information see:
84+
# https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
85+
set(MSVC_RUNTIME_MODE MD)
86+
87+
# Platform abstraction layer for the desktop sample.
88+
set(FIREBASE_SAMPLE_DESKTOP_SRCS
89+
src/desktop/desktop_main.cc
90+
)
91+
92+
set(target_name "desktop_testapp")
93+
add_executable(${target_name}
94+
${FIREBASE_SAMPLE_DESKTOP_SRCS}
95+
${FIREBASE_SAMPLE_COMMON_SRCS}
96+
)
97+
98+
if(APPLE)
99+
set(ADDITIONAL_LIBS
100+
gssapi_krb5
101+
pthread
102+
"-framework CoreFoundation"
103+
"-framework Foundation"
104+
"-framework GSS"
105+
"-framework Security"
106+
"-framework SystemConfiguration"
107+
)
108+
elseif(MSVC)
109+
set(ADDITIONAL_LIBS advapi32 ws2_32 crypt32 iphlpapi psapi userenv)
110+
else()
111+
set(ADDITIONAL_LIBS pthread)
112+
endif()
113+
114+
# If a config file is present, copy it into the binary location so that it's
115+
# possible to create the default Firebase app.
116+
set(FOUND_JSON_FILE FALSE)
117+
foreach(config "google-services-desktop.json" "google-services.json")
118+
if (EXISTS ${config})
119+
add_custom_command(
120+
TARGET ${target_name} POST_BUILD
121+
COMMAND ${CMAKE_COMMAND} -E copy
122+
${config} $<TARGET_FILE_DIR:${target_name}>)
123+
set(FOUND_JSON_FILE TRUE)
124+
break()
125+
endif()
126+
endforeach()
127+
if(NOT FOUND_JSON_FILE)
128+
message(WARNING "Failed to find either google-services-desktop.json or google-services.json. See the readme.md for more information.")
129+
endif()
130+
endif()
131+
132+
# Add the Firebase libraries to the target using the function from the SDK.
133+
add_subdirectory(${FIREBASE_CPP_SDK_DIR} bin/ EXCLUDE_FROM_ALL)
134+
# Note that firebase_app needs to be last in the list.
135+
set(firebase_libs firebase_firestore firebase_auth firebase_app)
136+
target_link_libraries(${target_name} "${firebase_libs}" ${ADDITIONAL_LIBS})
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
5+
</dependencies>
6+
<scenes/>
7+
</document>

firestore/testapp/Podfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source 'https://github.com/CocoaPods/Specs.git'
2+
platform :ios, '8.0'
3+
# Firebase Firestore test application.
4+
target 'testapp' do
5+
pod 'Firebase/Analytics', '6.18.0'
6+
pod 'Firebase/Firestore', '6.18.0'
7+
pod 'Firebase/Auth', '6.18.0'
8+
end

0 commit comments

Comments
 (0)