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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:27:02+00:00 2026-06-13T00:27:02+00:00

Getting this error: ‘NSInvalidArgumentException’, reason: ‘-[EngineerModel _isNaturallyRTL]: unrecognized selector sent to instance I’ve read

  • 0

Getting this error:

‘NSInvalidArgumentException’, reason: ‘-[EngineerModel _isNaturallyRTL]: unrecognized selector sent to instance

I’ve read How to resolve 'unrecognized selector sent to instance'? and others.

Using Xcode 4.5.1 with arc (my first time with arc)

Here’s my code, which is based on an earlier non-arc project which works great

database.m

// Models for data
#import "EngineerModel.h"

- (NSArray *)returnEngineers
{
    NSMutableArray *retval = [[NSMutableArray alloc] init];

    NSString *query = @"SELECT * FROM engineers";

    stmt = nil;

    if (sqlite3_prepare_v2(_database, [query UTF8String], -1, &stmt, nil) == SQLITE_OK) {
        while (sqlite3_step(stmt) == SQLITE_ROW) {

            char *engineerIDChr =         (char *) sqlite3_column_text(stmt, 0);
            char *engineerNameChr =         (char *) sqlite3_column_text(stmt, 1);
            char *engineerSigFileChr =         (char *) sqlite3_column_text(stmt, 2);
            char *engineerPhoneChr =   (char *) sqlite3_column_text(stmt, 3);
            char *engineerEmailChr =          (char *) sqlite3_column_text(stmt, 4);
            char *engineerRegNoChr =            (char *) sqlite3_column_text(stmt, 5);

            NSString *engineerID = [[NSString alloc] initWithUTF8String:engineerIDChr];
            NSString *engineerName = [[NSString alloc] initWithUTF8String:engineerNameChr];
            NSString *engineerSigFile = [[NSString alloc] initWithUTF8String:engineerSigFileChr];
            NSString *engineerPhone = [[NSString alloc] initWithUTF8String:engineerPhoneChr];
            NSString *engineerEmail = [[NSString alloc] initWithUTF8String:engineerEmailChr];
            NSString *engineerRegNo = [[NSString alloc] initWithUTF8String:engineerRegNoChr];

            EngineerModel *info = [[EngineerModel alloc] initWithUniqueId:engineerID
                                                               engineerName:engineerName
                                                                     engineerSigFile:engineerSigFile
                                                         engineerPhone:engineerPhone
                                                                engineerEmail:engineerEmail
                                                                  engineerRegNo:engineerRegNo];

            [retval addObject:info];            
        }
        sqlite3_finalize(stmt);
    }
    return retval;
}

Database has two entries

And the model

//  EngineerModel.h
#import <Foundation/Foundation.h>

@interface EngineerModel : NSObject
{
    NSString *_engineerID;
    NSString *_engineerName;
    NSString *_engineerSigFile;
    NSString *_engineerPhone;
    NSString *_engineerEmail;
    NSString *_engineerRegNo;
}

@property (nonatomic, copy) NSString *engineerID;
@property (nonatomic, copy) NSString *engineerName;
@property (nonatomic, copy) NSString *engineerSigFile;
@property (nonatomic, copy) NSString *engineerPhone;
@property (nonatomic, copy) NSString *engineerEmail;
@property (nonatomic, copy) NSString *engineerRegNo;



- (id)initWithUniqueId:(NSString *)AengineerID
          engineerName:(NSString *)AengineerName
       engineerSigFile:(NSString *)AengineerSigFile
         engineerPhone:(NSString *)AengineerPhone
         engineerEmail:(NSString *)AengineerEmail
         engineerRegNo:(NSString *)AengineerRegNo;

- (id) init;

@end


//  EngineerModel.m
#import "EngineerModel.h"

@interface EngineerModel ()

@end

@implementation EngineerModel

@synthesize engineerID, engineerName, engineerSigFile, engineerPhone, engineerEmail, engineerRegNo;

- (id)initWithUniqueId:(NSString *)AengineerID
          engineerName:(NSString *)AengineerName
       engineerSigFile:(NSString *)AengineerSigFile
         engineerPhone:(NSString *)AengineerPhone
         engineerEmail:(NSString *)AengineerEmail
         engineerRegNo:(NSString *)AengineerRegNo
{

    if ((self = [super init]))
    {
        self.engineerID = AengineerID;
        self.engineerName = AengineerName;
        self.engineerSigFile = AengineerSigFile;
        self.engineerPhone = AengineerPhone;
        self.engineerEmail = AengineerEmail;
        self.engineerRegNo = AengineerRegNo;

     }
    return self;
}

- (id) init {
    self = [super init];
    return self;
}

@end

Lastly

I’ve added -ObjC and -all_load to other linker flags

Added @synthesize (I didn’t think I had to for arc?)

If I simplify it down to

- (id)initWithId:(NSString *)AengineerID
{
    NSLog(@"AengineerID %@",AengineerID);

    if ((self = [super init]))
    {
        self.engineerID = AengineerID;
    }
    return self;
} 

It traces AengineerID then crashes

Any ideas?

  • 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-06-13T00:27:03+00:00Added an answer on June 13, 2026 at 12:27 am

    _isNaturallyRTL is a private method on NSString. So somehow you’ve got an EngineerModel instance where some other code is expecting an NSString.

    What do you do with that array of EngineerModel objects you return from the returnEngineers method?


    And just as a recommendation… using the sqlite3 C API yourself like that is a lesson in frustration. I highly recommend using something like FMDB instead.

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

Sidebar

Related Questions

Im getting this error, What is the reason it? Starting Server Exception in thread
I keep getting this error in Apache's error log: [client 127.0.0.1] Client sent malformed
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
Getting this error when try to add an item to my repositories/context: Collection has
Am getting this error message and matched my brackets and couldn't find anything wrong.
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
Keep getting this error after inserting a subdatasheet into a query and trying to
am getting this error when i open my site in internet explorer......... plz help
Am getting this error for my code: Undefined symbols for architecture x86_64: _spendDollars, referenced

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.