Skip to content

Commit 8e561cb

Browse files
authored
Update README.md
1 parent e43a173 commit 8e561cb

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,43 @@ $(SRCROOT)/Carthage/Build/iOS/SendBirdSDK.framework
114114

115115
> __Note__: The SendBirdUIKit Carthage built created in the latest Swift version. So, if the latest Swift environment is not configured, you need to copying the framework into the project manually.
116116
117+
#### Unknown attribute error handling
118+
In Xcode 11.3 or earlier, there is a problem that build is impossible due to the following two errors.
119+
120+
```basg
121+
- Unknown attribute '_inheritsConvenienceInitializers'
122+
- Unknown attribute '_hasMissingDesignatedInitializers'
123+
```
124+
125+
This is due to the two annotation processing newly applied by Apple's Swift, and an error occurs because it is not a built-in function in Xcode 11.3 or earlier.
126+
127+
If this problem occurs, you can use the Framework normally after removing annotation by referring to the following procedure.
128+
129+
This method removes the annotations that have problems in the swiftinterface that is automatically generated in the framework by executing the script in the build step in advance.
130+
131+
1. Open the `edit scheme` menu of the project target.
132+
133+
2. Select the `Build > Pre-actions` menu and add `new run script action`
134+
135+
3. After adding the script below, select the target to apply the script.
136+
137+
```bash
138+
# Cocoapods
139+
if [ -d "${PROJECT_DIR}/Pods/SendBirdUIKit" ]; then
140+
find ${PROJECT_DIR}/Pods/SendBirdUIKit/SendBirdUIKit.framework/Modules/SendBirdUIKit.swiftmodule/ -type f -name '*.swiftinterface' -exec sed -i '' s/'@_inheritsConvenienceInitializers '// {} +
141+
find ${PROJECT_DIR}/Pods/SendBirdUIKit/SendBirdUIKit.framework/Modules/SendBirdUIKit.swiftmodule/ -type f -name '*.swiftinterface' -exec sed -i '' s/'@_hasMissingDesignatedInitializers '// {} +
142+
fi
143+
144+
# Carthage
145+
if [ -d "${PROJECT_DIR}/Carthage/Build/iOS/SendBirdUIKit.framework" ]; then
146+
find ${PROJECT_DIR}/Carthage/Build/iOS/SendBirdUIKit.framework/Modules/SendBirdUIKit.swiftmodule/ -type f -name '*.swiftinterface' -exec sed -i '' s/'@_inheritsConvenienceInitializers '// {} +
147+
find ${PROJECT_DIR}/Carthage/Build/iOS/SendBirdUIKit.framework/Modules/SendBirdUIKit.swiftmodule/ -type f -name '*.swiftinterface' -exec sed -i '' s/'@_hasMissingDesignatedInitializers '// {} +
148+
fi
149+
```
150+
151+
4. Now build & run and you can see that the problem is solved.
152+
153+
117154
---
118155

119156
### Get attachment permission

0 commit comments

Comments
 (0)