Skip to content

Commit 9dc41d9

Browse files
committed
debug ios
try to fix ios new attempt at fixing ios another possible ios fix another fix please clean up
1 parent 5f68f47 commit 9dc41d9

File tree

4 files changed

+51
-4
lines changed

4 files changed

+51
-4
lines changed

ci/Jenkinsfile.ios

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pipeline {
5555
GOTMPDIR = "${env.WORKSPACE_TMP}"
5656
PLATFORM = "ios/${getArch()}"
5757
/* Improve make performance */
58-
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
58+
MAKEFLAGS = "-j${utils.getProcCount()} V=1"
5959
QT_VERSION="6.9.2"
6060
QMAKE = "/Users/admin/${QT_VERSION}/ios/bin/qmake"
6161
QT_HOST_PATH = "/Users/admin/${QT_VERSION}/macos"
@@ -109,7 +109,7 @@ pipeline {
109109
stage('Build iOS App') {
110110
steps {
111111
script {
112-
app.buildSignedIOS(target='mobile-build', verbose=params.VERBOSE)
112+
app.buildSignedIOS(target='mobile-build', verbose='1')
113113
}
114114
}
115115
}

mobile/scripts/buildStatusQ.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,19 @@ cmake -S "${STATUSQ}" -B "${BUILD_DIR}" \
3232
-DSTATUSQ_TESTMODE=$([[ "${STATUSQ_TESTMODE}" == "true" ]] && echo ON || echo OFF)
3333

3434
make -C "${BUILD_DIR}" qzxing -j "$(nproc)"
35+
make -C "${BUILD_DIR}" SCodes -j "$(nproc)"
3536
make -C "${BUILD_DIR}" StatusQ -j "$(nproc)"
3637

3738
mkdir -p "${LIB_DIR}"
3839

3940
STATUSQ_LIB=$(find "${BUILD_DIR}" -name "libStatusQ${LIB_SUFFIX}${LIB_EXT}")
4041
QZXING_LIB=$(find "${BUILD_DIR}" -name "libqzxing.a")
42+
SCODES_LIB=$(find "${BUILD_DIR}" -name "libSCodes.a")
43+
ZXING_LIB=$(find "${BUILD_DIR}" -name "libZXing.a")
4144

4245
cp "${STATUSQ_LIB}" "${LIB_DIR}/libStatusQ${LIB_SUFFIX}${LIB_EXT}"
43-
cp "${QZXING_LIB}" "${LIB_DIR}/libqzxing.a"
46+
cp "${QZXING_LIB}" "${LIB_DIR}/libqzxing.a"
47+
cp "${SCODES_LIB}" "${LIB_DIR}/libSCodes.a"
48+
if [ -f "${ZXING_LIB}" ]; then
49+
cp "${ZXING_LIB}" "${LIB_DIR}/libZXing.a"
50+
fi

mobile/wrapperApp/Status.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ios {
8181
-framework Foundation
8282

8383
# Base libraries (always included)
84-
LIBS += -L$$PWD/../lib/$$LIB_PREFIX -lnim_status_client -lDOtherSideStatic -lstatusq -lstatus -lsds -lssl_3 -lcrypto_3 -lqzxing -lresolv -lqrcodegen
84+
LIBS += -L$$PWD/../lib/$$LIB_PREFIX -lnim_status_client -lDOtherSideStatic -lstatusq -lstatus -lsds -lssl_3 -lcrypto_3 -lqzxing -lSCodes -lZXing -lresolv -lqrcodegen
8585

8686
contains(DEFINES, FLAG_KEYCARD_ENABLED) {
8787
# Use entitlements with NFC support (requires paid Apple Developer account)

ui/StatusQ/CMakeLists.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,33 @@ FetchContent_Declare(
276276
)
277277
FetchContent_MakeAvailable(MobileUI)
278278

279+
# ZXing configuration - use static library for all platforms for consistent linking
280+
set(ZXING_SHARED_LIBRARY OFF CACHE BOOL "Build ZXing as static library" FORCE)
281+
set(ZXING_BUILD_TESTS OFF CACHE BOOL "Disable ZXing tests" FORCE)
282+
set(ZXING_BUILD_EXAMPLES OFF CACHE BOOL "Disable ZXing examples" FORCE)
283+
284+
# iOS-specific configuration for SCodes and its ZXing dependency
285+
if(${CMAKE_SYSTEM_NAME} MATCHES "iOS")
286+
# Set CMake variables before fetching SCodes to ensure proper iOS compilation
287+
# These flags must be set before FetchContent_MakeAvailable for iOS arm64 support
288+
string(APPEND CMAKE_CXX_FLAGS " -fPIC")
289+
string(APPEND CMAKE_C_FLAGS " -fPIC")
290+
291+
# Ensure proper linking by disabling shared library mode for iOS
292+
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libraries for iOS" FORCE)
293+
294+
# Pass iOS-specific settings to dependencies
295+
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_FIND_ROOT_PATH}")
296+
endif()
297+
279298
FetchContent_Declare(
280299
SCodes
281300

282301
GIT_REPOSITORY https://github.com/status-im/SCodes.git
283302
GIT_TAG c0647299d6be021ac59f57e031c794bd58757efe
284303
SOURCE_SUBDIR src
285304
)
305+
286306
FetchContent_MakeAvailable(SCodes)
287307

288308
target_link_libraries(StatusQ PRIVATE
@@ -298,6 +318,26 @@ target_link_libraries(StatusQ PRIVATE
298318
SCodes
299319
)
300320

321+
# iOS-specific compiler settings for proper SCodes/ZXing compilation
322+
if(${CMAKE_SYSTEM_NAME} MATCHES "iOS")
323+
# Ensure SCodes and ZXing are compiled with proper settings for iOS arm64
324+
if(TARGET SCodes)
325+
set_target_properties(SCodes PROPERTIES
326+
POSITION_INDEPENDENT_CODE ON
327+
CXX_STANDARD 17
328+
CXX_STANDARD_REQUIRED ON
329+
)
330+
endif()
331+
332+
if(TARGET ZXing)
333+
set_target_properties(ZXing PROPERTIES
334+
POSITION_INDEPENDENT_CODE ON
335+
CXX_STANDARD 17
336+
CXX_STANDARD_REQUIRED ON
337+
)
338+
endif()
339+
endif()
340+
301341
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
302342
target_link_libraries(StatusQ PRIVATE
303343
Qt::QuickTest

0 commit comments

Comments
 (0)