Issue
Issue:
IOS App crashes instantly after opening.
This is the error in the crash log:
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/OpenSSL.framework/OpenSSL
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/8300BCCD-E28D-4452-AD15-90C82C862880/data/Containers/Bundle/Application/3C33DD5C-7A01-4159-897C-0784DB001AA4/MyDay.app/MyDay
Reason: tried: '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/OpenSSL.framework/OpenSSL' (no such file), '/usr/lib/swift/OpenSSL.framework/OpenSSL' (no such file), '/Users/yit/Library/Developer/CoreSimulator/Devices/8300BCCD-E28D-4452-AD15-90C82C862880/data/Containers/Bundle/Application/3C33DD5C-7A01-4159-897C-0784DB001AA4/MyDay.app/Frameworks/OpenSSL.framework/OpenSSL' (no such file), '/Users/yit/Library/Developer/CoreSimulator/Devices/8300BCCD-E28D-4452-AD15-90C82C862880/data/Containers/Bundle/Application/3C33DD5C-7A01-4159-897C-0784DB001AA4/MyDay.app/Frameworks/OpenSSL.framework/OpenSSL' (no such file), '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resource
(terminated at launch; ignore backtrace)
React Native ver: 0.64
Mac m1, ver 14.1 (also happened with 13)
Xcode ver 15.0.1 (also happened with 14.3.1)
info that might be useful:
- It only crashes after manually opening it by clicking the app icon. when launching the app via the play button on xcode it works.
- Doesnt happen when installed via test flight
What i tried:
deleting node_modules and yarn.lock and reinstalling.
deleting pods and pods.lock and reinstalling
restarting everything
upgrading mac and xcode
going back to untouched branch (master)
Link Binary With Libraries
package.json:
{
"name": "MyDay",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "adb reverse tcp:8081 tcp:8081 && yarn start",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"postinstall": "npx react-native-fix-image",
"clean": "react-native-clean-project",
"watchman-clen": "watchman watch-del-all ",
"bundle-aab": "cd android && ./gradlew bundleRelease"
},
"dependencies": {
"@react-native-community/async-storage": "^1.9.0",
"@react-native-community/checkbox": "^0.4.2",
"@react-native-community/cli": "^5.0.1-alpha.2",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/masked-view": "^0.1.9",
"@react-native-community/netinfo": "^5.9.9",
"@react-native-community/push-notification-ios": "^1.9.0",
"@react-native-community/toolbar-android": "^0.2.1",
"@react-native-firebase/app": "^16.4.6",
"@react-native-firebase/messaging": "^16.4.6",
"@react-navigation/bottom-tabs": "^6.0.0",
"@react-navigation/material-bottom-tabs": "^5.3.17",
"@react-navigation/material-top-tabs": "^5.1.9",
"@react-navigation/native": "^6.0.1",
"@react-navigation/stack": "^5.2.11",
"axios": "^0.19.2",
"fbjs": "^3.0.4",
"formik": "^2.1.4",
"i18next": "^19.6.0",
"lodash": "^4.17.20",
"moment": "^2.24.0",
"moment-timezone": "^0.5.31",
"patch-package": "^6.2.2",
"postinstall-postinstall": "^2.1.0",
"querystring": "^0.2.0",
"react": "17.0.1",
"react-i18next": "^11.7.0",
"react-native": "0.64.4",
"react-native-android-location-enabler": "^1.2.2",
"react-native-autolink": "^4.1.0",
"react-native-background-fetch": "4.0.3",
"react-native-background-geolocation": "^4.9.4",
"react-native-blob-util": "^0.14.1",
"react-native-calendar-picker": "^6.0.6",
"react-native-confirmation-code-field": "^7.1.0",
"react-native-device-info": "^5.5.6",
"react-native-flipper": "^0.96.1",
"react-native-gesture-handler": "^2.8.0",
"react-native-hyperlink": "^0.0.19",
"react-native-keep-awake": "^4.0.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-loading-spinner-overlay": "^1.1.0",
"react-native-localize": "^1.4.1",
"react-native-map-link": "^2.7.15",
"react-native-material-dropdown": "https://github.com/noway/react-native-material-dropdown",
"react-native-modal": "^11.5.6",
"react-native-orientation-locker": "^1.4.0",
"react-native-otp-verify": "^1.0.4",
"react-native-paper": "^3.12.0",
"react-native-pdf": "^6.4.0",
"react-native-push-notification": "8.1.1",
"react-native-rate": "^1.2.1",
"react-native-reanimated": "^2.2.0",
"react-native-restart": "^0.0.15",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.4.0",
"react-native-sound": "^0.11.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.0",
"react-native-switch": "^2.0.0",
"react-native-tab-view": "^2.14.0",
"react-native-vector-icons": "^6.7.0",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-flipper": "^1.4.2",
"redux-saga": "^1.1.3",
"rn-material-ui-textfield": "^1.0.2",
"styled-components": "^5.1.0",
"yup": "^0.28.4"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/runtime": "^7.9.2",
"@react-native-community/eslint-config": "^1.1.0",
"babel-jest": "^25.4.0",
"eslint": "^6.8.0",
"jest": "^25.4.0",
"metro-react-native-babel-preset": "^0.59.0",
"react-native-clean-project": "^3.6.3",
"react-native-svg-transformer": "^0.14.3",
"react-test-renderer": "16.11.0"
},
"jest": {
"preset": "react-native"
}
}
Podfile:
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-permissions/scripts/setup'
platform :ios, '12.0'
target 'MyDay' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
target 'MyDayTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
end
target 'MyDay-tvOS' do
# Pods for MyDay-tvOS
target 'MyDay-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
def fix_library_search_paths(installer)
def fix_config(config)
lib_search_paths = config.build_settings["LIBRARY_SEARCH_PATHS"]
if lib_search_paths
if lib_search_paths.include?("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") || lib_search_paths.include?("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1)
# since the libraries there are only built for x86_64 and i386.
lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)")
lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
if !(lib_search_paths.include?("$(SDKROOT)/usr/lib/swift") || lib_search_paths.include?("\"$(SDKROOT)/usr/lib/swift\""))
# however, $(SDKROOT)/usr/lib/swift is required, at least if user is not running CocoaPods 1.11
lib_search_paths.insert(0, "$(SDKROOT)/usr/lib/swift")
end
end
end
end
projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
.push(installer.pods_project)
projects.each do |project|
project.build_configurations.each do |config|
fix_config(config)
end
project.native_targets.each do |target|
target.build_configurations.each do |config|
fix_config(config)
end
end
project.save()
end
end
# ⬇️ uncomment wanted permissions
setup_permissions([
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
])
Solution
Fixed.
pod deintegrate > pod install
Answered By - Adri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.