react-native-ble-plx: Xcode 13 error builds

Hello,

I noticed my Xcode updated to 13 Screenshot 2021-09-22 at 16 07 46

And right after that I started getting this error at build:

Screenshot 2021-09-22 at 16 08 04 Screenshot 2021-09-22 at 16 08 25 Screenshot 2021-09-22 at 16 08 32 Screenshot 2021-09-22 at 16 08 40 Screenshot 2021-09-22 at 16 08 49

I run pod update

Downloading dependencies
Installing MultiplatformBleAdapter 0.1.7 (was 0.1.6)
Installing react-native-ble-plx 2.0.2 (was 2.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 81 dependencies from the Podfile and 71 total pods installed.

But same error

Any guess?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 20
  • Comments: 20 (2 by maintainers)

Most upvoted comments

  1. Install patch-package - npm i patch-package --save-dev
  2. Add this under patches patches/react-native-ble-plx+2.0.2.patch
diff --git a/node_modules/react-native-ble-plx/react-native-ble-plx.podspec b/node_modules/react-native-ble-plx/react-native-ble-plx.podspec
index def210f..0a92dcc 100644
--- a/node_modules/react-native-ble-plx/react-native-ble-plx.podspec
+++ b/node_modules/react-native-ble-plx/react-native-ble-plx.podspec
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
   s.compiler_flags = '-DMULTIPLATFORM_BLE_ADAPTER'

   s.dependency 'React'
-  s.dependency 'MultiplatformBleAdapter', '0.1.7'
+  s.dependency 'MultiplatformBleAdapter', '0.1.9'
 end
  1. Add yarn patch-package to your “postinstall” script in your package.json
{
  "scripts": {
    "postinstall": "yarn patch-package",
  }
}
  1. Add this to your Podfile
pod 'MultiplatformBleAdapter', :git => 'https://github.com/below/MultiPlatformBleAdapter', :tag => '0.1.9'

This points to a fork that @below released while we wait

More info in https://www.npmjs.com/package/patch-package, but basically you make whatever changes you need under node_modules then run npx patch-package <package you edited>. This generates a diff which then is expressed whenever you run yarn install. In this case, you just need to upgrade what MultiplatformBleAdapter cocoapod the react-native-ble-plx points to, from 0.1.7 to 0.1.9. 0.1.9 works with XCode 13, 0.1.7 doesn’t

Hi @wildseansy sorry to bother you but could you indicate what are the steps to follow to solve the error? Reading and replicating what was said in the thread you shared, I can’t solve the problem.

This has been fixed with the 2.0.3 release. You can close this issue.

Any roadmap for this bug?

Thanks for the heads up. Ill check that one!

Any news?

@diogoviannaaraujo - I forgot step 4. Update your podfile to point to new cocoapod and you’ll be good to go

  1. Add this to your Podfile