-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MislavBagovic
committed
Jan 21, 2016
1 parent
15071b9
commit 0ad133b
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Spika iOS module | ||
|
||
- Example project compile instruction | ||
|
||
Clone project to your computer. | ||
Go to iOS folder | ||
run pod install (if you are not familiar with cocoapods visit https://cocoapods.org/) | ||
open Spika.xcworkspace with Xcode | ||
Build and run | ||
|
||
- Integrate in new or existing project instruction | ||
|
||
Only for new project: | ||
Create new single view application | ||
exit xcode | ||
run pod init (if you are not familiar with cocoapods visit https://cocoapods.org/) | ||
|
||
Continued for exististing projects: | ||
open Podfile in Spika/iOS folder & copy/paste pod dependancies to your Podfile in root of project | ||
run pod instal | ||
open YourProjectName.xcworkspace with Xcode | ||
Drag and drop Spika/iOS/Spika folder to your project in Xcode & check Copy items if needed option | ||
Open Info.plist file in your project and add new key NSAppTransportSecurity/NSAllowsArbitraryLoads = YES (temporarily to allow read from non https urls) | ||
|
||
To instantiate and show CSChatViewController use this code: | ||
|
||
``` | ||
#import "CSChatViewController.h" | ||
#import "CSConfig.h" | ||
|
||
NSDictionary *parameters = @{ | ||
paramUserID : @"your_user_id", | ||
paramName : @"your_user_name", | ||
paramAvatarURL : @"http://url_to_your_avatar.jpg", | ||
paramRoomID: @"Your_room_id" | ||
}; | ||
|
||
CSChatViewController *viewController = [[CSChatViewController alloc] initWithParameters:parameters]; | ||
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; | ||
[self presentViewController:navigationController animated:YES completion:nil]; | ||
|
||
//or if you have your navigation controller: | ||
//[self.navigationController pushViewController:viewController animated:YES]; | ||
``` |