Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 664569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:36:50+00:00 2026-05-13T23:36:50+00:00

I am hoping someone can help me with a question i have relating to

  • 0

I am hoping someone can help me with a question i have relating to Basic HTTP Authentication in an Xcode 2.3 application.

Basically i have a PHP page that is on our server and when called with certain parameters returns data relating to the servers condition etc.

i have managed to get a small Xcode application working where by it reads the data from the page and populates an NSTextView with the data.

however to make sure this information stays safe i have setup basic HTTP Authentication on the page, but i cannot work out how to provide the username and password in XCode.

here is my code to retrieve the page.

NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSString *content = [NSString stringWIthContentsOfUrl:url];
[myTextView setString:content];

i am still at a very basic beginner level regarding xcode and obj c, so nice simple examples of how i go about this would really be appreciated.

Thanks
Kris

ok following on from the intial comment i got about looking at a website regarding this issue here is whats happened, ive had a look through the webpage supplied and have struggled to get code working in my program.

now when i run my program and click the button to-do the login the debug window pops up on this line

NSString *authHeader = [@"Basic " stringByAppendingFormat:@"%@",   
    [NSString stringWithCString:encodedLoginData length:strlen(encodedLoginData)]]; 

this is in the debug log at this point

Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/kristiaandavies/getWebData/build/Debug/getWebData.app/Contents/MacOS/getWebData', process 982.
Pending breakpoint 1 - ""AppController.m:10" resolved

i click continue to attempt to get it going further and then get this from the debug log

(gdb) continue
Current language:  auto; currently objective-c
Program received signal:  "EXC_BAD_ACCESS".
(gdb) 

and the program freezes???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:36:50+00:00Added an answer on May 13, 2026 at 11:36 pm

    Here is a link that may get you started in the right direction.

    http://www.chrisumbel.com/article/basic_authentication_iphone_cocoa_touch

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im hoping someone can help me quickly with a question i have. As site
I am hoping someone can help me out with a quick question I have
I have a question regarding the OnItemDataBound event and I'm hoping someone can help
everyone. I have an advanced T4 question and I'm hoping someone can help. I've
I am hoping if someone can help me resolve an IOS/XCode question. I need
I am hoping someone can help me. I have a very simple question, but
I have a question I'm hoping someone can help me out with. We are
I'm hoping someone can help me with a question I have about images and
I'm hoping someone can help me with a backbone.js question. I've got most of
I'm hoping someone can help on this one, I have created a custom object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.