Skip to content

Commit c67a392

Browse files
authored
Merge pull request #36 from fuziki/fuziki-patch-1
Update README.md
2 parents 88bd172 + 7531011 commit c67a392

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@ iOS & macOS [Unity Native Plugin](https://docs.unity3d.com/Manual/NativePlugins.
2222
# Installation
2323
Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/UnityCoreBluetooth/releases) and install it in your project.
2424

25+
## Set Info.plist
26+
27+
Set **privacy - bluetooth always usage description** in Info.plist.
28+
You can also set it in PostProcessBuild.
29+
30+
```c#
31+
public class PostXcodeBuild
32+
{
33+
[PostProcessBuild]
34+
public static void SetXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
35+
{
36+
if (buildTarget != BuildTarget.iOS) return;
37+
var plistPath = pathToBuiltProject + "/Info.plist";
38+
var plist = new PlistDocument();
39+
plist.ReadFromString(File.ReadAllText(plistPath));
40+
var rootDict = plist.root;
41+
rootDict.SetString("NSBluetoothAlwaysUsageDescription", "use ble");
42+
File.WriteAllText(plistPath, plist.WriteToString());
43+
}
44+
}
45+
```
46+
2547
# Features
2648
- Peripheral
2749
- [x] Get name
@@ -39,11 +61,11 @@ Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/Uni
3961
# Usage
4062
## Example (Get Raw Value from Daydream Controller)
4163

42-
* SeeMore [SampleUser.cs](Examples/UnityExample/Assets/Scripts/SampleUser.cs)
64+
SeeMore [SampleUser.cs](Examples/UnityExample/Assets/Scripts/SampleUser.cs)
4365

4466
### About Daydream Controller
4567

46-
* Get raw value form Daydream controller
68+
Get raw value form Daydream controller
4769

4870
| Property | Target |
4971
|--|--|
@@ -53,7 +75,7 @@ Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/Uni
5375

5476
### 1. Get CoreBluetoothManager instance
5577

56-
* Get shared CoreBluetoothManager instance.
78+
Get shared CoreBluetoothManager instance.
5779

5880
```c#
5981
manager = CoreBluetoothManager.Shared;

0 commit comments

Comments
 (0)