My app now builds fine for iOS and android and push notifications are working end to end on android, but I cannot register for notifications on iOS due to the error above.
I have tried passing options into the register function call specifically for iOS as outlined in the docs, still gets the same error. I have also tried upgrading to various versions of React, 0.64x, 0.66xx, and 0.69.x, and the error still persists. I have tried entirely cleaning my project, wiping all the pods, node_modules, etc., and reinstalling all my packages and pods, and the error still persists.
Full error message:
I am getting the error above only on iOS upon calling
Notifications.registerRemoteNotifications();
orNotifications.ios.registerRemoteNotifications();
This started with not even being able to build to android or iOS. I was getting the same error outlined in this currently open issue: https://github.com/wix/react-native-notifications/issues/851
I finally fixed that by using a solution from a comment in #851, the fork described here: https://github.com/wix/react-native-notifications/issues/851#issuecomment-1209219640
My app now builds fine for iOS and android and push notifications are working end to end on android, but I cannot register for notifications on iOS due to the error above.
I have tried passing options into the register function call specifically for iOS as outlined in the docs, still gets the same error. I have also tried upgrading to various versions of React, 0.64x, 0.66xx, and 0.69.x, and the error still persists. I have tried entirely cleaning my project, wiping all the pods, node_modules, etc., and reinstalling all my packages and pods, and the error still persists.
My package.json:
"dependencies": { "@emotion/native": "^11.0.0", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-native-async-storage/async-storage": "^1.17.0", "@react-native-community/art": "^1.2.0", "@react-native-community/netinfo": "6.0.0", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/drawer": "^6.3.1", "@react-navigation/elements": "^1.3.1", "@react-navigation/material-bottom-tabs": "^6.0.9", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", "@types/react-native-vector-icons": "^6.4.10", "appcenter": "4.4.3", "appcenter-analytics": "4.4.3", "appcenter-crashes": "4.4.3", "compare-versions": "^5.0.1", "date-fns": "^2.28.0", "fbjs": "^3.0.4", "react": "17.0.1", "react-content-loader": "^6.1.0", "react-dom": "17.0.2", "react-native": "0.66.1", "react-native-app-auth": "^6.4.3", "react-native-autocomplete-input": "^5.1.0", "react-native-blob-util": "^0.14.1", "react-native-collapsible": "^1.6.0", "react-native-config": "^1.4.5", "react-native-currency-input": "^1.0.1", "react-native-date-picker": "^4.2.0", "react-native-device-info": "^8.7.0", "react-native-dotenv": "^3.3.1", "react-native-dropdown-picker": "^5.3.0", "react-native-file-viewer": "^2.1.5", "react-native-fs": "^2.19.0", "react-native-gesture-handler": "^2.2.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-modal": "^13.0.1", "react-native-notifications": "https://github.com/escolaemmovimento/react-native-notifications.git", "react-native-paper": "^4.11.2", "react-native-pdf": "^6.4.0", "react-native-reanimated": "^2.4.1", "react-native-safe-area-context": "3.3.2", "react-native-screens": "~3.10.1", "react-native-simple-gauge": "^0.3.1", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^12.1.1", "react-native-svg-transformer": "^1.0.0", "react-native-toast-message": "^2.1.5", "react-native-vector-icons": "^9.0.0", "react-native-web": "0.17.1", "toggle-switch-react-native": "^3.3.0", "use-count-up": "^3.0.1", "zustand": "^3.6.9" }, "devDependencies": { "@babel/core": "^7.12.9", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^2.0.0", "@types/jest": "^26.0.23", "@types/react-native": "^0.66.15", "@types/react-native-autocomplete-input": "^5.0.0", "@types/react-native-fetch-blob": "^0.10.7", "@types/react-test-renderer": "^17.0.1", "@typescript-eslint/eslint-plugin": "^5.7.0", "@typescript-eslint/parser": "^5.7.0", "babel-jest": "^26.6.3", "eslint": "^7.14.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.66.2", "react-native-clean-project": "^4.0.0", "react-test-renderer": "17.0.2", "typescript": "^4.4.4" }, "resolutions": { "@types/react": "^17" }, "jest": { "preset": "react-native", "moduleFileExtensions": [ "ts", "tsx", "js", "jsx", "json", "node" ] } }