I am implementing ios chat application i have client side coding, how to send the text to receiver side using Mysqlite with PHP.
Please assist me.
Thanks in advance
Not exactly sure what you're looking for, but this is a good tutorial introducing you to NSURLSession in iOS 7. That shows you how you can post requests to a web server and deal with data coming back. Handling the request on the server side with PHP is pretty straight-forward; you treat it like you would a normal form.
Related
I am really stuck and I need your help.
I am working on my web and iOS application. I used also Django to save users to database.
Login function is already working on my web (HTML) but I really don ´t know how to create function to iOS app (Swift).
I enclose also screens of Api HTML and Swift Code. Now it's working only with Facebook. User can sign in using Facebook and order something using iOS App.
I would really like to do the same but with Login Function (not using FB). I hope you can help me. I don't know how to do it and I've read a lot of web.
I would be really glad to you if you can help me.
Please HELP !
Thank you so much.
Image 1 - HTML Urls
Image 2 - Apis
Image 3 - Forms
Image 4 - social_auth_piplines
Image 5 - Models
Image 6 - Swift Apis
This is very broad. There is a lot of questions that need to be answered before I can provide a solid answer but I'll give you an idea on what you have to do.
API
First of all you need an api that serializes the data from your database so it acts as a layer between your app and backend. If you are using Django then take a look at Django Rest Framework which will help you achieve that.
Networking Framework
After setting up your api you need a networking layer in Swift to help you communicate with your api. You can use Swift's URLSession or you can download Alamofire to make things a bit simpler. What a networking layer basically does is fetch the json provided by your Django app and changes it to a Dictionary so you can use it.
In your django Application, you are to specify restframework Authentication to Token. You can get more info about token with django rest auth.
In your iOS.What you need to do is create an AuthServices model. Now in your AuthServices model, you create your login function.
For your login function I assume you are very familiar with Alamofire so you make an API request which would take your parameters and your header which I assume contains a token should also be specified.
Keep your server running and run the application locally if you wish and take username and password with text fields. This should help you go on with it.
I am new in developing iOS applications. I like to learn communication between my app and a specific back-end server(which is written in ruby). I would like to learn how to read, fetch and modify data on the back-end server? I do not have any idea where I should start? I am very welcome if you could refer me to any online resource/tutorial for this topic.
First, you have to create an API in ruby. Here is a tutorial on how to do it: https://www.codeschool.com/courses/surviving-apis-with-rails.
After that, when you are sure that your API is working correctly, you can write a service for HTTP communication. You can do it by yourself, but in my opinion, a much better option would be using the third party for that. I prefer using AFNetworking: https://github.com/AFNetworking/AFNetworking.
You can also use Heroku. First you can create your API and make some tests then implement to your server.
I am trying to automate a native iOS app, which involves a customer sending a request and a sales representative receives the request and responds.
Which tool should I use?
I want to run some UI specific test cases too.
Most automating tools don't support a request and response based app.
Please help.
Thanks
AFNetworking is probably the most used solution for response/request (REST api) applications. It is open source, actively maintained and can be found here.
Also it is pretty easy to implement and has well written documentation.
Hey guys Im currently working on ios application which is requesting data using SOAP. Till this point i have been using ASIHTTPRequest to send request and handle response. But i realy can't get client certificate working (yes, i tried replacing code in if-statement in asihttprequest.m, and i also fixed many other bugs).
So due to this problem and to fact, this framework is not longer supported i have decided to use another framework. I am thinking about AFNetworking but it doesnt realy seem easy to use this one for SOAP and im not realy into overriding its method beacause im realy new to this whole apple/objective-c platform.
So what are you guys suggesting ? What is best way to send SOAP requests (and handle responses) to WS with client certificate ?
OK, i've abandoned any 3rd party libraries and wrote the whole web service interface using NSURLConnection and NSMutableRequest. It was foolish to depend on 3rd party software. It is most definitely way to go, especially if you want to use client certificate you can use
-(void)connection:(NSURLConnection *)con didReceiveAuthenticationChallenge ....
I'm building a Rails app where I need a real time commenting system. I'm going to use WebSockets, but I'm new to them and I'm kinda lost. I tried em-websockets and websocket-rails, but neither worked well with what I have to do. I also though of a Node.JS and Socket.io app, but I don't know how to start with that.
What I want to do is send a WebSocket message when a new comment is made on a post, on the create action of my CommentsController. I'll send a message containing the comment content and creator and the post ID.
Thanks in advance! :D
Sorry, but I dont think so. Be careful with WebSockets. It is fundamental concept that provides a very powerful mechanism.
Websockets is good for super, absolutely real-time applications like online games. For commenting system (even realtime) you dont need them, the AJAX is more then enought for this.
You could use a realtime hosted service if you don't want to deal with your own realtime infrastructure, fallbacks for older browsers, scaling complications etc.
I recently wrote a post on Smashing Mag on building a realtime commenting system. It uses PHP and Pusher (who I work for) but the separation between client and server should meant that you could use any backend technology/service. It also demonstrates how to progressively enhance your app.
The most commonly used self-hosted ruby technologies for realtime communication does seem to be Faye, as #Alfred suggested.
Just using websockets as the only available transport is not a good idea, because websockets are not yet supported in every browser. Luckily for example Faye does support multiple transports so that it will work in every browser. I also found this interesting video in the past explaining how you could use Faye in conjunction with RoR from RailsCast.