-
Notifications
You must be signed in to change notification settings - Fork 3
Home
This is the place to discuss development and contribution to c8osdk for iOS. You’ll find pages about coding style, project structure, release and running the tests.
- Get started
- Requirements
- Overview
- Adding a new feature, or bug fix
- Release for Cocoapods
- Release for react-native
-
The better way to understand convertigo's sdk is to read convertigo reference manual about SDKs.
-
You can also read Convertigo's programming guide
c8osdk-ios repository is divided in two parts:
- swift-cocoapods package => master branch
- react-native package => RNPackaging branch
Except to do specific changes for react-native packaging, every changes must be done into master and then merged on RNPackaging branch from master.
This is the main branch on which we are doing development, and add of new features...
We also release for swift-cocoapods from this branch
This branch use cocoapods to manage it's dependencies, with a basic podfile.
To work from this branch just type:
$ git clone [email protected]:convertigo/c8osdk-ios.git
$ cd c8osdk-ios
$ pod install
$ open C8oSDKiOS.xcworkspace
This is a secondary branch ... It's configured to works with react-native-c8osdk
Due to an uge number of bugs with cocoapods and react-native working together we have to handle this branch differently.
Basically they are few changes that must be done directly on this branch since it's have been configured properly to works with react-native-c8osdk package.
We are just applying merge of feature from master.
Whenever, you have to work on this branch, or just test changes after applying merge from master just type:
$ git clone [email protected]:convertigo/c8osdk-ios.git
$ cd c8osdk-ios
$ git checkout RNPackaging
$ git submodule update --init --recursive
$ open C8oSDKiOS.xcworkspace
In this branch we are using cocoapods structure, but not the tools. That means that the dependencies seems to be organized as with cocoapods but thats not the case. We have replaced the source brings backs from cocoapods by it's equivalent in linked git submodule, that helped us to manage the updates, and to let their repository getting the sources.
When you wants to update one of the dependencies, you just have to update git submodules from their repository.
for example, for SwiftyJSON:
$ cd Pods/SwiftyJSON
$ git reset --hard origin master
$ git pull origin master
$ git checkout VERSIONX
$ cd ../..
$ git add Pods/SwiftyJSON
$ git commit -am "Update SwiftyJSON to new Version: VERSIONX"
Exept from Coucbase-lite-ios 1.4.1 that have packaging issues and that is handled from this repository, that we handle ourself.
Basically adding a new feature will be done from a new branch checked out from master.
git checkout -b feature1
Then on this branch you can do every changes you have to do concerning the feature1.
When your feature, or bug fix seems to be implemented you must use C8oSDKiOSTests project to locally test it.
Once, the local test is passing successfully, you can push your local commits on the new branch.
This will automatically triggered the Travis CI that will test and compile the sdk in another environnement.
Finally when it's passed, then you can merge your change into the master branch.
Furthermore, you must transmit your changes from master branch into RNPackaging branch,and re play tests both locally and remotely using the same method than for the master branch, describe above.
When your changes have been done and properly tested like describe above, you can release a new version.
There is a few thing that you must do:
- Update C8oSDK.podspec
- By incrementing spec version
- By incrementing spec source tag version
- By incrementing (eventually) spec dependency version to fetch Podfile
- Think about spec swift_version
- Incrementing version number into getSdkVersion() method of C8o class
- Incrementing version number into Targets => C8oSDKiOS => General => Version
- Commit, tag and push
- You can test if the publication will be successfully by typing the following
$ cd PodSpec
$ pod spec lint --verbose --no-clean --allow-warnings
Once the lint passed successfully, then we can release the new version with the following command
The version number of C8oSDK.podspec must be formatted as X.X.X-betaX
$ pod trunk push
NB: --allow-warnings option can be used as in pod spec lint
$ pod trunk push
NB: --allow-warnings option can be used as in pod spec lint
When your changes have been done an propagated from master branch into RNPackaging branch
There is a few thing that you must do:
- test
- Update C8oSDK.podspec
- By incrementing spec version
- By incrementing spec source tag version
- By incrementing (eventually) spec dependency version to fetch Podfile
- Think about spec swift_version
- Incrementing version number into getSdkVersion() method of C8o class
- Incrementing version number into Targets => C8oSDKiOS => General => Version
- Commit, tag and push
The tag will be the release, and the other operations will be done into react-native-c8osdk wiki's