Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Web, HTML, XML & Services

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Oct 22, 2008 1:36 am    Post subject: Web, HTML, XML & Services Reply with quote

SO - Best way to use XML-RPC in Cocoa application?

"I wanted to write a GUI-wrapper for an application which uses XML-RPC and
wondered if there are any XML-RPC frameworks available for Cocoa and if so
what's the best?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Oct 22, 2008 1:38 am    Post subject: Reply with quote

iphonedevsdk.com - Resolved: How to Call a SOAP Service

"Like many others I wrote an app that was heavily dependent on asp.net
SOAP web services that worked great in the simulator and then got hit with
the surprise that the CoreServices library that contained all the web service
functionality wasn't actually available on the iPhone."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Thu Jan 29, 2009 6:31 pm    Post subject: Reply with quote

digg - Apple Approved iPhone Inter-process Communication

"So what, now apps can be launched with arguments, and can register
protocols? This is definitely not new technology, and calling it "cross-app
communication" is probably an overstatement. But it certainly is a need-
ed feature for developers, so props to Apple for implementing it."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Apr 29, 2009 9:46 pm    Post subject: Reply with quote

MF - Connecting to a SOAP web service

"This web service has two functions: Sum and Product. They each accept two
numeric arguments and return, you guessed it, the sum or product of the
two values. The web service works fine from a Microsoft app but I can't get it
to work from my Objective-C app. I'm using code I copied from this forum
and have modified, but clearly my modification is wrong The web service is
being activated but it always returns an answer of zero which makes me su-
spect the parameters aren't being passed in correctly."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Mon Jun 08, 2009 4:24 pm    Post subject: Reply with quote

iphonedevsdk.com - Does webview open hyperlinks which
contains another HTML page?


"But actually I would like to navigate to new HTML page only for particular
link, but using this code I am moving to new page for each and every link."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Fri Jun 12, 2009 10:27 pm    Post subject: Reply with quote

iphonedevsdk.com - Web Services Question

"Let's also stick with GET requests only to help simplify stuff.

1. Inside the iPhone app, you'll create a NSURLConnection with a NSURL that
points to youre webservice url. Append all of the needed parameters to the
end of the url that you'll need to pass to the webservice. (Now from within
the webservice, we can retrieve param1 and param2 and possibly use it to
query the database or whatever)

2. ..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat Jun 13, 2009 8:48 pm    Post subject: Reply with quote

cocoadev.com - HTTPFileUploadSample

"This sample code shows how to upload a file from a Cocoa application using
HTTP POST. This code is meant to make it as easy as possible to upload files
to your own webserver."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat Jun 13, 2009 9:35 pm    Post subject: Reply with quote

iphonedevforums.com - Trying to connect to my server!

"You'll need to use an NSURLConnection to connect to your server.

You'll then need to implement the following delegate methods in the cur-
rent class:


Code:
view plaincopy to clipboardprint?
- (void)connection:(NSURLConnection *)connection
didFailWithError:(NSError *)error;
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response;
- (void)connectionDidFinishLoading:(NSURLConnection *)connection;

These methods will be triggered at various points in the downloading pro-
cess by the background thread that is actually doing the downloading."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat Jun 13, 2009 9:41 pm    Post subject: Reply with quote

markj.net - UITables with Downloaded Images - Easy Asynchronous
Code


"How can you have your cake and eat it too? ... When you use the URL load-
ing system’s asynchronous APIs, the iPhone uses a different thread than the
one running your app’s event loop to load the contents of the URL, and it ma-
kes callbacks via your apps event loop when data has been downloaded."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Tue Jun 23, 2009 6:55 pm    Post subject: Reply with quote

MF - Problem with NSXMLParser and NSMutableArray

"I have tried some days now to write an app where I use the NSXMLParser...
My problem is, that no matter how I try, the NSMutableArray I use to store
the data is remaining empty."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jul 06, 2009 8:07 pm    Post subject: Reply with quote

MF - Problem calling web service from another class

"I am taking reference from Hello_Soap Example. Whenever I call a web ser-
vice as shown in example it works fine and calls following methods internally."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Jul 08, 2009 11:23 am    Post subject: Reply with quote

SO - Parsing XML in Cocoa

"Once you get the hang of it, NSXMLParser is pretty easy to use. It is a SAX
Parser, which means it's event-driven parser. It finds stuff, and it tells you
about it."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Jul 09, 2009 3:03 pm    Post subject: Reply with quote

MF - Regular Expression problem grabbing data from html page

"Since you seem to know where the stuff is you are looking for there is not
even a need for a regex here. It is just token matching. And since I just fo-
und out about these nifty scanner things you can do this..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jul 13, 2009 1:03 am    Post subject: Reply with quote

MF - Free currency web service

"Hi guys, I was wondering how apps like Convertbot get their currency ex-
change rates off the web (supposing that this is in fact what they're doing).
Does anyone know any free web services that offer currency exchange ra-
tes?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Tue Jul 21, 2009 4:59 pm    Post subject: Reply with quote

MF - Sending pictures with NSURLRequest

"There are two pages on CocoaDev about this. Might be of some help.
HTTPFileUpload and POSTMethodANDNSURLRequest."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Tue Aug 11, 2009 9:05 pm    Post subject: Reply with quote

iphonedevsdk.com - Developing a webserver

"Is there a way to run a webserver in iPhone? Can i make it one? I want to
create an app that runs the server and then, going in Safari, you can see the
server content...is that possible? Are there any wys to do that respecting the
iPhone SDK terms and conditions?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Mon Aug 17, 2009 2:41 pm    Post subject: Reply with quote

cocoawithlove.com - A simple, extensible HTTP server in Cocoa

"The application is very simple: you can edit text and save it to a file (it is
always saved to the same file).

While the application is running, it also runs an HTTP server on port 8080. If
the path "/" is requested, it will return the content of the saved file. All other
requests return a 501 error."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Fri Aug 21, 2009 3:06 pm    Post subject: Reply with quote

forums.pragprog.com - Parsing HTML

"I am reading some HTML and trying to pull out some specific data. I’m loo-
king for all the links that are tagged as <a name="x1">, <a name="x2">,
etc. I want to get the text between the anchor tags, so if the example was
<a name="x1">Click Here</a>, I would want to get the “Click Here” text."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Aug 24, 2009 11:15 pm    Post subject: Reply with quote

iana.org - MIME Media Types

"The following is the list of Directories of Content Types and Subtypes: appli-
cation, audio, example, image, message, model, multipart, text, video."


HOWTO: Serving up default favicon.ico and robots.txt files with apache

"As a webmaster, or system administrator of an Apache webserver, did you
ever wonder how to stop those annoying 404 (page not found) errors for all
the requests for favicon.ico and robots.txt?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Thu Sep 03, 2009 2:51 pm    Post subject: Reply with quote

mf - Hillegass Chapter 28 - code to calculate amazon signature

"It seems like there is a chance to go via Amazon API signing service.

The old way stopped to work 15 of August, bad luck."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Fri Sep 11, 2009 12:48 am    Post subject: Reply with quote

Bill Dudney - libxml2 Push Parsing

"So that pretty much wraps up how I use libxml2. I hope its useful to you.
Before we part though I wanted to show you an ObjectAlloc trace from Ins-
truments.

As you can see from this graph the NSXMLParser based solution takes more
memory and more time. Of course you get a bunch for going this route, the
NSXMLParser protects you from C function pointers and xmlChar pointers to
pointers."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Tue Oct 13, 2009 11:55 pm    Post subject: Reply with quote

MF - NSURLConnection with HTTPS

"What you should do is construct a request that simulates the login form if a
user were to click on SUBMIT. Look at the source and find the action and the
names of the form elements ..."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Sat Nov 21, 2009 9:47 pm    Post subject: Reply with quote

SO - iPhone dev question: NSMutableURLRequest, cannt set the _GET
to my from in php


"I have a php form, that is working. With that form I connect to a DB, where
I get data out. Smile When I use the form from my Mac/laptop, i can enter the
sata and I get the result."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Sat Jan 09, 2010 10:03 pm    Post subject: Reply with quote

MF - NSURLConnection with SSL

"... i am using objective C class NSURLConnection to download files from an
https website. And i receive an exception: Bad certificate."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Mar 03, 2010 10:43 am    Post subject: Reply with quote

ADC - Using JavaScript From Objective-C

"JavaScript objects are represented by instances of WebScriptObject in
Objective-C. The API uses instances of WebScriptObject to wrap script
objects passed from the scripting environment to Objective-C. You can
use the methods of this class to call JavaScript functions and get/set pro-
perties of the JavaScript environment."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat Apr 24, 2010 10:30 pm    Post subject: Reply with quote

ObjColumnist - URL Encoding

"If you have tried to send any information using a GET web request, you
would have come across an annoying problem. That annoying problem is
making sure that the URL is correctly encoded."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Jun 23, 2010 11:05 pm    Post subject: Reply with quote

MF - Wait Screen or Alert?

"My app uploads data to a web server and I was wanting to have a wait
screen pop up until it is done uploading."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Thu Jul 29, 2010 3:00 pm    Post subject: Reply with quote

iphonedevsdk.com - Sending JSON to a URL

"I've got it working just fine the other way round but I can't seem to find any
tutorials that show how to post JSON, rather than retrieve it."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Sep 02, 2010 11:17 pm    Post subject: Reply with quote

iphonedevsdk.com - How can i login a webwite with username and pas-
sword through ASIHTTPRequest?


Code:
   [request setPostValue: @"user account email" forKey:@"email"];
   [request setPostValue: @"user account password" forKey:@"password"];
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Tue Sep 21, 2010 2:09 am    Post subject: Reply with quote

so - Cheapest way (platform/language) to implement a RESTful web
API for an iPhone app?


"If you want to be up and running as quickly and simply as possible I would
personally go for a CakePHP install. Setup the model data to represent the
basic entities you are managing, then use CakePHP's wonderful convention-
loving magic to expose CRUD updates on these models with ease!"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun Jan 09, 2011 12:21 am    Post subject: Reply with quote

reddit.com - SOAP : The S stands for Simple, well not really

"SOAP should only ever stand for Snakes On A Plane."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Mon Aug 01, 2011 2:59 pm    Post subject: Reply with quote

github.com - lukeredpath / LRResty

"Yet another Objective-C REST client library, inspired by Ruby's restclient gem."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Nov 03, 2011 12:20 am    Post subject: Reply with quote

MF - NSURLConnection for multiple views not receiving data asynchronously

"Since I have 6 UITableView, I send the Webservice request for each of
the views at the same time. However, the problem that I am facing is that,
for my app to receive data from the Webservice on the ... I know NSURLCon-
nection is asynchronous but the response I am getting does not seem so."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Sun Dec 04, 2011 6:40 pm    Post subject: Reply with quote

MF - Keep UIWebView from entering mobile site

"I have a UIWebView going to a certain site.

However the site I want to go to is the regular site.com not m.site.com."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Wed Apr 04, 2012 9:08 pm    Post subject: Reply with quote

http://forums.macrumors.com/showthread.php?t=1353617

Avoid Mobile Version of Sites?

Possibly, it depends on what the site is using to determine if it is being viewed on a mobile device. You could try tricking it by setting the User Agent to something other than "Safari iOS"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Sun Apr 22, 2012 1:48 am    Post subject: Reply with quote

https://github.com/sprhawk/ytoolkit

Besides, a demo for YToolkit is available from ytoolkitdemo (which is including demos for signing in & retrieving basic data from Twitter, Facebook, Douban, Sina Weibo, QQ Weibo, etc).
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Thu May 10, 2012 5:26 pm    Post subject: Reply with quote

Earljon Hidalgo - Parsing XML file using APXML Library [apxml]

"There are plenty of resources out there that will do the job very quickly and
easily but I opted to try the clean and simple open-source library APXML
that does exactly what I like to do – to parse an XML file with minimal effort."

Arash Payan:

"I wrote APXML so I could manipulate XML more easily in the programs I
write for iPhone and iPod Touch. I'm putting it out here in hopes that it will
help others too.
For more information, check out http://arashpayan.com/projects/APXML/ "
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Mon May 28, 2012 6:13 pm    Post subject: Reply with quote

so - How to mimic an HTML form submission in a POST request?

"Here's what the request could look like for your form:

POST /bugreport.php HTTP/1.1
Host: www . example . com
Content-Type: application/x-www-form-urlencoded
Content-Length: [size of the request body]

logfile=blabla&configfile=more+blabla&usercomment=hello&useremail...="
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jun 18, 2012 1:07 am    Post subject: Reply with quote

so - Server does not accept my multipart/form-data

"I try to upload an image to my webservice from my iphone application.
The webservice is programmed in php. I have to send the image along
with a device_id as multipart/form-data."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jun 18, 2012 1:10 am    Post subject: Reply with quote

so - Escaping CRLF in HTTP multipart/form-data content type

Code:
NSMutableURLRequest* req = [NSMutableURLRequest requestWithURL: url];
[req setHTTPMethod: @"POST"];

NSString* contentType = @"multipart/form-data, boundary=AaB03x";
[req setValue:contentType forHTTPHeaderField: @"Content-type"];

NSData* boundary = [@"\r\n--AaB03x\r\n" dataUsingEncoding:NSUTF8StringEncoding];
NSMutableData *postBody = [NSMutableData data];
[postBody appendData: boundary];
[postBody appendData: [@"Content-Disposition: form-data; name=\"datafile\"; filename=\"t.jpg\"" dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData: [@"Content-Type: image/jpeg\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData: imageData];
[postBody appendData: boundary];
[req setHTTPBody:postBody];
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jun 18, 2012 1:33 am    Post subject: Reply with quote

so - POST and multiple submit buttons on form

Code:
NSString *reqURL = [NSString stringWithFormat:@"%@/login",SERVER_URL];

NSMutableURLRequest *req = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:reqURL]];
[req setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"];

NSData *myRequestData = [NSData dataWithBytes:[@"username=whatever&password=whatever" UTF8String] length: [@"username=whatever&password=whatever" length]];
[req setHTTPMethod: @"POST"];
[req setHTTPBody: myRequestData];

NSData *returnData = [NSURLConnection sendSynchronousRequest:req returningResponse: nil error: nil];

NSString *html = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Sun Jul 08, 2012 7:34 pm    Post subject: Reply with quote

github - topfunky / hpple

"Hpple: A nice Objective-C wrapper on the XPathQuery library for parsing
HTML. Inspired by why the lucky stiff's Hpricot.

• Easy searching by XPath (CSS selectors are planned)
• Parses HTML (XML coming soon)
• Easy access to tag content, name, and attributes"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Tue Jul 10, 2012 4:10 pm    Post subject: Reply with quote

github - mwaterfall / MWFeedParser

See also: GTMNSString+HTML.m & NSDate+InternetDateTime.m

Cool - Ref:

"Check out my NSString category for HTML. Here are the methods available:

- (NSString *)stringByConvertingHTMLToPlainText;
- (NSString *)stringByDecodingHTMLEntities;
- (NSString *)stringByEncodingHTMLEntities;
- (NSString *)stringWithNewLinesAsBRs;
- (NSString *)stringByRemovingNewLinesAndWhitespace;"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Tue Jul 10, 2012 11:41 pm    Post subject: Reply with quote

http://stackoverflow.com/questions/691761/create-a-cookie-for-nsurlrequest
http://stackoverflow.com/questions/2053568/managing-http-cookies-on-iphone
http://stackoverflow.com/questions/9946881/nsurlrequest-doesnt-send-cookies
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Sat Jul 14, 2012 10:34 pm    Post subject: Reply with quote

http://stackoverflow.com/questions/9883081/post-data-in-objective-c-using-json
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jul 16, 2012 12:57 pm    Post subject: Reply with quote

How To Download a File Only If It Has Been Updated

"The code below does a HTTP HEAD request, checks the returned "Last-
Modified" header, and compares it with updated timestamp of the local file.
(A slightly more efficient approach would be to send a "If-Modified-Since"
header with your request. But there seems to be some issues with that, so
proceed carefully with that approach.)"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Fri Aug 24, 2012 11:51 pm    Post subject: Reply with quote

so - application/x-www-form-urlencoded or multipart/form-data?

"The moral of the story is, if you have binary (non-alphanumeric) data (or a
significantly sized payload) to transmit, use multipart/form-data. Otherwise,
use application/x-www-form-urlencoded."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Fri Aug 24, 2012 11:57 pm    Post subject: Reply with quote

so - NSURLConnection connectionDidFinishLoading is called before
webpage is loaded


"I am using NSURLConnection and POST, and sending my login credentials.

The credentials are right and the "connectionDidFinishLoading" is called but it
is not completely logged into the site.. the login is partially complete"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Tue Sep 25, 2012 5:27 pm    Post subject: Reply with quote

so - Loading a webpage through UIWebView with POST parameters

"Is it possible to load a page through UIWebView with POST parameters? I
can probably just load an embedded form with the parameters and fill them
in with javascript and force a submit, but is there a cleaner and faster way?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun Oct 07, 2012 11:54 pm    Post subject: Reply with quote

MF - Keep UIWebView from entering mobile site

"I have a UIWebView going to a certain site.

However the site I want to go to is the regular site.com not m.site.com.

Any help?"


Stack Overflow - Change User Agent in UIWebView (iPhone SDK)

Note that you need to use "User-Agent" to read the property, but
"User_Agent" to set it.
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Wed Nov 07, 2012 8:09 pm    Post subject: Reply with quote

macresearch.org - Interacting with SOAP based web services from
Cocoa
(and here's Part 2)

"... although REST based webservices are fortunately today's standard there
are still tons of SOAP-based ones out there. What has always been missing
in Cocoa is high level support for interacting with SOAP-based webservices.
Here I describe one way in which you can build such frameworks yourself."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Sun Nov 11, 2012 11:02 pm    Post subject: Reply with quote

google-toolbox-for-mac - Escaping for XML

1. GTMNSString+XML.m

2. GTMNSString+XML.h

/// Get a string where characters that need escaping for XML are escaped and invalid characters removed
//
/// This call escapes '&', '<, '>', '\'', '"' per the xml spec and removes all
/// invalid characters as defined by Section 2.2 of the xml spec.
///
/// For obvious reasons this call is only safe once.
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Tue Dec 11, 2012 9:59 pm    Post subject: Reply with quote

MF - How to remove &amp; from NSString

"I ran into a similar problem on the project I am working on. I ended up
implementing a category which can take care of the conversion for me
using libxml2."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Mon Jan 07, 2013 5:49 pm    Post subject: Reply with quote

Lee Popov - I have to learn: To read XML files on iOS

"Today I’ll show you how to read XML files using the NSXMLParser class. This
can be very useful if you need to work with XML on your app."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Jan 10, 2013 10:55 pm    Post subject: Reply with quote

smartbear.com - Understanding SOAP and REST Basics

"Simple Object Access Protocol (SOAP) and REpresentational State Trans-
fer (REST) are two answers to the same question: how to access Web ser-
vices. The choice initially may seem easy, but at times it can be surprisingly
difficult."


And this: SOAP vs REST for web service architectures
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Tue Aug 13, 2013 2:37 pm    Post subject: Reply with quote

so - Loading stringWithContentsofURL that requires credentials

"I am trying to parse an HTML page, but the page requires a username &
password to access the data. How do I pass the credentials to the server
so I can load the webpage into my NSData object?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Tue Aug 26, 2014 8:59 am    Post subject: Reply with quote

nshipster.com - WKWeb​View

"WKWebView is the centerpiece of the modern WebKit API introduced in
iOS 8 & Mac OS X Yosemite. It replaces UIWebView in UIKit and WebView
in AppKit, offering a consistent API across the two platforms.

Boasting responsive 60fps scrolling, built-in gestures, streamlined com-
munication between app and webpage, and the same JavaScript engine
as Safari, WKWebView is one of the most significant announcements to
come out of WWDC 2014."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3031
Location: Europe

PostPosted: Wed Dec 10, 2014 9:23 pm    Post subject: Reply with quote

so - iOS : Is there any iOS open source web browser

• TSMiniWebBrowser - In-App web browser control for iOS apps
• iOS-OnionBrowser - An open-source, privacy-enhancing web browser for iOS, utilizing the Tor anonymity network
• DZNWebViewController - A simple iPhone/iPad web browser.
• PBWebViewController - A light-weight, simple and customizable web browser component for iOS.
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun May 28, 2017 2:40 pm    Post subject: Reply with quote

Vanja Komadinovic - HTTPS client for iOS

"In this method we need to obtain certificate ( for code simplicity I will load
cert each time from resource ) and present it to sender which will use that
certificate against server."

Code:
securityError = SecPKCS12Import(inP12data, options, &items);
...
SecIdentityCopyCertificate(myIdentity, &myCertificate);
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Nov 30, 2017 2:14 pm    Post subject: Reply with quote

Ravishanker Kusuma - iOS NSURLSession Example (HTTP GET, POST, Background Downlads)

"In iOS NSURLSession Example, I have explained how use NSURLSession API
to make HTTP requests.NSURLSession class is introduced in iOS 7 and OS X
v10.9. NSURLSession is replacement for NSURLConnection and this API gives
your app the ability to perform background downloads when your app is in
background."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Apr 19, 2018 3:43 pm    Post subject: Reply with quote

URL encoding the space character: + or %20?

"You should have %20 before the ? and + after."

Code:
https://bob:bobby@www.lunatech.com:8080/file;p=1?q=2#third
\___/   \_/ \___/ \______________/ \__/\_______/ \_/ \___/
  |      |    |          |          |      | \_/  |    |
Scheme User Password    Host       Port  Path |   | Fragment
        \_____________________________/       | Query
                       |               Path parameter
                   Authority
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Dec 05, 2018 11:37 am    Post subject: Reply with quote

so - XSD Validation on iOS

"I ended up using the validation facilities in libxml2 since its a library already
included in iOS. Following this sample code"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Apr 10, 2019 4:35 pm    Post subject: Reply with quote

Use Your Loaf - openURL Deprecated in iOS10

"The related function canOpenURL: got some privacy controls in iOS 9 to
stop you from querying devices for installed apps. Now with iOS 10 Apple has
deprecated the plain old openURL for openURL:options:completionHandler:".
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat May 22, 2021 8:24 pm    Post subject: Reply with quote

TouchCode/TouchXML

"TouchXML is a lightweight replacement for Cocoa's NSXML* cluster of
classes. It is based on the commonly available Open Source libxml2 library."
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group