|
Hi
I am getting the below error, when i try to compile xcode project.
duplicate symbol _squareOfDistanceBetweenPoints in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(AGSCPTUtilities.o)
/Users/project/map/libCorePlot-CocoaTouch.a(CPTUtilities.o)
duplicate symbol _niceNum in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(AGSCPTAxis.o)
/Users/project/map/libCorePlot-CocoaTouch.a(CPTAxis.o)
duplicate symbol _AddRoundedRectPath in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(AGSCPTPathExtensions.o)
/Users/project/map/libCorePlot-CocoaTouch.a(CPTPathExtensions.o)
duplicate symbol _CreateRoundedRectPath in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(AGSCPTPathExtensions.o)
/Users/project/map/libCorePlot-CocoaTouch.a(CPTPathExtensions.o)
duplicate symbol _dependentCoord in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(AGSCPTTradingRangePlot.o)
/Users/project/map/libCorePlot-CocoaTouch.a(CPTTradingRangePlot.o)
duplicate symbol _independentCoord in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(AGSCPTTradingRangePlot.o)
/Users/project/map/libCorePlot-CocoaTouch.a(CPTTradingRangePlot.o)
duplicate symbol _MyCGPathApplierFunc in:
/Users/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/ArcGIS(NSCoderExtensions.o)
/Users/project/map/libCorePlot-CocoaTouch.a(NSCoderExtensions.o)
ld: 7 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
thanks in advance
|
|
|
|
|
Hi,
I would like to limit the image taken to fixed size w=5 in and h=10 inch.
1. There is a way to display on screen (when taking the picture) frame in this size?
2. After taking the pic, how to enable moving the picture so the user can center the image in the 5x10 frame
Thanks!
|
|
|
|
|
how in this way
What could explain to me
|
|
|
|
|
I am working on XMPP based project. i am able to send message and it displays in conversation screen but when i receive message it only show in alertview not able to see in conversation screen. help me please.
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(messageReceived:) name:MessageRecivedNotif object:nil];
appdelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
[self getAllMessagesArrayWithOppositeUser:_jid];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWasShown:)
name:UIKeyboardDidShowNotification
object:nil];
}
#pragma mark table delegate and datasource methods
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return data.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tblobj dequeueReusableCellWithIdentifier:@"cell"];
UILabel *lbl;
if (cell==nil)
{
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
if (chatLblRight == 1)
{
lbl = [[UILabel alloc]initWithFrame:CGRectMake(200, 10, 150, 44)];
[lbl setTextColor:[UIColor redColor]];
[cell.contentView addSubview:lbl];
}
}
if (chatLblRight == 1)
{
lbl.text = [[data objectAtIndex:indexPath.row]valueForKey:@"text"];
chatLblRight = 0;
lbl = [[UILabel alloc]initWithFrame:CGRectMake(200, 10, 150, 44)];
[lbl setTextColor:[UIColor redColor]];
[cell.contentView addSubview:lbl];
return cell;
}
else
{
cell.textLabel.text=[[data objectAtIndex:indexPath.row]valueForKey:@"text"];
return cell;
}
}
-(void)messageReceived:(NSNotification*)notif
{
XMPPMessage *message=(XMPPMessage*)notif.object;
NSString *body = [[message elementForName:@"body"] stringValue];
NSMutableDictionary *dic_recive = [[NSMutableDictionary alloc]init];
[dic_recive setObject:body forKey:@"text"];
[data addObject:dic_recive];
chatLblRight = 1;
[tblobj reloadData];
}
-(IBAction)btnsend:(id)sender
{
[txtmsg resignFirstResponder];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.2];
[msgview setFrame:CGRectMake(0, self.view.bounds.size.height-53, self.view.bounds.size.width, 53)];
[UIView commitAnimations];
[((AppDelegate*)[[UIApplication sharedApplication]delegate]) sendMessage:txtmsg.text toUserWithJid:_jid];
NSMutableDictionary *dic_send = [[NSMutableDictionary alloc]init];
[dic_send setObject:txtmsg.text forKey:@"text"];
[data addObject:dic_send];
[tblobj reloadData];
txtmsg.text=@"";
}
-(NSMutableArray *)getAllMessagesArrayWithOppositeUser:(XMPPJID *)xmppUser
{
XMPPMessageArchivingCoreDataStorage *storage = [XMPPMessageArchivingCoreDataStorage sharedInstance];
NSManagedObjectContext *moc = [storage mainThreadManagedObjectContext];
NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"XMPPMessageArchiving_Message_CoreDataObject"
inManagedObjectContext:moc];
NSFetchRequest *request = [[NSFetchRequest alloc]init];
[request setEntity:entityDescription];
NSError *error;
NSArray *messages = [moc executeFetchRequest:request error:&error];
data=[[NSMutableArray alloc] init];
@autoreleasepool {
for (XMPPMessageArchiving_Message_CoreDataObject *message in messages) {
if ([message.bareJid isEqual:xmppUser])
{
NSMutableDictionary *dict=[[NSMutableDictionary alloc] init];
[dict setObject:message.body forKey:@"text"];
[dict setObject:message.timestamp forKey:@"date"];
if ([message isOutgoing]) {
[dict setObject:@"1" forKey:@"type"];
[dict setObject:[[message.bareJidStr componentsSeparatedByString:@"@"] firstObject] forKey:@"username"];
[dict setObject:[UIColor greenColor] forKey:@"color"];
}
else{
[dict setObject:@"2" forKey:@"type"];
[dict setObject:[[message.bareJidStr componentsSeparatedByString:@"@"] firstObject] forKey:@"username"];
[dict setObject:[UIColor blueColor] forKey:@"color"];
}
[data addObject:dict];
}
}
}
return data;
}
Where is my mistake ?
EDIT:-
- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message
{
DDLogVerbose(@"%@: %@", THIS_FILE, THIS_METHOD);
[[self xmppStream] sendElement:message];
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.alertAction = @"OK";
localNotification.fireDate = [NSDate date];
localNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];
if ([message isChatMessageWithBody])
{
XMPPUserCoreDataStorageObject *user = [xmppRosterStorage userForJID:[message from]
xmppStream:xmppStream
managedObjectContext:[self managedObjectContext_roster]];
NSString *body = [[message elementForName:@"body"] stringValue];
NSString *displayName = [user displayName];
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive)
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:displayName
message:body
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alertView show];
}
else
{
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.alertAction = @"Ok";
localNotification.alertBody = [NSString stringWithFormat:@"From: %@\n\n%@",displayName,body];
[[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];
}
}
modified 16-Jun-15 2:45am.
|
|
|
|
|
Member 11766967 wrote: Where is my mistake ? Could be anywhere. You need to do some debugging for yourself and identify where things are going wrong. Then edit your question and add the detail to explain exactly what is or is not happening that should be. Also please put <pre></pre> tags around your code so people can read it clearly.
|
|
|
|
|
thanks for your replay. i am new in ios. can you please tell me how i check for received message? i have removed alertview from my didreceivemessage method and then i am not able to received message. i have updated my code of appdelegate.m file and method didreceivemessage. kindly replay. thanks .
|
|
|
|
|
Member 11766967 wrote: when i receive message it only show in alertview not able to see in conversation screen. help me please.
maybe I am missing something here?? In your didReceiveMessage method you are displaying an alertView when the app is active. otherwise you are displaying it as a notification.
I guess if you don't want to see it in a UIAlertView then maybe you shouldn't use that?
|
|
|
|
|
Hi Guys.
I have a assignment to make a system monitor or task manager that will show all running processes.
Can anyone help.
|
|
|
|
|
Member 11677967 wrote: Can anyone help. Yes, lots of people can, but you need to ask a specific question related to the work you have done. This site does not provide code to order.
|
|
|
|
|
|
|
|
//
// ViewController.h
// DogYears
//
// Created by Steven Wimer on 2/26/15.
// Copyright (c) 2015 Steven Wimer. All rights reserved.
//
import <uikit uikit.h="">
@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet UILabel *dogYearLabel;
@property (strong, nonatomic) IBOutlet UITextField *humanYearsTextField;
- (IBAction)convertButtonPressed:(UIButton *)sender;
@end
//
// ViewController.m
// DogYears
//
// Created by Steven Wimer on 2/26/15.
// Copyright (c) 2015 Steven Wimer. All rights reserved.
//
import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
} - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
} - (IBAction)convertButtonPressed:(UIButton *)sender
{
float humanYears = [self.humanYearsTextField.text floatValue];
float numberOfDogYears = humanYears * 7;
self.dogYearLabel.text = [NSString stringWithFormat:@"%.0f years", numberOfDogYears];
}
@end
/Users/SwSAS1786/Desktop/Screen Shot 2015-04-08 at 9.20.13 PM.png
/Users/SwSAS1786/Desktop/Screen Shot 2015-04-08 at 9.21.15 PM.png
|
|
|
|
|
Question??? or are is this some kind of attempt and impressing others?
|
|
|
|
|
|
Richard MacCutchan wrote: There is no such thing as a dog year
I don't think my dog can even tell time except of course that in the morning when we all leave for work it is treat time. 
|
|
|
|
|
Declare and set a variable called myName to your name
Declare two more string variables introduction and japaneseIntroduction both with an NSString type
Set introduction using stringWithFormat class method "My name is %@", myName
Set japanese introduction using stringByAppendingString instance method by appending " to moushimasu"
Print introduction and japanese introduction
Step 3: Define and call a new function
Declare a function called printIntroductions
The function should accept an NSString as a parameter called name
Cut and paste the introduction and japaneseIntroduction code inside of the new function
You should have errors for referencing 'myName'. Change any reference to 'myName' to 'name'.
This is an error of scope. You only declared 'myName' in your didFinishLaunching method. Not in your new method. In your new method, you declared an argument called 'name' that your function accepts when the method is called
In your didFinishLaunching method after you set myName call printIntroductions: and pass in 'myName' as an argument
It should print out the introduction and Japanese introduction
Step 4: Recurse through a function
Add a new function called countDownTillIntroduction: that accepts an integer called numberOfDays as an argument
The function should do the following:
Check to see if the numberOfDays is 0
If the number of days is 0, it should print "The time has come"
If numberOfDays is not 0
It should print "[numberOfDays] days left until introductions"
It should declare and set a variable oneLessDay and set it to numberOfDays - 1
It should then call countDownTillIntroduction and pass in oneLessDay
In the didFinishLaunching method before you call printIntroductions call countDownTillIntroduction and pass in 4
Completion:
OUTPUT: You should see it print "4 days left until introductions", "3 days left until introductions" (down to 1) and then it should print "The time has come" and "My name is [yourName]", "[yourName] to moushimasu"
|
|
|
|
|
What is your expectation here? Do you want someone to write that program for you? That will not happen. You should try it yourself and if you then run into a specific problem, come back, ask a specific question and probably someone can help you with that.
|
|
|
|
|
Ok so be honest here.
This is codeproject.com not homeworkcheat.com. If you are having some problems and need help with a question about then ask but include the work you have completed and where you are stuck.
everyone here is and has taken the effort to learn what is they do. you should be expected to the same if you ever expect to be successful.
Learning is a part of life.
|
|
|
|
|
I think almost everybody reading a discussion board on Objective-C would be able to "solve this project".
Do you have any other questions?
|
|
|
|
|
Is it possible to design an iPad app that launches Safari, waits until a dialog box appears in Safari and then activates a button. Waits until another dialog box appears and then automatically completes the username and password in Safari and finally the app closes itself?
I cannot use Autofill as the website that Safari has accessed does not allow saving passwords. An analogy would be Safari automatically connecting to one's banks website that does not allow saving username and passwords.
This is an app I am trying to develop for visually impaired people for easy login access to the local library.
All constructive comments are welcome.
modified 8-Jan-15 18:01pm.
|
|
|
|
|
To the best of my knowledge the short answer is no.
If it were possible then I highly doubt that you would be able to get this released into the Store because of the privacy concerns that something like this could create.
If this is your app and web site then there are other alternatives available for you to try. From your app you could launch a website and pass in parameters via the url. Then on your website have some javascript that runs and takes care of what remains.
Though of course you will have the issue of passing passwords as free text via the url. Definitely requires some more more thought but alas that is for another thread. 
|
|
|
|
|
to my knowledge this is not possible.
I saw some password tools (like 1Password, LastPass) on the appstore that opens up a website on an internal browser and then fill in the username and password.
But to my knowledge apple doesen't allow IPC between most of the Apps. The only place where Apps are communicating is AppleHealth where 3th party apps could write to AppleHealth.
If you find a way to opening up safari and then fill in the user and password boxes i'm extremly interested in the solution! 
|
|
|
|
|
I'm trying to make a pretty simple frontend program that's able to start up a java program when it's run, but haven't yet mastered OC. Someone suggested that I try using a console command (code below), but I haven't been able to make that work yet.
Is there an easier way to do this, or does any one here know where my code has gone wrong?
int main(int argc, const char * argv[]) {
NSFileManager *filemgr;
NSString *currentpath;
filemgr = [[NSFileManager alloc] init];
currentpath = [filemgr currentDirectoryPath];
NSPipe *pipe = [NSPipe pipe];
NSFileHandle *file = pipe.fileHandleForReading;
NSTask *task = [[NSTask alloc] init];
task.launchPath = [currentpath stringByAppendingString:@"/java"];
task.arguments = @[@"-jar", @"PolyGlot.jar"], [NSString stringWithFormat:@"%c", argv]];
task.standardOutput = pipe;
[task launch];
NSData *data = [file readDataToEndOfFile];
[file closeFile];
NSString *grepOutput = [[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding];
NSLog (@"grep returned:\n%@", grepOutput);
return 0;
}
When I run this, I get the error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'launch path not accessible'
I know that the current path is accessible, though... so I'm kind of stumped here. Any help would be much appreciated. Thanks!
|
|
|
|
|
As a guess because what you think is the current path for the executable is not in fact the path where the jar actually is.
|
|
|
|