ios8

What is the cause of this HealthKit error: “An error occurred while adding a sample to the workout”?

醉酒当歌 提交于 2019-12-08 04:37:54
问题 I understand why, but the ambiguity of the errors that HealthKit puts out is a total black box. Why am I getting the error: An error occurred while adding a sample to the workout: The operation couldn’t be completed. I've been scouring the web for examples, but most of them are in swift. :( Here's my code: - (NSSet *)dataTypesToRead { HKQuantityType *heartRate = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierHeartRate]; return [NSSet setWithObjects:heartRate, nil]; } -

iOS share extension dismiss keyboard

末鹿安然 提交于 2019-12-08 04:13:20
问题 I'm implementing a share extension for my app, so far everything is going good except I can't seem to dismiss the keyboard that automatically opens using the default layout/storyboard. I'm keeping the default design/layout (SLComposeServiceViewController) which includes the preview image and UITextview, the UITextview automatically gets in focus which opens the keyboard. Normally this is fine, but if you're not logged in my app I display an UIAlertController saying you need to login to share.

UIActionSheet bad access, UIPresentationController zombie

删除回忆录丶 提交于 2019-12-08 03:12:20
问题 Testing an app in iOS 8, ActionSheet keeps crashing with bad access. (Xcode 6 beta 2, iOS 8 simulator) There is a related post here: UIActionSheet crash in iOS8beta Instruments do catch a zombie related to UIPresentationController . I'm not sure I'm reading it correctly, but it seems that retain count drops from 6 to -1. Here's the full log: Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller 0 Malloc +1 1 00:14.487.023 UIKit UINibDecoderDecodeObjectForValue 1 Retain +1

Attempt to present UIViewController while a presentation is in progress!-Warning

跟風遠走 提交于 2019-12-08 03:10:19
问题 Assume a new iOS project, just with a navigation controller (correctly wired as entry point) and an overridden viewDidAppear() containing the following three lines of code: self.presentViewController(UIViewController(), animated: true, completion: nil) self.dismissViewControllerAnimated(true, completion: {}) self.presentViewController(UIViewController(), animated: true, completion: nil) When executed, that code will raise a warning "Attempt to present UIViewController while a presentation is

What's the safest way to use FileReader with iOS8?

强颜欢笑 提交于 2019-12-08 02:55:48
问题 I have a form that has file selector. <input type="file" ... Run the code snippet below to see what it does. On Safari on iOS8 there is a known bug that means you cannot read file content with FileReader. This only happens on real hardware, the iOS simulator works fine. On Chrome on iOS8 this code sometimes just completely crashes the browser. I don't want to use agent sniffing to decide whether or not to attempt the function. Is there a better way to write this so that I can gracefully

AVSpeechSynthesizer iOS 8 Issues

≯℡__Kan透↙ 提交于 2019-12-08 02:34:34
问题 Since upgrading to xCode 6 and iOS 8 I've noticed serious issues with AVSpeechSynthesizer. Prior to the upgrade, it worked perfectly, but now, several issues have risen. Speech Utterances are playing at a much faster rate then how they were prior to upgrade. When I queue up 2 speech utterances, it simply skips over the first utterance and plays the second one first. (This only occurs on the first run of the speech synthesizer. The second run and on works properly.) Please, any help would be

ASIHTTPRequest crashes the app on ios8

孤人 提交于 2019-12-08 01:17:56
问题 Here I am using JSON to parse the data with ASIHTTPRequest The same code is working fine for my lower version of iOS. (iOs7 & below) But I am not able to run this on my iOS-8 device. The log is getting well, but the app crashes, may be getting late reply from server. It should not crash for late reply. Does any new modification required for iOS-8 for ASIHTTPRequest ? Same code for lower version working well. If I tried to check with debugger ON with each method, I found my code is crashing

confused about different procedures for creating a fat static library in Xcode 6

为君一笑 提交于 2019-12-08 00:33:40
问题 I'm a little confused about information I am finding about how to create a universal framework using the latest Xcode 6 and iOS 8 environment. For instance, this answer includes the following: If you need to create universal static library that runs on both simulator and devices, then general steps are: 1. Build library for simulator 2. Build library for device 3. Combine them using lipo lipo -create -output "framework-test-01-universal" "Debug-iphonesimulator/framework-test-01.framework

How can we disable the effect of enabled “bold text” from settings in the iphone (in my app)? - swift 2.0

依然范特西╮ 提交于 2019-12-07 23:43:32
问题 If the user’s device has bold text enabled there are certain parts of the system that will automatically respond to that. For example, if you are using a default navigation controller in your app, the title and the UIBarButtonItem at the top of the screen will become bold. How can I disable the effect of bold text to all my app and specially to the default navigation controller ( to the title and the UIBarButtonItem ) in my app ? - swift 2.0 ( iOS 8 & 9 ) . thx all : ) I have this code to