Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
touren committed Oct 1, 2019
1 parent 05f8c53 commit 985f0cc
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ pod 'TwitterKit5'
```

**How to build and use the customized TwitterKit pod**
1. Open the DemoApp project and there is a sub project TwitterKit.
2. Select schema: TwitterKit ==> Generic iOS Device, `Clean`, `Run` and you get a TwitterKit.framework with architecture: armv7, arm64
3. Select schema: TwitterKit ==> any iOS Simulator, `Clean`, `Run` and you get a TwitterKit.framework with architecture: x86_64
4. Use `lipo` to merge above two framework into one, which include architecture: armv7, arm64, x84_64
```
lipo -create -output TwitterKit <Framework built in step 2>/TwitterKit <Framework built in step 3>/TwitterKit
```
Check the new TwitterKit is correct.
```
lipo -archs TwitterKit
```
Will return `x86_64 armv7 arm64 `
5. Replace the `TwitterKit` in framework created in step 2 with the merged one.
6. Create a folder `iOS`, move the framework folder in step 5 inside, zip the `iOS` folder and you get TwitterKit pod zip file.
7. Upload the zip file somewhere and get a [URL](https://swarm-dev.s3.amazonaws.com/pods/twitterkit/ios/5.0.0/TwitterKit.zip) points to it.
8. Change your [podspec file](https://raw.githubusercontent.com/touren/twitter-kit-ios/Swift5/TwitterKit/TwitterKit.podspec) as: s.source = { :http => "<URL created in step 7>" }
9. Change your Podfile as: `pod "TwitterKit"` ==> `pod "TwitterKit", :podspec => "<URL point to the podspec created in step 8>"`
1. Build TwitterKit.zip. In the root folder of the project, run
```
./build.sh
```
2. Upload the TwitterKit.zip file somewhere and get a [URL](https://swarm-dev.s3.amazonaws.com/pods/twitterkit/ios/5.0.0/TwitterKit.zip) points to it.
3. Change your [podspec file](https://raw.githubusercontent.com/touren/twitter-kit-ios/Swift5/TwitterKit/TwitterKit.podspec) as: s.source = { :http => "<URL created in step 2>" }
4. Change your Podfile as: `pod "TwitterKit"` ==> `pod "TwitterKit", :podspec => "<URL point to the podspec created in step 8>"`


**How to build and push to CocoaPods TwitterKit5**
1. Build TwitterKit.zip. In the root folder of the project, run
```
./build.sh
```
2. Release a new version in [GitHub](https://github.com/touren/twitter-kit-ios/releases), say 5.0.2, upload the TwitterKit.zip just built.
3. Update TwitterKi5.podspec, make sure `s.version` and `s.source` is correct.
4. Deploy to [CocoaPods Trunk](https://guides.cocoapods.org/making/getting-setup-with-trunk.html)
```
pod trunk push TwitterKi5.podspec
```

----

Expand Down

0 comments on commit 985f0cc

Please sign in to comment.