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 7525717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:37:46+00:00 2026-05-30T03:37:46+00:00

I am trying to build a URL string that will be passed to UIWebView

  • 0

I am trying to build a URL string that will be passed to UIWebView object. Up until now I have been pointing to remote files and have now moved the files into the main bundle.
I imported my files using the “create folder reference” option and want to point to the index.html file inside of a folder named ‘html’.

I need to append hashtags to the URL generated by the code below but keep getting this error:

-[NSURL stringByAppendingString:]: unrecognized selector sent to instance

I can’t figure out why when casting my variables as a NSString I am receiving this error when trying to append to it.

Here is my code:

NSInteger rowNumber = indexPath.row;
NSInteger metroRank = rowNumber+1; //sorted by rank, adding one because of zero-based array


NSString *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"html"]];
NSString *urlSuffix = [NSString stringWithFormat:@"#pg=metro&view=%d", metroRank];
NSString *metroViewURL = [url stringByAppendingString:urlSuffix];

When the above code hits ‘stringByAppendString’ that is when I receive the error.

  • 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-30T03:37:48+00:00Added an answer on May 30, 2026 at 3:37 am

    Convert it to a NSString first:

    NSString *newURL = [[oldURL absoluteString] stringByAppendingString:@"#myhashtag"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a function within my mvc app that will validate the
I'm trying to do a script in WWW::Mechanize that will build a job in
I'm trying to serialize an object that have a duplicate node name using C#,
I'm trying to build an app that will display stats for a certain game
I'm trying to build a form which submits a URL which contains a lon/lat
I'm trying to build small web-system (url shortcutting) using nonsql Cassandra DB, the problem
I'm trying to build a safari extenstion (mostly for learning purposes) that creates a
I'm trying to use the Android tutorial to build an app that loads a
I'm having an issue trying to build a JSONArray in android that has more
I want to build an HTTP post that will send data and automatically bind

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.