Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swift Package Manager Support #68

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Xcode
build/
.build/
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -18,6 +19,7 @@ profile
DerivedData
*.hmap
*.ipa
Package.resolved

# Generated files
VersionX-revision.h
Expand Down
12 changes: 6 additions & 6 deletions OpenIMSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,38 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '11.0'

s.source_files = 'OpenIMSDK/OpenIMSDK.{h,m}'
s.source_files = 'Sources/OpenIMSDK/OpenIMSDK.{h,m}'


s.subspec 'Utils' do |ss|
ss.source_files = 'OpenIMSDK/Utils/*.{h,m}'
ss.source_files = 'Sources/OpenIMSDK/Utils/*.{h,m}'
end

s.subspec 'CallbackProxy' do |ss|
ss.dependency 'OpenIMSDK/Utils'

ss.source_files = 'OpenIMSDK/CallbackProxy/*.{h,m}'
ss.source_files = 'Sources/OpenIMSDK/CallbackProxy/*.{h,m}'
end

s.subspec 'Model' do |ss|
ss.dependency 'OpenIMSDK/Utils'

ss.source_files = 'OpenIMSDK/Model/*.{h,m}'
ss.source_files = 'Sources/OpenIMSDK/Model/*.{h,m}'
end

s.subspec 'Interface' do |ss|
ss.dependency 'OpenIMSDK/Model'
ss.dependency 'OpenIMSDK/CallbackProxy'
ss.dependency 'OpenIMSDK/Callbacker'

ss.source_files = 'OpenIMSDK/Interface/*.{h,m}'
ss.source_files = 'Sources/OpenIMSDK/Interface/*.{h,m}'
end

s.subspec 'Callbacker' do |ss|
ss.dependency 'OpenIMSDK/Model'
ss.dependency 'OpenIMSDK/Utils'

ss.source_files = 'OpenIMSDK/Callbacker/*.{h,m}'
ss.source_files = 'Sources/OpenIMSDK/Callbacker/*.{h,m}'
end

valid_archs = ['armv7s','arm64','x86_64']
Expand Down
29 changes: 29 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version:5.5
import PackageDescription

let package = Package(
name: "OpenIMSDK",
platforms: [
.iOS(.v11)
],
products: [
.library(name: "OpenIMSDK", targets: ["OpenIMSDK"])
],
dependencies: [
.package(url: "https://github.com/CoderMJLee/MJExtension.git", from: "3.0.0")
],
targets: [
.target(
name: "OpenIMSDK",
dependencies: [
"MJExtension"
],
path: "Sources",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".")
]
)
],
cxxLanguageStandard: .cxx14
)
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ For the SDK reference, see [Quick Start guide](https://docs.openim.io/sdks/quick

### Adding Dependencies

```ruby
pod 'OpenIMSDK'
```swift
// swift-tools-version:5.5
import PackageDescription

let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/bc1pjerry/open-im-sdk-ios.git", from: "4.0.0"),
]
)
```

## Usage 🚀
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.