Skip to content

Commit 13bfb82

Browse files
authored
Fix an issue with bitcode not being enabled (#338)
1 parent 144d786 commit 13bfb82

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ endif()
234234

235235
# Includes platform which needs to be invoked first
236236
add_subdirectory(app)
237-
set(TARGET_LINK_LIB_NAMES "firebase_app" "firebase_app_swig" "flatbuffers")
237+
set(TARGET_LINK_LIB_NAMES "firebase_app" "firebase_app_swig")
238238
set(PROJECT_LIST_HEADER "#define PROJECT_LIST(X)")
239239
list(APPEND PROJECT_LIST_HEADER " X(App)")
240240

@@ -301,7 +301,7 @@ endif()
301301

302302
if(FIREBASE_UNI_LIBRARY)
303303
if(FIREBASE_IOS_BUILD)
304-
ios_pack(firebase_lib_uni libFirebaseCppApp DEPS "firebase_app" "firebase_app_swig" "flatbuffers")
304+
ios_pack(firebase_lib_uni libFirebaseCppApp DEPS "firebase_app" "firebase_app_swig")
305305
else()
306306
build_uni(
307307
"${TARGET_LINK_LIB_NAMES}"

cmake/build_shared.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME)
7979
PREFIX "lib"
8080
SUFFIX ".a"
8181
)
82+
83+
# Enable Automatic Reference Counting (ARC) and Bitcode.
84+
target_compile_options(${shared_target}
85+
PUBLIC "-fobjc-arc" "-fembed-bitcode")
86+
target_link_libraries(${shared_target}
87+
PUBLIC "-fembed-bitcode")
8288
elseif(ANDROID)
8389
set_target_properties(${shared_target}
8490
PROPERTIES
@@ -125,4 +131,4 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME)
125131
)
126132
endif()
127133

128-
endfunction()
134+
endfunction()

docs/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Release Notes
158158
### Upcoming
159159
- Changes
160160
- General: Added a missing namespace to the Google.MiniJson.dll.
161+
- General (iOS): Fix an issue with bitcode not being enabled correctly.
161162
- Functions: Add a new method `GetHttpsCallableFromURL`, to create callables
162163
with URLs other than cloudfunctions.net.
163164
- Analytics (iOS): Added InitiateOnDeviceConversionMeasurementWithEmail function to facilitate the

0 commit comments

Comments
 (0)