ios7

Wait for completion block of writeImageToSavedPhotosAlbum by semaphore

Deadly 提交于 2019-12-29 02:01:11
问题 In my app I open the camera by a picker and after the photo has been taken I'd like to safe it by the following method the assets library. The method freezes after the call of the writeImageToSavedPhotosAlbum. Without the semaphores the methods work perfectly. But than I miss to receive the assetURL. + (NSURL*)safeImageToAssetsLibrary:(UIImage *)image metadata:(NSDictionary *)metadata { ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; __block NSURL *retAssestURL = nil; dispatch

NSFetchedResultsController: Multiple FRCs, Delegate Error when Updating

别等时光非礼了梦想. 提交于 2019-12-29 02:01:06
问题 Objective: Using FRC, sort Section's by startDate , an NSDate attribute, but want Today 's date Section to appear before Upcoming dates Section . I followed Apple's code using a transient property sectionIdentifier . Apple's sample code . and started with this project first: OneFRC I soon realized that this may not be possible with just one FRC (I could be wrong). Next, I decided to take a stab at this with 3 FRCs : ThreeFRC. TableView sections now appears in the Order that I want: Section 0:

Error delivering iOS App update. “This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK.”

无人久伴 提交于 2019-12-29 01:34:10
问题 I reticently delivered an app to the iOS App store on 1/24/2014. It's an iO7/iPhone only app and everything was delivered correctly. As of yesterday my app was approved and it is currently visible in the App Store. I put together a small update and am currently working on getting it delivered using Application Loader. However, now when I upload my production IPA it gets rejected due to what seems like a sdk error. Messages: Apple's web service operation was not successful Unable to

UIActivityViewController => LaunchServices: invalidationHandler called

别来无恙 提交于 2019-12-29 00:35:11
问题 I am playing around with the idea of Airdrop. There is an error while running the sample code by Apple: https://developer.apple.com/library/ios/samplecode/sc2273/Introduction/Intro.html The error message is: LaunchServices: invalidationHandler called The problem is obviously caused by UIActivityViewController . The related code is under #pragma mark - Actions of this file if you could have a look. It only show the error message when running on devices (both iPhone and iPad). It is all fine if

Dynamically resize label in iOS 7

蓝咒 提交于 2019-12-28 13:40:24
问题 In iOS 6, I am using : CGSize labelSize = [self.text sizeWithFont:self.font constrainedToSize:size lineBreakMode:self.lineBreakMode]; self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y , labelSize.width, self.frame.size.height); To dynamically resize a UILabel. This does not work in iOS 7 so I tried: NSString *text = self.text; CGFloat width = size.width; UIFont *font = self.font; NSAttributedString *attributedText = [[NSAttributedString alloc] initWithString:text attributes:@{

Change UIFont in secure UITextField strange behaviour in iOS7

你说的曾经没有我的故事 提交于 2019-12-28 11:59:11
问题 I create a simple project: https://github.com/edzio27/textFieldExample.git where I add two UITextField s, one with login and second one with secure password. I've noticed there strange behaviour: click on login and add some text, click on password and add some text, click again to login UITextField Notice that there is a strange behaviour in password font size. It is only appears in iOS7. What can be the problem? Thanks. 回答1: As a couple people pointed out, it appears secure text fields don't

ios 7 device token is different for same device

时光毁灭记忆、已成空白 提交于 2019-12-28 10:06:36
问题 I have two applications in one device. For iOS 7 both applications are sending different device tokens but for iOS 6 both apps are sending same device token. As per my understanding device token has to be same for all the application in one device. Is there something different in iOS7 than iOS 6? 回答1: UPDATE: I guess I read this one a bit too quickly. Please note my revisions. If the answer meets your use-case please feel free to accept it. Based on your description I would suggest that there

MFMessageComposeViewController iOS7 addAttachmentData:typeIdentifier:filename: not working

浪子不回头ぞ 提交于 2019-12-28 10:05:07
问题 I want to attach an image to a MMS, on iOS7. I wrote following code: MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init]; messageController.messageComposeDelegate = self; NSData *imgData = [NSData dataWithContentsOfFile:@"blablabla"]; BOOL didAttachImage = [messageController addAttachmentData:imgData typeIdentifier:@"public.data" filename:@"image"]; if (didAttachImage) { // Present message view controller on screen [self presentViewController

How to get iOS appStoreReceiptURL into Base 64 Encoded String?

给你一囗甜甜゛ 提交于 2019-12-28 08:12:49
问题 I want to use appStoreReceiptURL to see which version of the app someone purchased. How can I get this into a string? I'm testing this by downloading the app from the store, then running a new version of the app from Xcode. Here is what I've tried: NSURL *receiptUrl = [[NSBundle mainBundle] appStoreReceiptURL]; NSLog(@"receiptUrl %@",[receiptUrl path]); if ([[NSFileManager defaultManager] fileExistsAtPath:[receiptUrl path]]) { NSLog(@"exists"); NSError *error; NSString *receiptString = [

How to set one of the screens in landscape mode in iphone?

≯℡__Kan透↙ 提交于 2019-12-28 06:55:10
问题 I am developing iphone application in iOS7, i am facing problem in autorotate single screen in landscape mode programatically, while other screens remains in portrait mode. I am using Story board. 回答1: I used following and its working for me in both iOS6 and iOS7 also,try following way : // Added method for Autorotation in you app delegate - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ //NSLog(@"AppDelegate --