Код: Выделить всё
/Users/runner/work/ProjectName/ProjectName-V2/ios/Pods/FirebaseSharedSwift/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift:2614:1: error: expressions are not allowed at the top level
nonisolated(unsafe) fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
^
/Users/runner/work/ProjectName/ProjectName/ios/Pods/FirebaseSharedSwift/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift:2614:20: error: consecutive statements on a line must be separated by ';'
nonisolated(unsafe) fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
^
/Users/runner/work/ProjectName/ProjectName/ios/Pods/FirebaseSharedSwift/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift:289:57: error: cannot find type 'sending' in scope
open func encode(_ value: T) throws -> sending Any {
^~~~~~~
< /code>
Я использую Xcode 15.2, а сборка работает в рабочем процессе Github Actions. Моя цель развертывания установлена на iOS 9/10 в некоторых стручках, но XCODE 15.2 требует не менее 12,0.
То, что я пробовал:
Очистить папку сборки. /> Утверждая, что мой Podfile определяет совместимые версии для пожарной базы и связанных с ними библиотек. < /li>
< /ol>
Вопросы: < /p>
Почему я вижу эти ошибки Swift Syntax в Pod? Сторонние капсулы
Firebase и Xcode 15.2?require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '15.1'
use_modular_headers!
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS'] || 'static'
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
target 'ProjectName' do
config = use_native_modules!
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Firestore'
pod 'Firebase/Messaging'
pod 'lottie-ios'
use_react_native!(
:path => config[:reactNativePath],
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'ridemapTests' do
inherit! :complete
end
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
end
end
end
end
< /code>
Использование пакетов < /p>
"@gorhom/bottom-sheet": "^5.1.6",
"@native-html/transient-render-engine": "^11.2.3",
"@notifee/react-native": "^9.1.8",
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-firebase/app": "^22.4.0",
"@react-native-firebase/auth": "^22.4.0",
"@react-native-firebase/database": "^22.4.0",
"@react-native-firebase/firestore": "^22.4.0",
"@react-native-firebase/in-app-messaging": "^22.4.0",
"@react-native-firebase/messaging": "^22.4.0",
"@react-native-google-signin/google-signin": "^15.0.0",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-native-vector-icons/lucide": "^12.0.1",
"@react-native/new-app-screen": "^0.80.1",
"@react-navigation/bottom-tabs": "^7.4.2",
"@react-navigation/elements": "^2.5.2",
"@react-navigation/material-top-tabs": "^7.3.2",
"@react-navigation/native": "^7.1.14",
"@react-navigation/native-stack": "^7.3.21",
"jwt-decode": "^4.0.0",
"lottie-react-native": "^7.2.4",
"nativewind": "^4.1.23",
"react": "19.1.0",
"react-native": "0.80.1",
"react-native-app-icon-changer": "^1.3.0",
"react-native-app-intro-slider": "^4.0.4",
"react-native-avoid-softinput": "^7.0.2",
"react-native-compass-heading": "^2.0.2",
"react-native-device-info": "^14.0.4",
"react-native-dropdown-select-list": "^2.0.5",
"react-native-edge-to-edge": "^1.6.2",
"react-native-fast-image": "^8.6.3",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.27.1",
"react-native-linear-gradient": "^2.8.3",
"react-native-markdown-display": "^7.0.2",
"react-native-otp-entry": "^1.8.5",
"react-native-pager-view": "^6.8.1",
"react-native-permissions": "^5.4.1",
"react-native-reanimated": "^3.18.0",
"react-native-reanimated-skeleton": "^1.6.0",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.11.1",
"react-native-store-version": "^1.4.1",
"react-native-swiper": "^1.6.0",
"react-native-use-websocket": "^0.2.6",
"react-native-webview": "^13.15.0",
"romans": "^3.1.0"
< /code>
my github github code: < /p>
name: React Native iOS Simulator Build
on:
push:
branches:
- staging-ios
pull_request:
branches:
- staging-ios
jobs:
build-simulator:
runs-on: macos-14
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install JavaScript Dependencies
run: npm install -f
- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Clean & Install CocoaPods
run: |
cd ios
rm -rf Pods Podfile.lock
pod install --repo-update
- name: Select Xcode Version
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
- name: Patch Deployment Target to 15.1
run: |
sed -i '' 's/IPHONEOS_DEPLOYMENT_TARGET = [0-9.]*/IPHONEOS_DEPLOYMENT_TARGET = 15.1/g' ios/ProjectName.xcodeproj/project.pbxproj
- name: Build iOS App for Simulator
run: |
cd ios
xcodebuild -workspace ProjectName.xcworkspace -scheme ProjectName \
-sdk iphonesimulator \
-configuration Debug \
-derivedDataPath build/derivedData \
-arch arm64 \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Locate Simulator App Bundle
id: locate_app_bundle
run: |
APP_BUNDLE_PATH=$(find ios/build/derivedData -name "ridemap.app" -print -quit)
echo "SIMULATOR_APP_BUNDLE_PATH=$APP_BUNDLE_PATH"
echo "SIMULATOR_APP_BUNDLE_PATH=$APP_BUNDLE_PATH" >> $GITHUB_OUTPUT
- name: Ensure Simulator Build Exists
if: ${{ steps.locate_app_bundle.outputs.SIMULATOR_APP_BUNDLE_PATH == '' }}
run: |
echo "❌ Failed to locate Simulator build"
exit 1
- name: Archive Simulator App Bundle
run: |
zip -r ridemapSimulator.zip ${{ steps.locate_app_bundle.outputs.SIMULATOR_APP_BUNDLE_PATH }}
- name: Upload Simulator App Bundle as Artifact
uses: actions/upload-artifact@v4
with:
name: ios-simulator-build
path: ProjectName.zip
- name: Clean up Build Files
if: always()
run: |
rm -rf ios/build
rm -rf ~/Library/Developer/Xcode/DerivedData
< /code>
logs: < /p>
log link < /p>
new YML-файл: < /p>
name: React Native iOS Simulator Build
on:
push:
branches:
- staging-ios
pull_request:
branches:
- staging-ios
jobs:
build-simulator:
runs-on: macos-14
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install JavaScript Dependencies
run: npm install --force
- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Clean & Install CocoaPods
run: |
cd ios
rm -rf Pods Podfile.lock
pod install --repo-update
- name: Select Xcode 16.2
run: sudo xcode-select -switch /Applications/Xcode_16.2.app
- name: Patch Deployment Target to iOS 15.1
run: |
sed -i '' 's/IPHONEOS_DEPLOYMENT_TARGET = [0-9.]*/IPHONEOS_DEPLOYMENT_TARGET = 15.1/g' ios/ridemap.xcodeproj/project.pbxproj
- name: Patch Pods Deployment Target to iOS 15.1
run: |
find ios/Pods -name '*.podspec.json' -exec sed -i '' 's/"platforms": {[^}]*}/"platforms": { "ios": "15.1" }/g' {} \;
- name: Build iOS App for Simulator
run: |
cd ios
xcodebuild -workspace ridemap.xcworkspace -scheme ridemap \
-sdk iphonesimulator \
-configuration Debug \
-derivedDataPath build/derivedData \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
-arch arm64
- name: Locate Simulator App Bundle
id: locate_app_bundle
run: |
APP_BUNDLE_PATH=$(find ios/build/derivedData -name "ridemap.app" -print -quit)
echo "SIMULATOR_APP_BUNDLE_PATH=$APP_BUNDLE_PATH"
echo "SIMULATOR_APP_BUNDLE_PATH=$APP_BUNDLE_PATH" >> $GITHUB_OUTPUT
- name: Ensure Simulator Build Exists
if: ${{ steps.locate_app_bundle.outputs.SIMULATOR_APP_BUNDLE_PATH == '' }}
run: |
echo "❌ Failed to locate Simulator build"
exit 1
- name: Archive Simulator App Bundle
run: |
zip -r ridemapSimulator.zip ${{ steps.locate_app_bundle.outputs.SIMULATOR_APP_BUNDLE_PATH }}
- name: Upload Simulator App Bundle as Artifact
uses: actions/upload-artifact@v4
with:
name: ios-simulator-build
path: ridemapSimulator.zip
- name: Clean up Build Files
if: always()
run: |
rm -rf ios/build
rm -rf ~/Library/Developer/Xcode/DerivedData
Подробнее здесь: https://stackoverflow.com/questions/797 ... ithub-acti