Dev-Client Crashes When Building JS Bundle After Adding Native Package + Config Plugins
See original GitHub issueSummary
I am trying to use Bluetooth Classic on iOS with react-native-bluetooth-classic along with a basic config plugin I wrote. Since running ‘expo add react-native-bluetooth-classic’, when I create a dev-client and scan the QR code, the bundle crashes immediately without errors.
GitHub: https://github.com/amitferman/bluetooth-classic-demo
Managed or bare workflow? If you have made manual changes inside of the ios/
or android/
directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
iOS
Package versions
expo-dev-client: 0.4.7 expo: 42.0.3 eas-cli: 0.23.0
Environment
Expo CLI 4.10.0 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 14.17.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7486908 npmPackages: expo: ~42.0.1 => 42.0.3 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: ~0.63.4 => 0.63.4 react-native-web: ~0.13.12 => 0.13.18 Expo Workflow: bare
Reproducible demo or steps to reproduce from a blank project
expo init bluetooth-classic-demo cd bluetooth-classic-demo expo add expo-dev-client expo add react-native-bluetooth-classic …At this point the dev client can’t open the bundle Then I added in bluetooth-classic-plugin.js to configure info.plist …Same behavior
Stacktrace (if a crash is involved)
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Sweet. Works for me, too! Good job.
From: amitferman @.> Sent: Wednesday, August 18, 2021 5:44 PM To: expo/expo @.> Cc: Vivek Pai @.>; Comment @.> Subject: Re: [expo/expo] Dev-Client Crashes When Building JS Bundle After Adding Native Package + Config Plugins (#14021)
Aha! This works. What was I thinking 7 days ago 😆. The complete plugin is: const withBLC = (config) => { // Ensure the objects exist if (!config.ios) { config.ios = {}; } if (!config.ios.infoPlist) { config.ios.infoPlist = {}; } config.ios.infoPlist.UISupportedExternalAccessoryProtocols = [‘com.apple.m1’]; config.ios.infoPlist.NSBluetoothPeripheralUsageDescription = “Some Description (PeripheralUsage)”; config.ios.infoPlist.NSBluetoothAlwaysUsageDescription = “Some Description (AlwaysUsage)”; return config; };
module.exports = withBLC;
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fexpo%2Fexpo%2Fissues%2F14021%23issuecomment-901523023&data=04|01||5ba0f3d87e394d1c815508d962aa6a1a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637649306322680251|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=C0wHoRcwUrkSbD%2FE4oYj6oVgUFkeBi58EogSS57Pet0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAACFT242PP2EVDSKNNYERGLT5RHUNANCNFSM5B72ZTGQ&data=04|01||5ba0f3d87e394d1c815508d962aa6a1a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637649306322690245|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=p7TIf3SGp%2FTq9MyVbT8fvo84b%2BgTIcO%2BkI%2FaM0rHjaU%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04|01||5ba0f3d87e394d1c815508d962aa6a1a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637649306322690245|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=kSg4heZDuxkboICdrJm%2Byq5xlBcsSOQf2rzHmeRgBdU%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26utm_campaign%3Dnotification-email&data=04|01||5ba0f3d87e394d1c815508d962aa6a1a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637649306322700239|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=3xPzD7rteVg5lVaFB7%2BzDVcUuCAdTxyDmso%2BDS1ty7s%3D&reserved=0.
@vivek-pai You can also use
with-rn-bluetooth-classic
and it might be more convenient.