XCode 13 & react-native-ble-plx troubleshootings

XCode 13 Build Error

Lee young-jun
4 min readOct 3, 2021

When I updated XCode to version 13.
I met this trouble.

MultiplatformBleAdapter 0.1.9

However we can see that MultiplatformBleAdapter is already patched for XCode 13.

And the patched version is 0.1.9

But we can’t see 0.1.9 when run ‘pod update’

So I tried to specify version of MultiplatformBleAdapter to 0.1.9 at react-native-ble-plx’s settings.

react-native-ble-plx/ios/Podfile
react-native-ble-plx.podspec

I couldn’t update to 0.1.9.

Let’s see what’s problem.

pod search MultiplatformBleAdapter --simple

There is no 0.1.9!! What’s wrong?

Alternative Pod library

You can find alternative forked libraries out at CocoaPods website.

Let’s apply one of alternative libraries.
I choose SBMultiplatformBleAdapter.

react-native-ble-plx/ios/Podfile
react-native-ble-plx/ios/BleClient.m
react-native-ble-plx.podspec

Fork MultiplatformBleAdapter

If you want to have your own Pods MultiplatformBleAdapter,
fork the library to your repository.

In my case, I renamed MultiplatformBleAdapter to KMultiplatformBleAdapter

KMultiplatformBleAdapter.podspec

Your forked Pod library already have tag 0.1.9.
So we have to delete it first.

And make new 0.1.9 tag with this modification(renaming).

Of course you should push the tag forcely

git push --tags --force

Publish your own Pods library

You can’t use your MultiplatformBleAdapter yet.

Register CocoaPods session

First your have to register your machine to publishing Pods.

pod trunk register {your email} ‘Young-jun’ — description=’macbookhome’

Then, you would receive a confirmation email from CocoaPods.

Publish CocoaPods

Next, run pod trunk push.

pod trunk push KMultiplatformBleAdapter.podspec --allow-warnings

Now you have your own CocoaPods MultiplatformBleAdapter?

However you would see this error when searching. What’s wrong??

Update CocoaPods Specs

You have to update CocoaPods specs. run this command

pod repo update

Unfortunately this is not end.

Fork NPM react-native-ble-plx

To use new MultiplatformBleAdapter, you have to modify react-native-ble-plx.

Replace MultiplatformBleAdapter to your MultiplatformBleAdapter

react-native-ble-plx.podspec
react-native-ble-plx/ios/Podfile
react-native-ble-plx/ios/BleClient.m

And push modification.

Install your react-native-ble-plx

So how to use your own react-native-ble-plx in your app?

Open package.json of your app. And replace react-native-ble-plx’s version(2.0.2) to your forked react-native-ble-plx.
Input url of your forked react-native-ble-plx except https://github.com

your app source/package.json

Install your new react-native-ble-plx and update Pods.
You will see your MultiplatformBleAdapter is installed.

Yarn install
pod update

Congratulation!

Now you can use react-native-ble-plx with XCode 13.

Watch new update

By watching, you receive notification for new update of react-native-ble-plx.

--

--

No responses yet