Skip to content

Commit

Permalink
iOS README
Browse files Browse the repository at this point in the history
  • Loading branch information
MislavBagovic committed Jan 21, 2016
1 parent 15071b9 commit 0ad133b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions iOS/README
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];
```

0 comments on commit 0ad133b

Please sign in to comment.