|
|
File transfer from android to iphone
I need to send the photo from android to iPhone and android to android. Using BlueTooth API i am able to to send from android to android but could n...More
I need to send the photo from android to iPhone and android to android. Using BlueTooth API i am able to to send from android to android but could not find from android to iphone.
Is there any way to transfer the photo from android to iPhone programmatically using API.
|
Coredata relationship breaking in restkit
I am still using Restkit 0.10 (because i started this project 7 months back. i will be using restkit 0.20 from my next project).
come to the...More
I am still using Restkit 0.10 (because i started this project 7 months back. i will be using restkit 0.20 from my next project).
come to the point, i have a response from server which looks like this.
{
"events": [
{
"town": "Carouge",
"website": "http://www.example.com",
"fee": "75.00",
"capacity": 80,
"name": "Dialogue in the Dark- Workshop's ",
"end_date": "1253046600",
"open": 26,
"id": 2,
"images": [
{
"event_id": 2,
"large": "large image url",
"thumbnail": "thumbnail url"
},
{
"event_id": 2,
"large": "large image url",
"thumbnail": "thumbnail url"
}
],
"street": "street name",
"location": "location name",
"organised_by": "ABC",
"type": "Workshop",
"start_date": "1253014200",
"guests": [],
"description": "Event Description"
}
]
}
I have created a 2 tables namely Events and EventImages and mapping using the following code
RKObjectManager *manager = [[Restkit sharedDataManager] objectManager];
RKManagedObjectMapping *eventsMapping = [RKManagedObjectMapping mappingForClass:[Events class] inManagedObjectStore:manager.objectStore];
[eventsMapping mapKeyPath:@"town" toAttribute:@"town"];
[eventsMapping mapKeyPath:@"website" toAttribute:@"website"];
[eventsMapping mapKeyPath:@"fee" toAttribute:@"fee"];
[eventsMapping mapKeyPath:@"capacity" toAttribute:@"capacity"];
[eventsMapping mapKeyPath:@"name" toAttribute:@"name"];
[manager.mappingProvider setMapping:eventsMapping forKeyPath:@"events"];
eventsMapping.primaryKeyAttribute = @"event_id";
RKManagedObjectMapping *imagesMapping = [RKManagedObjectMapping mappingForClass:[EventImages class] inManagedObjectStore:manager.objectStore];
[imagesMapping mapKeyPath:@"large" toAttribute:@"large"];
[imagesMapping mapKeyPath:@"thumbnail" toAttribute:@"thumbnail"];
[imagesMapping mapKeyPath:@"event_id" toAttribute:@"event_id"];
imagesMapping.primaryKeyAttribute = @"large";
[eventsMapping mapKeyPath:@"images" toRelationship:@"eventImages" withMapping:imagesMapping];
This works fine. when i see the db, all the relations are working.
Problem:
There is another api call for uploading image, which will return the response as same as above one ("images" keypath contains the uploaded image details).
{
"message": "Successfully uploaded",
"events": [
{
"images": [
{
"event_id": 2,
"large": "large image url",
"thumbnail": "thumb image url"
}
],
"id": 2
}
],
"responseCollection": {
"server_time": "1368940901",
"success": true
}
}
i am using same mapping for the response. My db is updating, but unfortunately relationship breaks. (ie) when i view my EventImages Table, the relationship key which is automatically generated with respect to Events Table becomes null for two images that i first get from the event response. but uploaded image response have a relationship key. (ie) The previous relationship breaks and new realtionship value is appear in the db for the uploaded image. The only thing i can see in the table "EventImages" is 'Z_OPT' value becomes 2 for null value relationship object.
Thanks
|
Questions while using presentModalViewController
In my application, i tried to use the function
[self.navigationCotroller presentModalViewController:nextVC animated:YES];
However, when it goes...More
In my application, i tried to use the function
[self.navigationCotroller presentModalViewController:nextVC animated:YES];
However, when it goes to the next view, the subview fulfill the whole screen(of course it did)
And the question is , how could i add the bar button which lead the view back?
i have tried to use
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"back" style:UIBarButtonItemStyleDone target:self action:@selector(Go)];
in function viewdidLoad, but it did not work, there's no bar or even button showed
UINavigationBar *bb = [[UINavigationBar alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 44)];
self.NVBar = bb;
[self.view addSubview:bb];
However, i have no idea how to add a barbutton to the new navigationBar ---NVBar
Would you like to give me a solution?
|
How do I utilize CoreData when moving from collection view to detail view
I have an IOS app that is using RestKit to pull json formatted data from a server into a CoreData Entity. Some of the attributes of the entity help...More
I have an IOS app that is using RestKit to pull json formatted data from a server into a CoreData Entity. Some of the attributes of the entity help populate a collection view with an image and title for each cell.
I am attempting to move from the collection view to a detail view when a cell is selected. There is a "summary" attribute of the CoreData Entity that I would like to display in the detail view along with the image.
I know I can pass data thru the prepareForSegue method. But I am not sure how to specify the image and summary data I want to pass.
Maybe passing the image and summary is not the proper way? Should I be passing the managedObjectContext to the detail view controller and fetching the results from there?
Here is how my CollectionView is populated.
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
MyNewsCollectionViewCell *cell = (MyNewsCollectionViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
NSManagedObject *object = [self.fetchedResultsController objectAtIndexPath:indexPath];
NSURL *photoURL = [NSURL URLWithString:(NSString *) [object valueForKey:@"imageUrl"]];
NSData *photoData = [NSData dataWithContentsOfURL:photoURL];
[cell.cellimg setImage:[[UIImage alloc] initWithData:photoData]];
[cell.title setText:[object valueForKey:@"title"]];
return cell;
Here is the prepareForSegue method
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"newsDetail"]) {
NewsDetailViewController *vc =[segue destinationViewController];
vc.newsDetailImageView = //How do I designate the image from the cell I selected???
vc.newsDetailText = //How do I designate the text from the cell I selected???
}
}
This is obviously a beginners question.... any help would be much appreciated. Given that I'm a beginner basic example code really helps!
|
|
|
Selenium iPhoneDriver - build errors
I am new to Selenium iPhonedriver testing. I am following exact steps from More
I am new to Selenium iPhonedriver testing. I am following exact steps from http://code.google.com/p/selenium/wiki/IPhoneDriver
- I checked out trunck from http://code.google.com/p/selenium/source/checkout
- I go to trunck folder and execute ./go iphone
I get below error and build fails - not sure what it is . Its been 2 days i am struggling to get code run - Any help is highly appreciated
new-host-4:trunk administrator$ ./go iphone
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META- INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile' (See full trace by running task with --trace)
new-host-4:trunk administrator$ ./go iphone --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META- INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in raw_load_rakefile
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in load_rakefile
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in load_rakefile
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in run
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31:in (root)
org/jruby/RubyKernel.java:1066:in load
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in (root)
org/jruby/RubyKernel.java:1066:in load
file:/Users/administrator/Downloads/trunk/third_party/jruby/jruby-complete.jar!/META- INF/jruby.home/bin/rake:12:in rake
org/jruby/RubyProc.java:275:in call
rake:1:in (root)
new-host-4:trunk administrator$
|
Mapview is not showing the annotated points
I am trying to show the location of my current location and random 5 points points like this:
-(void)viewDidLoad{
[super viewDidLoad...More
I am trying to show the location of my current location and random 5 points points like this:
-(void)viewDidLoad{
[super viewDidLoad];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
otherlat = [NSNumber numberWithDouble:[currentLatitude doubleValue]];
otherlong = [NSNumber numberWithDouble:[currentLongitude doubleValue]];
[self.mapView setShowsUserLocation:YES];
mapView.delegate=self;
longi=[[NSMutableArray alloc] init];
lati=[[NSMutableArray alloc] init];
NSMutableArray *la = [[NSMutableArray alloc]init];
NSMutableArray *lo = [[NSMutableArray alloc]init];
la = [NSMutableArray arrayWithObjects: @"20",@"21", @"42", @"51", @"75",nil];
lo = [NSMutableArray arrayWithObjects: @"60",@"21", @"82", @"181", @"35",nil];
for(int x =0; x<[la count]; x++){
otherlat = [NSNumber numberWithDouble:[[la objectAtIndex:x] doubleValue]];
otherlong = [NSNumber numberWithDouble:[[lo objectAtIndex:x] doubleValue]];
[longi addObject:otherlong];
[lati addObject:otherlat];
}
myAnnotation* myAnnotation1=[[myAnnotation alloc] init];
for (int y =0; y < [lati count]; y++) {
CLLocationCoordinate2D theCoordinate;
theCoordinate.latitude = [[lati objectAtIndex:y] doubleValue];
theCoordinate.longitude = [[longi objectAtIndex:y] doubleValue];
myAnnotation1.coordinate=theCoordinate;
[mapView addAnnotation:myAnnotation1];
}
}
- (MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id <MKAnnotation>)annotation{
if ([annotation isKindOfClass:[MKUserLocation class]])
return nil;
static NSString *myAnnotationIdentifier = @"AnnotationIdentifier";
MKPinAnnotationView *customPinView = [[MKPinAnnotationView alloc]
initWithAnnotation:annotation reuseIdentifier:myAnnotationIdentifier];
customPinView.image = [UIImage imageNamed:@"purplepin.png"];
customPinView.animatesDrop = YES;
customPinView.canShowCallout = YES;
return customPinView;
}
However, the mapview only shows the my current location, and none of the other 5 locations. I do not understand why it is not showing the other 5 locations because I do
[mapView addAnnotation:myAnnotation1];
|
UIButton not showing on simulator when view's class is TPKeyboardAvoidingScrollView
I have this weird problem where the buttons on the simulator or my iPhone are not showing when the class of the view's set to TPKeyboardAvoidingScro...More
I have this weird problem where the buttons on the simulator or my iPhone are not showing when the class of the view's set to TPKeyboardAvoidingScrollView.
Here's a screenshot:

When the view's class is set to UIView (default) it works properly.
|
Safe to use Regex for this? (HTML)
I'm parsing some HTML, and I need to get all html in the body tag. My target string will always look something like this:
<body&g...More
I'm parsing some HTML, and I need to get all html in the body tag. My target string will always look something like this:
<body><div><img src="" />text etc</div></body>
However, I just need:
<div><img src="" />text etc</div>
My target string will always begin and end with those body tags. However, there is the repeated warning of not use Regex to parse HTML, but I do not have any viable solutions for that available, besides Regex at the moment.
Question: Are there any safe Regex(s) to use in this case? Or should I just forget it?
|
Float a UIView around the screen in the background
So I'm trying to do a long running animation with some UIViews. Basically what I'm trying to accomplish is take a square subview and have it float r...More
So I'm trying to do a long running animation with some UIViews. Basically what I'm trying to accomplish is take a square subview and have it float randomly around the screen in the background (like a leaf floating on a pond). I was hoping to do it with regular animations but so far I've had problems where the animation just stops even with setting the option to begin at the current position. Anyone know of a simple way to do this?
I saw Moving an object randomly around the screen already but isn't that going to eventually cause a stack overflow due to the recursion?
Also, I'm asking how to do this without an added library/framework.
Thanks!
|
Preparing a GET/POST request to fetch data on iPhone
i am trying to fetch data in JSON format for the search word 'cancer'.
But i can't figure out how to call the websvice, i tried a few things...More
i am trying to fetch data in JSON format for the search word 'cancer'.
But i can't figure out how to call the websvice, i tried a few things but they are not working, can anybody help me in this.
Below is the API i should be calling
https://api.justgiving.com/docs/resources/v1/Search/FundraiserSearch
Clicking the following URL will get desired data in the browser.
https://api.justgiving.com/2be58f97/v1/fundraising/search?q=cancer
apiKey = 2be58f97
Here is the code i am using:
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
NSURL *requestURL = [NSURL URLWithString:@"https://api.justgiving.com/2be58f97/v1/fundraising/search"];
[request setURL:requestURL];
[request setHTTPMethod:@"GET"];
NSString *boundary = @"---------------------------14737809831466499882746641449";
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
[request addValue:contentType forHTTPHeaderField: @"Content-Type"];
NSMutableData *body = [NSMutableData data];
[body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[@"Content-Disposition: form-data; name=\"q\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"%@",searchText] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:body];
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSLog(@"ERROR = %@",error.localizedDescription);
if(error.localizedDescription == NULL)
{
NSString *returnString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"response >>>>>>>>> %@",returnString);
}
else
{
NSString *returnString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"response >>>>>>>>> %@",returnString);
}
}];
|
How to move object in corona sdk?
Hey i am using this code to move (animate) my objects on the scene
But it leaks the memory and stop responding.
//transition back
l...More
Hey i am using this code to move (animate) my objects on the scene
But it leaks the memory and stop responding.
//transition back
local function goBack( )
transition.to ( wall2, { time = 10000, x = 100, y = 310, onComplete = startTransition})
transition.to ( wall, { time = 10000, x = 700, y = 200, onComplete = startTransition})
transition.to (gate_a, { time = 10000, x = 100, y = 255, onComplete = startTransition})
transition.to ( stargate_a, { time = 10000, x = 100, y = 255, onComplete = startTransition})
end
//transition start
function startTransition( )
transition.to ( wall2, { time = 10000, x = 700, y = 310, onComplete = goBack})
transition.to ( wall, { time = 10000, x = 100, y = 200, onComplete = goBack})
transition.to ( gate_a, { time = 10000, x = 700, y = 255, onComplete = goBack})
transition.to ( stargate_a, { time =10000, x = 700, y = 255, onComplete = goBack})
end
startTransition()
How do i move objects properly without leaking any memory?
|
TFHpple - getting element HTML without element's tags?
I'm parsing some HTML and I need to get all the innerHTML of <body />. I'm doing it this way:
TFHpple *doc = [[TF...More
I'm parsing some HTML and I need to get all the innerHTML of <body />. I'm doing it this way:
TFHpple *doc = [[TFHpple alloc] initWithHTMLData:[NSData dataWithContentsOfFile:sectionFilePath]];
TFHppleElement *body = [doc searchWithXPathQuery:@"//body"][0];
NSString *bodyHTML = body.raw;
However this returns:
<body>stuff inside body</body>
instead of just:
stuff inside body
Question: Is there any way to get the purely the inner HTML of an element, excluding its own tags?
I came up with this method, but I feel like I'm reinventing the wheel here. This method is also quite slow.
TFHppleElement *child;
for(int i = 0; i<body.children.count; i++){
child = (TFHppleElement*)body.children[i];
if(child.raw != nil) [bodyHTML appendString:child.raw];
else if(child.content != nil) [bodyHTML appendString:child.content];
}
|
Protect class from UIAppearance
I have a UIPickerView in a view inside a subclass of UINavigationController. I have a UIAppearance proxy tha...More
I have a UIPickerView in a view inside a subclass of UINavigationController. I have a UIAppearance proxy that I want to apply to many views contained in the UINavigationController subclass, but I don't want the UIAppearance to operate on the UIPickerView.
Is there any way to have the UIAppearance proxy apply to all views inside the UINavigationController subclass and then protect views inside specific objects from its effect?
Without UIAppearance, the screen looks like this:

With this code:
#import "AppDelegate.h"
@interface AppDelegate()
@property (nonatomic, strong) UINavigationController *nvcMain ;
@end
@implementation AppDelegate
@synthesize window ;
@synthesize nvcMain ;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main_ph" bundle:nil] ;
nvcMain = [sb instantiateInitialViewController] ;
window.rootViewController = nvcMain ;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
id apprNVCView = [UIView appearanceWhenContainedIn:[UINavigationController class], nil] ;
[apprNVCView setBackgroundColor:[UIColor cyanColor] ];
return YES;
}
the screen looks like this:

I don't want the subviews of the UIPickerview to be clobbered by the cyan, although I may want to apply cyan to many other views contained in the UINavigationController.
|
WSDL/XML parsing iOS objective C
I would like some help to parse this Response. I think it is WSDL and would like to check "Successfully Entered" string. Below is the code:
More
I would like some help to parse this Response. I think it is WSDL and would like to check "Successfully Entered" string. Below is the code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://example.com/reg/abc">
<soapenv:Header/>
<soapenv:Body>
<sch:LoginResponse>
<sch:Status code=200>Successfully Entered</sch:Status>
<sch:Message>[CDATA[Successfully Entered]]</sch:Message>
</sch:LoginResponse>
</soapenv:Body>
</soapenv:Envelope>
EDIT: Below is the code I have implemented
-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qName
attributes: (NSDictionary *)attributeDict
{
NSLog(@"START ELEMENT NAME ==> %@", elementName);
if( [elementName isEqualToString:@"sch:Status"])
{
if(!soapResults)
{
soapResults = [[NSMutableString alloc] init];
}
elementFound = YES;
}
}
-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
if( elementFound )
{
[soapResults appendString:string];
}
}
-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
NSLog(@"END ELEMENT NAME ==> %@", elementName);
if( [elementName isEqualToString:@"sch:Status"])
{
NSLog(@"Found ==> %@", soapResults);
[soapResults setString:@""];
elementFound = FALSE;
}
}
Print log shows upto sch:LoginResponse and does not come to element name sch:Status
|
How to know the indexPath/row on button click of Tableview cell in a UITableView?
I created a TableView having a custom UITableViewCell. A button is associated with each row of tableview. Now I want to know the row number on click...More
I created a TableView having a custom UITableViewCell. A button is associated with each row of tableview. Now I want to know the row number on click of a button, so that I would know that of which row button has been clicked. I have given a try to few things found on stack but nothing is working.
I have tried this code -:
-(void)button1Tapped:(id)sender
{
UIButton *senderButton = (UIButton *)sender;
UITableViewCell *buttonCell = (UITableViewCell *)[senderButton superview];
UITableView* table = (UITableView *)[buttonCell superview];
NSIndexPath* pathOfTheCell = [table indexPathForCell:buttonCell];
NSInteger rowOfTheCell = [pathOfTheCell row];
NSLog(@"rowofthecell %d", rowOfTheCell);
}
But this is also not working.
Thanks for helping me out.
|
Animation Duration for UICollectionView selectItemAtIndexPath:animated:scrollPosition:
I have tried to set the duration (with the normal methods that I would try) for setting the animation duration for UICollectionView's selectIt...More
I have tried to set the duration (with the normal methods that I would try) for setting the animation duration for UICollectionView's selectItemAtIndexPath:animated:scrollPosition: method (or the scrollToItemAtIndexPath:atScrollPosition:animated: method). I've tried [UIView setAnimationDuration], and I've tried wrapping it in a CATransaction. I've been unsuccessful up to this point at changing that animation duration (although I admit that I could have made a mistake in this logic).
Thoughts?
UPDATE:
I have tried a good number of approaches here. The closest solution is to do what we would normally do for UIScrollView animation (by setting the animated: argument to NO and wrapping it in a UIView animation block). This works perfectly fine for the scrollview. However, this screws with the UICollectionView creation process for some reason.
I have included an example below using two approaches. Each approach assumes that you have 4 sections with 4 items in each section. In addition, the animation assumes you are moving from 0,0 to 3,3.
Using Default Animation
Part of the issue here certainly seems tied to UICollectionView. If you take the following approach (using the default animation option) - all works fine:
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:3 inSection:3]
atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally
animated:YES];
When this is being executed, each cell in-between the current visible cells and the destination cell is created. I have included logging on the collectionView:cellForItemAtIndexPath: method:
2013-05-18 09:33:24.366 DEF-CV-Testing[75463:c07] Transition
Cell Created for Index Path: <NSIndexPath 0x8913f40> 2 indexes [0, 1]
Cell Created for Index Path: <NSIndexPath 0x75112e0> 2 indexes [0, 2]
Cell Created for Index Path: <NSIndexPath 0xfe1a6c0> 2 indexes [0, 3]
Cell Created for Index Path: <NSIndexPath 0x89159e0> 2 indexes [1, 0]
Cell Created for Index Path: <NSIndexPath 0x8a10e70> 2 indexes [1, 1]
Cell Created for Index Path: <NSIndexPath 0x7510d90> 2 indexes [1, 2]
Cell Created for Index Path: <NSIndexPath 0x75112a0> 2 indexes [1, 3]
Cell Created for Index Path: <NSIndexPath 0x8915a00> 2 indexes [2, 0]
Cell Created for Index Path: <NSIndexPath 0x75111c0> 2 indexes [2, 1]
Cell Created for Index Path: <NSIndexPath 0xfe17f30> 2 indexes [2, 2]
Cell Created for Index Path: <NSIndexPath 0xfe190c0> 2 indexes [2, 3]
Cell Created for Index Path: <NSIndexPath 0xfe16920> 2 indexes [3, 0]
Cell Created for Index Path: <NSIndexPath 0x75112a0> 2 indexes [3, 1]
Cell Created for Index Path: <NSIndexPath 0xfe1a4f0> 2 indexes [3, 2]
Cell Created for Index Path: <NSIndexPath 0x75142d0> 2 indexes [3, 3]
Using Custom Animation
When wrapping the scrollToItemAtIndexPath: method in a UIView animation block, items are not created correctly. See code sample here:
[UIView animateWithDuration:5.0 delay:0.0 options:0 animations:^{
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:3 inSection:3]
atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally
animated:NO];
} completion:^(BOOL finished) {
NSLog(@"Completed");
}];
The currently visible cells disappear and only the destination one is created. I have included the same logging on the collectionView:cellForItemAtIndexPath: method:
Transition
Cell Created for Index Path: <NSIndexPath 0x71702f0> 2 indexes [3, 3]
Completed
|
iPhone App Rejected, Reason: App name to be displayed on the App Store does not sufficiently match the name of the app displayed on a device [closed]
My iPhone App Rejected. Here is Apple message from resolution center:
We found that the app name to be displayed on the App Store do...More
My iPhone App Rejected. Here is Apple message from resolution center:
We found that the app name to be displayed on the App Store does not sufficiently match the name of the app displayed on a device, which is not in compliance with the App Store Review Guidelines.
The Application Names are:
Name on the App Store: Angry Stickman Ninja Run Pro
Name displayed on the device: Angry..un Pro
It would be appropriate to change one or both names so they are more similar. And remember, it is not appropriate to use keywords in your app name; please use these words as search terms for your app by entering them in the Keywords field in iTunes Connect, Manage Your Applications.
Here both are same, but by default iPhone names on device is trimmed.
1. Is there any character limit in product name? If so then how much character allowed?
|
Reset appearance settings for UINavigationBar back to default
I've been using the fantastic [[UINavigationBar appearance] set... to set application wide appearances for my UI. However, I'm using th...More
I've been using the fantastic [[UINavigationBar appearance] set... to set application wide appearances for my UI. However, I'm using the SKStoreProductViewController and want to remove all of my styling so that it shows the default Apple UI. Weirdly, without doing anything, I get a mish mash of normal UI and my custom UI, which I don't really understand. I've tried countering all my UI changes like this:
[storeController.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
[storeController.navigationController.navigationBar setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
nil, UITextAttributeTextColor,
nil, UITextAttributeTextShadowColor,
nil]];
[storeController.navigationController.navigationBar setTitleVerticalPositionAdjustment:0 forBarMetrics:UIBarMetricsDefault];
[storeController.navigationController.navigationItem.leftBarButtonItem setBackgroundVerticalPositionAdjustment:0 forBarMetrics:UIBarMetricsDefault];
But that doesn't seem to work, making no difference at all. How can I set it back to the default UI settings?
Regards,
Mike
|
Displaying a screen shot generated UIImage is not displaying in UIImageView (for device only)
I am trying to save an OpenGL buffer (whats currently displayed in the view) to the device's photo library. The code snippet below works fine on the...More
I am trying to save an OpenGL buffer (whats currently displayed in the view) to the device's photo library. The code snippet below works fine on the simulator. But for the actual device it is crashing. I believe there could be a problem with the way im creating the UIImage captured from the screen.
- This operations is initiated via an IBAction event handle method.
- The function i use to save the image is UIImageWriteToSavedPhotosAlbum (i recently changed this to ALAssetsLibrary's writeImageToSavedPhotosAlbum).
- I have ensured that my app is authorized to access the Photos library.
- I also made sure that my CGImageRed is globally defined (defined at the top of the file) and my UIImage is a (nonatomic, retain) property.
Can somebody help me fix this issue? I'd like to have a valid UIImage reference that was generated from the glReadPixels data.
Below is the relevant code snippet (call to save to photo library):
-(void)TakeImageBufferSnapshot:(CGSize)dimensions
{
NSLog(@"TakeSnapShot 1 : (%f, %f)", dimensions.width, dimensions.height);
NSInteger size = dimensions.width * dimensions.height * 4;
GLubyte *buffer = (GLubyte *) malloc(size);
glReadPixels(0, 0, dimensions.width, dimensions.height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
GLubyte *buffer2 = (GLubyte *) malloc(size);
int height = (int)dimensions.height - 1;
int width = (int)dimensions.width;
for(int y = 0; y < dimensions.height; y++)
{
for(int x = 0; x < dimensions.width * 4; x++)
{
buffer2[(height - 1 - y) * width * 4 + x] = buffer[y * 4 * width + x];
}
}
NSLog(@"TakeSnapShot 2");
// make data provider with data.
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, buffer2, size, NULL);
if (buffer) free(buffer);
if (buffer2) free(buffer2);
// prep the ingredients
int bitsPerComponent = 8;
int bitsPerPixel = 32;
int bytesPerRow = 4 * self.view.bounds.size.width;
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault;
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
NSLog(@"TakeSnapShot 3");
// make the cgimage
g_savePhotoImageRef = CGImageCreate(dimensions.width, dimensions.height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent);
NSLog(@"TakeSnapShot 4");
// then make the uiimage from that
self.savePhotoImage = [UIImage imageWithCGImage:g_savePhotoImageRef];
CGColorSpaceRelease(colorSpaceRef);
CGDataProviderRelease(provider);
}
-(void)SaveToPhotoAlbum
{
ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus];
NSLog(@"Authorization status: %d", status);
if (status == ALAuthorizationStatusAuthorized)
{
[self TakeImageBufferSnapshot:self.view.bounds.size];
// UPDATED - DO NOT proceed to save to album below.
// Instead, set the created image to a UIImageView IBOutlet.
// On the simulator this shows the screen/buffer captured image (as expected) -
// but on the device (ipad) this doesnt show anything and the app crashes.
self.testImageView.image = self.savePhotoImage;
return;
NSLog(@"Saving to photo album...");
UIImageWriteToSavedPhotosAlbum(self.savePhotoImage,
self,
@selector(photoAlbumImageSave:didFinishSavingWithError:contextInfo:),
nil);
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Access is denied"
message:@"Allow access to your Photos library to save this image."
delegate:nil
cancelButtonTitle:@"Close"
otherButtonTitles:nil, nil];
[alert show];
}
}
- (void)photoAlbumImageSave:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)context
{
self.savePhotoImage = nil;
CGImageRelease(g_savePhotoImageRef);
if (error)
{
NSLog(@"Error saving photo to albums: %@", error.description);
}
else
{
NSLog(@"Saved to albums!");
}
}
* Update *
I think i've managed to narrow down my issue. I started doing trial & error, where i run the app (on the device) after commenting out lines of code, to narrow things down. It looks like i may have a problem with the TakeImageBufferSnapshot function, which takes the screen buffer (using glReadPixels) and creates an CGImageRef. Now, when i try to create a UIImage out of this (using the [UIImage imageWithCGImage:] method, this seems to be why the app crashes. If I comment this line out it seems like there is no issue (other than the fact that i dont have a UIImage reference).
I basically need a valid UIImage reference so that i can save it to the photo library (which seems to work just fine using test images).
|
Occasional black screen after resuming iPhone app
While testing a new build of our iPhone app, we're occasionally seeing the app window go completely black when resuming the app sometime after appli...More
While testing a new build of our iPhone app, we're occasionally seeing the app window go completely black when resuming the app sometime after applicationWillEnterForeground. The only way to make the app work again is to close it completely and then restart the app. We have not been able to identify steps to consistently reproduce. This issue seems to happen at random, but only when going back into the app after it has been put in the background. Sometimes it happens after a few seconds, sometimes it won't happen for over a week.
There are a few concerning items in the log when this event occurs, however, I have found these items in the log outside of this issue occurring, so I no longer believe them to be part of the problem.
Immediately following ApplicationWillEnterForeground:
installd[54] <Error>: 0x2ff8d000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1cd86080 [0x3c44d100]>{type = mutable set, count = 18,
entries =>
0 : <CFString 0x3c4399f4 [0x3c44d100]>{contents = "CFBundlePackageType"}
1 : <CFString 0x1cebf1e0 [0x3c44d100]>{contents = "BuildMachineOSBuild"}
2 : <CFString 0x3c43aa44 [0x3c44d100]>{contents = "CFBundleResourceSpecification"}
3 : <CFString 0x1ce90cf0 [0x3c44d100]>{contents = "DTPlatformBuild"}
4 : <CFString 0x3c437794 [0x3c44d100]>{contents = "DTCompiler"}
5 : <CFString 0x3c439564 [0x3c44d100]>{contents = "CFBundleSignature"}
6 : <CFString 0x3c43a224 [0x3c44d100]>{contents = "DTSDKName"}
7 : <CFString 0x1cebe5f0 [0x3c44d100]>{contents = "NSBundleResolvedPath"}
8 : <CFString 0x3c436eb4 [0x3c44d100]>{contents = "UISupportedInterfaceOrientations"}
10 : <CFString 0x3c43ee84 [0x3c44d100]>{contents = "DTXcode"}
13 : <CFString 0x3c43eeb4 [0x3c44d100]>{contents = "CFBundleInfoDictionaryVersion"}
16 : <CFString 0x3c43c304 [0x3c44d100]>{contents = "CFBundleSupportedPlatforms"}
17 : <CFString 0x1ceabd10 [0x3c44d100]>{contents = "DTXcodeBuild"}
18 : <CFString 0x1cebb610 [0x3c44d100]>{contents = "UIStatusBarTintParameters"}
19 : <CFString 0x3c43ae54 [0x3c44d100]>{contents = "DTPlatformVersion"}
20 : <CFString 0x3c43dbf4 [0x3c44d100]>{contents = "DTPlatformName"}
21 : <CFString 0x3c43ec84 [0x3c44d100]>{contents = "CFBundleDevelopmentRegion"}
22 : <CFString 0x1ceb9ae0 [0x3c44d100]>{contents = "DTSDKBuild"}
}
Shortly afterwards:
lockdownd[45] <Notice>: 2ff24000 special_case_get: MGCopyAnswer(kMGQReleaseType) returned NULL
This is a build distributed via TestFlight, which we have used successfully for several previous releases. I have observed this behavior in a build deployed by Xcode as well, so that rules out TestFlight as a potential offender, at least in terms of the deployment.
The truly concerning piece of information that I have at this point is that UIApplicationMain and the main method are no longer on the stack.
Here are the threads in the main view during normal operation:

Here are the threads when this issue happens and I pause the debugger:

Why are UIApplicationMain and main no longer on the stack for the main thread? Does anything else look out of place?
UPDATE
I added logging to every method and was able to reproduce this issue. I also added some logging to make sure that the window and none of the views are somehow nil, and everything looks OK. The following log shows going back into the app, seeing the black screen issue happen, and then pressing the home button.
2013-05-15 22:22:23 AppDelegate::applicationDidBecomeActive
2013-05-15 22:22:23 self.window = <UIWindow: 0x1dd6ee80; frame = (0 0; 320 480); opaque = NO; autoresize = RM+BM; layer = <UIWindowLayer: 0x1dd6ef80>>
2013-05-15 22:22:23 self.window.subviews.count = 7
2013-05-15 22:22:23 self.navigationController = <UINavigationController: 0x1dd87190>
2013-05-15 22:22:23 self.navigationController.visibleViewController = <MyViewController: 0x1dd7ffe0>
2013-05-15 22:22:23 self.navigationController.view = <UILayoutContainerView: 0x1dd876e0; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x1dd877a0>>
2013-05-15 22:22:23 self.navigationController.viewControllers.count = 1
2013-05-15 22:22:23 TestFlight: App Token is recognized
2013-05-15 22:22:24 AppDelegate::applicationWillResignActive
2013-05-15 22:22:24 TestFlight: End of Session
This app uses SDWebImage and there are UIImageViews in the displayed view when this issue happens, so perhaps there's an issue there. TestFlight is also a culprit (v1.2.4) so I have removed it from the app and am currently testing to see if the issue pops up again.
|
How to get API_KEY in Android Transliteration
Need help... I am working on transliteration in Android and it requires API_KEY, but as I'm new to Android, I don't know how to get that API_KEY, Ca...More
Need help... I am working on transliteration in Android and it requires API_KEY, but as I'm new to Android, I don't know how to get that API_KEY, Can anybody tell me, what I have to do to get that API_KEY...? Thanks in Advance...!!
Following is my code snippet---
public class MainActivity extends Activity
{
EditText myInputText;
Button myTranslateButton;
TextView myOutputText;
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myInputText = (EditText)findViewById(R.id.inputText);
myTranslateButton = (Button)findViewById(R.id.translateButton);
myOutputText = (TextView)findViewById(R.id.outputText);
myTranslateButton.setOnClickListener(MyTranslateButtonOnClickListener);
}
private Button.OnClickListener MyTranslateButtonOnClickListener
= new Button.OnClickListener()
{
@Override
public void onClick(View v)
{
// TODO Auto-generated method stub
String InputString;
String OutputString = null;
InputString = myInputText.getText().toString();
try
{
GoogleAPI.setHttpReferrer("http:\\www.google.com");
**// Here I need API_KEY**
**GoogleAPI.setKey(" API KEY");**
OutputString = Translate.DEFAULT.execute(InputString,Language.ENGLISH, Language.HINDI);
}
catch (Exception ex)
{
ex.printStackTrace();
OutputString = "Error";
}
Typeface customF = Typeface.createFromAsset(getAssets(), "akshar.ttf");
//final TextView textV = (TextView) findViewById(...);
myOutputText.setTypeface(customF);
myOutputText.setText(OutputString);
}
};
}
|
KVC vs fast enumeration
Which of the following is faster and why?
CGFloat sum = 0;
for (UIView *v in self.subviews)
sum += v.frame.size.height;
<...More
Which of the following is faster and why?
CGFloat sum = 0;
for (UIView *v in self.subviews)
sum += v.frame.size.height;
or
CGFloat sum = [[self.subviews valueForKeyPath:@"@sum.frame.size.height"] floatValue];
|
Showing a view controller modally in monotouch
In my Monotouch based iOS project , i have 2 view controllers .On first ViewController i have created a button by xib.
Now on selection of this butt...More
In my Monotouch based iOS project , i have 2 view controllers .On first ViewController i have created a button by xib.
Now on selection of this button i want to display the second view controller but it is not happening and it causes the application to crash.
So in my design.cs file this is the way the button is created
[Outlet]
MonoTouch.UIKit.UIButton firstButton { get; set; }
[Action ("clickMe:")]
partial void clickMe (MonoTouch.Foundation.NSObject sender);
This is in my button action method in .cs file, which is causing the crash.
partial void clickMe (MonoTouch.Foundation.NSObject sender)
{
SecondViewController secondViewControllerObject=new SecondViewController();
this.PresentViewController(secondViewControllerObject, true, null);
}
Error Description :-
Got a SIGABRT while executing native code.
Terminating runtime due to unhandled exception
Unhandled Exception:
0 TestingFirstProject 0x0008ebce mono_handle_exception_internal_first_pass + 2190
1 TestingFirstProject 0x00090612 mono_handle_exception_internal + 1602
2 TestingFirstProject 0x0009115f mono_handle_exception + 47
3 TestingFirstProject 0x000d42b2 mono_x86_throw_exception + 306
4 ??? 0x0b496f8f 0x0 + 189362063
5 TestingFirstProject 0x00215f38 monotouch_exception_handler + 136
6 CoreFoundation 0x013ca318 __handleUncaughtException + 728
7 libobjc.A.dylib 0x0401d0b9 _ZL15_objc_terminatev + 86
8 libc++abi.dylib 0x0435ea65 _ZL19safe_handler_callerPFvvE + 13
9 libc++abi.dylib 0x0435eacd __cxa_bad_typeid + 0
10 libc++abi.dylib 0x0435fbc2 _ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception + 0
11 libobjc.A.dylib 0x0401cf89 _ZL26_objc_exception_destructorPv + 0
12 CoreFoundation 0x013c9fb1 -[NSException raise] + 17
13 Foundation 0x01a08711 -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
14 Foundation 0x01989ec8 _NSSetUsingKeyValueSetter + 140
15 Foundation 0x019899b7 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
16 Foundation 0x019b4428 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
17 UIKit 0x029410cc -[UIRuntimeOutletConnection connect] + 106
18 libobjc.A.dylib 0x04030663 -[NSObject performSelector:] + 62
19 CoreFoundation 0x0133c45a -[NSArray makeObjectsPerformSelector:] + 314
20 UIKit 0x0293fbcf -[UINib instantiateWithOwner:options:] + 1327
21 UIKit 0x02804e37 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
22 UIKit 0x02805418 -[UIViewController loadView] + 302
23 UIKit 0x02805648 -[UIViewController loadViewIfRequired] + 73
24 UIKit 0x02805882 -[UIViewController view] + 33
25 UIKit 0x02811235 -[UIViewController shouldAutorotate] + 36
26 UIKit 0x02a103d2 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1933
27 UIKit 0x0280e4f3 -[UIViewController presentViewController:withTransition:completion:] + 4521
28 UIKit 0x0280e777 -[UIViewController presentViewController:animated:completion:] + 112
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_bool_IntPtr (intptr,intptr,intptr,bool,intptr) <IL 0x00016, 0x00044>
at MonoTouch.UIKit.UIViewController.PresentViewController (MonoTouch.UIKit.UIViewController,bool,MonoTouch.Foundation.NSAction) [0x0006f] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:659
at TestingFirstProject.TestingFirstProjectViewController.clickMe (MonoTouch.Foundation.NSObject) [0x00006] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/TestingFirstProjectViewController.cs:41
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x0004b, 0x0007d>
33 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
34 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
35 TestingFirstProject 0x0020f086 monotouch_trampoline + 3686
36 libobjc.A.dylib 0x04030705 -[NSObject performSelector:withObject:withObject:] + 77
37 UIKit 0x02727920 -[UIApplication sendAction:to:from:forEvent:] + 96
38 UIKit 0x027278b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
39 UIKit 0x027e8671 -[UIControl sendAction:to:forEvent:] + 66
40 UIKit 0x027e8bcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
41 UIKit 0x027e7d38 -[UIControl touchesEnded:withEvent:] + 546
42 UIKit 0x0275733f -[UIWindow _sendTouchesForEvent:] + 846
43 UIKit 0x02757552 -[UIWindow sendEvent:] + 273
44 UIKit 0x027353aa -[UIApplication sendEvent:] + 436
45 UIKit 0x02726cf8 _UIApplicationHandleEvent + 9874
46 GraphicsServices 0x04d0fdf9 _PurpleEventCallback + 339
47 GraphicsServices 0x04d0fad0 PurpleEventCallback + 46
48 CoreFoundation 0x012b6bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
49 CoreFoundation 0x012b6962 __CFRunLoopDoSource1 + 146
50 CoreFoundation 0x012e7bb6 __CFRunLoopRun + 2118
51 CoreFoundation 0x012e6f44 CFRunLoopRunSpecific + 276
52 CoreFoundation 0x012e6e1b CFRunLoopRunInMode + 123
53 GraphicsServices 0x04d0e7e3 GSEventRunModal + 88
54 GraphicsServices 0x04d0e668 GSEventRun + 104
55 UIKit 0x0272465c UIApplicationMain + 1211
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x00056, 0x000a4>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at TestingFirstProject.Application.Main (string[]) [0x00000] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/Main.cs:17
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00049, 0x00077>
60 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
61 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
62 TestingFirstProject 0x001706a4 mono_runtime_exec_main + 420
63 TestingFirstProject 0x00175a95 mono_runtime_run_main + 725
64 TestingFirstProject 0x00066e05 mono_jit_exec + 149
65 TestingFirstProject 0x0020433d main + 2013
66 TestingFirstProject 0x00002955 start + 53
[ERROR] FATAL UNHANDLED EXCEPTION: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSUnknownKeyException Reason: [<SecondViewController 0x12a36ca0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key butnSubmit.
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSendSuper_IntPtr_bool_IntPtr (intptr,intptr,intptr,bool,intptr)
at MonoTouch.UIKit.UIViewController.PresentViewController (MonoTouch.UIKit.UIViewController viewControllerToPresent, Boolean animated, MonoTouch.Foundation.NSAction completionHandler) [0x0006f] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:659
at TestingFirstProject.TestingFirstProjectViewController.clickMe (MonoTouch.Foundation.NSObject sender) [0x00006] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/TestingFirstProjectViewController.cs:41
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at TestingFirstProject.Application.Main (System.String[] args) [0x00000] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/Main.cs:17
Stacktrace:
Native stacktrace:
0 TestingFirstProject 0x0009148c mono_handle_native_sigsegv + 284
1 TestingFirstProject 0x000d769d sigabrt_signal_handler + 109
2 libsystem_c.dylib 0x9a4c386b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libsystem_sim_c.dylib 0x041e057b abort + 140
5 TestingFirstProject 0x001ea3fd monoeg_g_logv + 157
6 TestingFirstProject 0x001ea42b monoeg_assertion_message + 43
7 TestingFirstProject 0x00215e5f monotouch_unhandled_exception_handler + 159
8 TestingFirstProject 0x0008cefc mono_invoke_unhandled_exception_hook + 140
9 TestingFirstProject 0x0009100a mono_handle_exception_internal + 4154
10 TestingFirstProject 0x0009115f mono_handle_exception + 47
11 TestingFirstProject 0x000d42b2 mono_x86_throw_exception + 306
12 ??? 0x0b496f8f 0x0 + 189362063
13 TestingFirstProject 0x00215f38 monotouch_exception_handler + 136
14 CoreFoundation 0x013ca318 __handleUncaughtException + 728
15 libobjc.A.dylib 0x0401d0b9 _ZL15_objc_terminatev + 86
16 libc++abi.dylib 0x0435ea65 _ZL19safe_handler_callerPFvvE + 13
17 libc++abi.dylib 0x0435eacd __cxa_bad_typeid + 0
18 libc++abi.dylib 0x0435fbc2 _ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception + 0
19 libobjc.A.dylib 0x0401cf89 _ZL26_objc_exception_destructorPv + 0
20 CoreFoundation 0x013c9fb1 -[NSException raise] + 17
21 Foundation 0x01a08711 -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
22 Foundation 0x01989ec8 _NSSetUsingKeyValueSetter + 140
23 Foundation 0x019899b7 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
24 Foundation 0x019b4428 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
25 UIKit 0x029410cc -[UIRuntimeOutletConnection connect] + 106
26 libobjc.A.dylib 0x04030663 -[NSObject performSelector:] + 62
27 CoreFoundation 0x0133c45a -[NSArray makeObjectsPerformSelector:] + 314
28 UIKit 0x0293fbcf -[UINib instantiateWithOwner:options:] + 1327
29 UIKit 0x02804e37 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
30 UIKit 0x02805418 -[UIViewController loadView] + 302
31 UIKit 0x02805648 -[UIViewController loadViewIfRequired] + 73
32 UIKit 0x02805882 -[UIViewController view] + 33
33 UIKit 0x02811235 -[UIViewController shouldAutorotate] + 36
34 UIKit 0x02a103d2 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1933
35 UIKit 0x0280e4f3 -[UIViewController presentViewController:withTransition:completion:] + 4521
36 UIKit 0x0280e777 -[UIViewController presentViewController:animated:completion:] + 112
37 ??? 0x129333bc 0x0 + 311636924
38 ??? 0x12933118 0x0 + 311636248
39 ??? 0x12932ff5 0x0 + 311635957
40 ??? 0x12931ff5 0x0 + 311631861
41 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
42 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
43 TestingFirstProject 0x0020f086 monotouch_trampoline + 3686
44 libobjc.A.dylib 0x04030705 -[NSObject performSelector:withObject:withObject:] + 77
45 UIKit 0x02727920 -[UIApplication sendAction:to:from:forEvent:] + 96
46 UIKit 0x027278b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
47 UIKit 0x027e8671 -[UIControl sendAction:to:forEvent:] + 66
48 UIKit 0x027e8bcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
49 UIKit 0x027e7d38 -[UIControl touchesEnded:withEvent:] + 546
50 UIKit 0x0275733f -[UIWindow _sendTouchesForEvent:] + 846
51 UIKit 0x02757552 -[UIWindow sendEvent:] + 273
52 UIKit 0x027353aa -[UIApplication sendEvent:] + 436
53 UIKit 0x02726cf8 _UIApplicationHandleEvent + 9874
54 GraphicsServices 0x04d0fdf9 _PurpleEventCallback + 339
55 GraphicsServices 0x04d0fad0 PurpleEventCallback + 46
56 CoreFoundation 0x012b6bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
57 CoreFoundation 0x012b6962 __CFRunLoopDoSource1 + 146
58 CoreFoundation 0x012e7bb6 __CFRunLoopRun + 2118
59 CoreFoundation 0x012e6f44 CFRunLoopRunSpecific + 276
60 CoreFoundation 0x012e6e1b CFRunLoopRunInMode + 123
61 GraphicsServices 0x04d0e7e3 GSEventRunModal + 88
62 GraphicsServices 0x04d0e668 GSEventRun + 104
63 UIKit 0x0272465c UIApplicationMain + 1211
64 ??? 0x0e9ccd74 0x0 + 245157236
65 ??? 0x0e9cb3e8 0x0 + 245150696
66 ??? 0x0e9cabe8 0x0 + 245148648
67 ??? 0x0e9cac77 0x0 + 245148791
68 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
69 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
70 TestingFirstProject 0x001706a4 mono_runtime_exec_main + 420
71 TestingFirstProject 0x00175a95 mono_runtime_run_main + 725
72 TestingFirstProject 0x00066e05 mono_jit_exec + 149
73 TestingFirstProject 0x0020433d main + 2013
74 TestingFirstProject 0x00002955 start + 53
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
|
How to access Xcode project with iCloud
I recently bought a MacBook Pro that I will use to develop an iPhone app. I want to be able to transfer the Xcode project between my Macbook and my ...More
I recently bought a MacBook Pro that I will use to develop an iPhone app. I want to be able to transfer the Xcode project between my Macbook and my iMac in the same manner that Word documents can be transferred using iCloud. Is there a secure way this can be done?
|
API key must be passed as the API-Key header in every request
I want to pass API-Key in the header in every request.
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSU...More
I want to pass API-Key in the header in every request.
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
NSLog(@"%@",request );
[request setHTTPMethod: @"POST"];
[request addValue:@"4eaa90d7175e98732543994eaa90d717" forHTTPHeaderField:@"API-Key"] ;
request = [NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:
NSURLRequestUseProtocolCachePolicy timeoutInterval:100];
NSLog(@"%@",url);
NSLog(@"%@",[request allHTTPHeaderFields]);
The allHTTPHeaderFields is null. am i missing something?
|
Xcode 4 - Documentation: How to show the Table of Contents?
simple question, but after jumping over to the new XCode 4 IDE and open the organizer and select the "Documentation", i can´t find a way how to dis...More
simple question, but after jumping over to the new XCode 4 IDE and open the organizer and select the "Documentation", i can´t find a way how to display the "table of contents" of a visible class..
I think about a way how to display it before and the current web-documentation:
Hope someone can answer it.. Thanks

|
Writing and reading text files on the iPhone
As a practice, I am trying to write an app similar to the built-in notes app.
But I cannot figure out how to save the file and ...More
As a practice, I am trying to write an app similar to the built-in notes app.
But I cannot figure out how to save the file and display it in a UITableView.
Right now, I have a UITextView that the user can type in. I also have a save button.
When the user taps the save button, I want to save it, and later have it displayed in a table view.
I am very lost so if you know of any relevant tutorials etc. it would be greatly appreciated.
|
Need to apply for CCATS if using simple XOR cipher?
iTunesConnect states that developers need to get a CCATS Classification if using encryption in the app. My app uses a simple XOR obfuscation cipher ...More
iTunesConnect states that developers need to get a CCATS Classification if using encryption in the app. My app uses a simple XOR obfuscation cipher when transferring data over HTTP. Does this still fall under that requirement? If not, then what type of encryption need to be CCATS classified?
|