ABNewPersonViewController broken in iOS 7 - ios

My app allows the user to link other people within the app to entries in the contact book, and if one doesn't exist add a new one. I accomplish this by presenting an ABPeoplePickerNavigationController with an added button on the top for "Add Contact" which pushes an ABNewPersonViewController.
The problem I have is this functionality works perfectly in iOS 6, but completely fails to work properly in iOS 7. Clicking the "Done" button does absolutely nothing, and clicking "Cancel" simply stops the fields from being editable.
Has anyone encountered something like this and know how to fix it? Is this a known issue (Google search returned nothing useful"

Same problem for me.
My code was as follows,
ABNewPersonViewController *npvc = [[ABNewPersonViewController alloc] init];
npvc.view.backgroundColor = [UIColor colorWithRed:0.188 green:0.545 blue:0.016 alpha:1.0];
After I removed “npvc.view.backgroundColor =…”, it works fine.
Probably the structure of ABNewPersonViewController underneath has changed, so we are not allowed to set its background color.

Related

Master-Detail-Application change the "Back" Button iPad(Objective-C)

To show you my issue I created a new Master-Detail-Application in Xcode 10.1 and with the deployment target iOS 12.1 (I tried other iOS versions too)
I want to change the text of the "Back" Button in the top left corner at the Detail View, which is by default "Master".
I have come up with the following code, which I wrote in the -(void)viewDidLoad method in DetailViewController.m .
self.navigationItem.leftBarButtonItem.title = NSLocalizedString(#"Menu", #"Menu");
[self.navigationItem setLeftBarButtonItem:self.navigationItem.leftBarButton animated:YES];
When I know start the App, the Button is how it should be, but as soon as I press it, it changes back to "Master" and stays that way.
I have tried to put this code anywhere you can imagine, but nothing worked.
I tried several other methods I found online and nothing else worked for me.
EDIT:
I just found out, it only affects iPad, when I test it on iPhone, the button displays correctly.

google drive options is not visible in UIDocumentMenuViewController in IOS10

We have developed chat application and in that app there is one feature of file sharing like whatsapp, Its all working fine in up to iOS9.x, but when I test it in iOS10, google drive option immediately disappear.
That is what I am trying to describe in the case
Tried to send a file,but the google drive dissapear before I even get to select it.
Here is the steps taken before the bug happens :-
•On chat
•Select "Send File"
•Select "More"
•Able to see "Google Drive" for half second before it dissapear(See Attached photo) Options
But up to iOS9.x we there a option of google drive. I search lot on google and on Stackoverflow but Can't find any solution about iOS specific.
we write following code for this:
UIDocumentMenuViewController *documentProviderMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:#[(NSString*)kUTTypeCompositeContent] inMode:UIDocumentPickerModeImport];
documentProviderMenu.delegate = self;
documentProviderMenu.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentProviderMenu animated:YES completion:nil];
new edit:
I get one thing, its hide by UIDocumentMenuViewController because see in second image, if I drag row upside then its appear and google drive available in row number -1. If I re arrange it then I can get it in second row, but first row is disappear by default (not displaying in the screen).
I apply following things but not succeeded.
http://www.openradar.me/radar?id=5065803028234240
http://openradar.appspot.com/19385063
http://www.openradar.me/radar?id=6144449704886272
http://openradar.appspot.com/radar?id=6144449704886272
Please any one tell me what is the issue? Thanks in advance...
I have also faced the same issue. I was able to solve the issue by making navigation bar translucent. You may also use
UINavigationBar.appearance().isTranslucent = true
This appears to be a bug and there is also a similar issue reported here http://www.openradar.me/24564847

Unable to configure launch screen appearance using view controller file

I have a LaunchScreen.storyboard which serves as the launch screen file. In this storyboard is a view controller with the class LaunchViewController.
In my LaunchViewController.m file I changed the view's background color and added a label with the FB shimmering effect (https://github.com/facebook/Shimmer).
_shimmeringView = [[FBShimmeringView alloc] init];
_shimmeringView.shimmering = YES;
_shimmeringView.shimmeringBeginFadeDuration = 0.3;
_shimmeringView.shimmeringOpacity = 0.3;
[self.view addSubview:_shimmeringView];
_logoLabel = [[UILabel alloc] initWithFrame:_shimmeringView.bounds];
_logoLabel.text = #"Shimmer";
_logoLabel.font = [UIFont fontWithName:#"HelveticaNeue-UltraLight" size:60.0];
_logoLabel.textColor = [UIColor whiteColor];
_logoLabel.textAlignment = NSTextAlignmentCenter;
_logoLabel.backgroundColor = [UIColor clearColor];
_shimmeringView.contentView = _logoLabel;
But when I ran it there's only an empty white background displayed as the launch screen. Also I find that he LaunchViewController looks fine when used as a regular view controller. How to make it display the same effect when used as launch screen?
You can't use code inside a launch view controller nib. Whether it is a storyboard or a separate nib. The code is not executed. The only thing that works is what is in InterfaceBuilder like auto layout and stuff. No code is loaded. This would defeat the purpose of using a launch file. The launcfile is loaded before the app has had chance to load.
No app, no code. Only the launch file.
I've had similar problems, and based on your code, it may be similar to mine. First off, I don't understand your question as much as I would like to. You said, "The LaunchViewController works fine when not used as launch screen." Does that mean that it looks the way you want it to look like when viewing on Xcode, but not on the simulator? I will try to provide possible solutions, and some trouble-shooting tips.
It could be something as simple as your background(or something) is at the front of the screen, blocking the rest. If so, you have to reconfigure the order of your items on your launch screen in your xib file in your application.
It could be an error on your part. Some of my programmer friends develop their launch screens using the Xcode interface: I find that easier to use, and it may have less errors.
It could be an issue with the iOS simulator. This is not likely to be true, but it could be. Try running the app on your device and see if it is fine there.
Troubleshooting: In order to trouble shoot your code, comment out your code, and load in all the elements of your launch screen one at a time, checking the iOS simulator and the console in between. You will eventually find the problematic code, and be able to fix it. From looking at your code, I don't see anything wrong (but don't take my word on it, I'm not familiar with coding the launchscreen/storyboard in swift. Good luck, and I hope my tips work. Also, if your launch screen is appearing fine inside Xcode, it is a programming error or an error on the iOS simulator. A picture or a description of your launch screen could also help future people who will answer this question.

Pressing FBLikeControl displays blank page and returns to app

I have integrated Facebook's native Like Button control in my iOS app with the following lines:
FBLikeControl *likeControl = [[FBLikeControl alloc] init];
likeControl.objectID = #"http://www.facebook.com/<mypage>";
// .. add likeControl to view hierarchy ..
The button appears fine and works some of the time. That is, when you press it it takes you to the Facebook app and prompts you to like the page in question. If you consent then it adds your like to the page.
But intermittently, it does not work. It takes you to the Facebook app, where it shows you a blank light gray / light white page with a small and light Facebook logo, pauses for a but and then sends you back to the app without taking any action.
Any ideas what might be making it fail?
FBLikebutton is a preview feature only developer and tester can use this functionality.
FBLikeControl *likeControl = [[FBLikeControl alloc] init];
likeControl.objectID = [NSString stringWithFormat:#"url here"];
likeControl.likeControlStyle = FBLikeControlStyleButton;
likeControl.frame = CGRectMake(0, 0, 44, 44);
likeControl.transform = CGAffineTransformMakeScale(0.7f, 0.7f);
likeControl.likeControlHorizontalAlignment = FBLikeControlHorizontalAlignmentCenter;
likeControl.likeControlAuxiliaryPosition = FBLikeControlAuxiliaryPositionBottom;
[likeControl sizeToFit];
[self.view addSubview:likeControl];
check this code.
It appears that you have to get the Native Like Button reviewed by Facebook before it becomes production-ready. The documentation for the Native Like button describes the penalty for non-reviewed apps as a "Beta" banner appearing on the Like page, and does not mention that it simply doesn't work, but this is the only explanation I could come up with. I have gone ahead and submitted my app for review. I'll update this post with the outcome.
-- Edit --
That was it. Our app was approved to use the Native Like Button within 48 hours of submission, and ever since, all Likes work fine. Prior to that, only likes by developers of the app were working. In short, to make the Native Like button work you have to submit it for review by Facebook. Go to your app page --> Status and Review.

UIBarButtonItem appears in iPad simulator but not in actual app

I've got a puzzle. I'm a newbie and recently got my first app approved. However, I just noticed that a question mark icon that appears fine when I run the app in Xcode's iPad simulator is invisible for some reason in the actual app store app. The question mark is a UIBarButton item in the toolbar of the starting view controller in the app. The curious thing is the UIBarButton is obviously present in the actual app store app because when I click on that area of the screen, the information screen that it is supposed to show does indeed appear. But for some reason the button itself seems to be invisible in the app store app (but, again, the very same UIBarButton IS visible when I run my program on Xcode's iPad simulator).
One more piece of info: When I first start up the app downloaded from the app store on my iPad, the blue question mark actually does appear briefly in the toolbar of the app for about 1/4 second but then disappears.
Here below is the code segment which is in the viewDidLoad method of the starting view controller. The questionMarkBarButton property is a UIBarButtonItem which brings up an information screen when clicked.
[self.questionMarkBarButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:#"Helvetica-Bold" size:26.0], UITextAttributeFont,nil] forState:UIControlStateNormal];
Any ideas what could be causing this strange behavior? I'm at a loss how to proceed because apparently I can't debug this using Xcode's iPad simulators since they show that the question mark UIBarButtonItem is visible and behaves as expected.
Additonal Info:
Here's how the UIBarButtonItem is declared in the .h file of the view controller:
#property (weak, nonatomic) IBOutlet UIBarButtonItem *questionMarkBarButton;
It appears to be hooked up correctly, as evidenced by the fact that the button works (although it is invisible in the app downloaded from the App store).
Also, here is a picture of this part of the storyboard:
Finally here is what the starting screen looks like on the Xcode simulator. You can see the question mark button in the toolbar here, but for some reason it is invisible (although present) in the version of the app downloaded from the app store:
More info:
In examining my app again, I see that there later on in the app I again use a UIBarButtonItem to present an information screen, and it appears and works as it should. The most apparent difference between how I coded these UIBarButtonItems is that for this problematic "question mark" UIBarButtonItem I tried to make the question mark bolder and more prominent by putting the following line of code in the viewDidLoad method of the view controller, whereas I did not use the following line of code with the UIBarButtonItem that appears later in the app (i.e., I let the text in this other UIBarButtonItem just appear in its plain, default form).
[self.questionMarkBarButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:#"Helvetica-Bold" size:26.0], UITextAttributeFont,nil] forState:UIControlStateNormal];
So unless anyone has any better idea, I guess I'll just submit an update for my app in which I remove this line of code and let the question mark appear in its plain, default style rather then an enlarged, bold style.
Final edit (12/7/13)
I removed the code line above and resubmitted my app to the App Store. The app now works properly, with the "?" information button now showing. The bottom line appears to be that the setTitleTextAttributes method does not currently appear to be a good, reliable method to use with UIBarButtonItem objects. It will appear to work fine in the Xcode simulator, and even in testing with your own iPhone and iPods, but for some reason it will not work when people download the app from the Apple store.
Objective c is case sensitive, Make sure your bar button variable that you create and assign are same . hope this may help you. as this is one of the issue when things go right for simulator instead of device.

Resources