ios10

Irregular timestamp in CMMotionManager

风格不统一 提交于 2019-12-24 01:59:31
问题 Researched this a lot for the past week but could not find a similar issue. I am collecting accelerometer data on the Apple Watch and looking at the timestamp outputted by the the DeviceMotion class which presents an issue. The timestamps do not always go in chronoligcal order. For example, if I collect a few minutes of motion data at 100Hz, I get the following timestamps from a CSV file I generate in the same app (these are UTC timestamps): 1531099702.768570 1531099702.778460 1531099702

iOS 10 bug? NSDate hour description with Japan region and 24-Hour Time off

混江龙づ霸主 提交于 2019-12-23 19:10:30
问题 This seems like an iOS 10 bug. It is OK in iOS 8 and 9. The hour description is wrong for [NSDate date].description. It is appending the 24 hour description and 12 hour description. I am not using NSDateFormatter. Just the default settings. On a real iOS 10 device, in Settings: Set Region to Japan in Settings > General > Language & Region > Region Formats > Region Set 24-Hour Time Off in Settings > General > Date & Time > 24-Hour Time Then with: NSLog(@"Date is %@", [NSDate date].description)

Codesign error - SecKey API returned: -67671

喜欢而已 提交于 2019-12-23 17:40:52
问题 When I try to run codesign of a particular app, I get an error: /Users/xxx/xxxxxx/xxxxx.app: replacing existing signature SecKey API returned: -67671 (null)/Users/xxx/xxxxxx/xxxxx.app unknown error -1=ffffffffffffffff Any idea what this means? 回答1: In my case needed to do the following: in the Keychain Access right click on the Private Key (if it is not seen, expand the Certificate by clicking on the little triangle near it) Choose Get Info Go to Access Control tab, choose "Allow all

3D Touch Shortcut Widget

心不动则不痛 提交于 2019-12-23 07:04:56
问题 i'm trying to implement new "quick menu widget" in iOS 10 available with 3dtouch. My app has multiple today extension and apple guidelines report If your app has multiple widgets, pick one to appear in the quick action menu that appears when someone applies pressure to your app icon on the Home screen using 3D Touch. I don't understand where i can "change" that! With only one widget all works as well. 回答1: There is a new Info.plist key UIApplicationShortcutWidget which you need to set to the

NSManagedObjectContext in ios 10 and ios 9 (core data)

五迷三道 提交于 2019-12-23 05:15:29
问题 I am having an app which use core data which supports both ios 9 as well ios 10.I am using xcode 8.2.1 for developing this project. The AppDelegate file have method for to get ManagedObjectContext when app runs on ios 10 but, how do i get it when app works on ios 9. I tried to google but nothing helped much. Any help ! the code i use to get ManagedObjectContext is here : NSManagedObjectContext *context = ((AppDelegate*)[[UIApplication sharedApplication] delegate]).persistentContainer

Register remote notifications ios10 and catch the apn token

微笑、不失礼 提交于 2019-12-23 03:16:39
问题 Could anybody explain to me how to register for remote push notification and catch the token, using the new UserNotification framework provided by iOS10 ? 回答1: You can register to notifications like you're already doing from iOS 8 (it's one of the few API for notifications that hasn't changed). First, in the application:didFinishLaunchingWithOptions: method of the AppDelegate, request the authorization for your app: UNUserNotificationCenter.current().requestAuthorization([.alert, .sound,

Im not getting push notifications in production in iOS 10

本小妞迷上赌 提交于 2019-12-23 02:17:23
问题 Im using Firebase messaging and I was able to get notifications in development mode, but as soon as I archived my bundle and upload it to App Store I'm not getting notifications in test flight. Because I have a previous version of the app with iOS 7, i can see the notifications are arriving to that device,(so I suppose my profiles and certificates are ok) but not on thee device using iOS 10, and the test flight built. 来源: https://stackoverflow.com/questions/43306068/im-not-getting-push

Store NSMeasurement or NSUnit in Core Data

北城以北 提交于 2019-12-22 23:20:13
问题 iOS 10 introduces new classes for measurements and units. I would like to either store a NSMeasurement or NSUnit object in my core data database, so that I can store different measurements in my database. Is there a good way to do this? Since my app would only use a subset of all available units, I could in theory create a string representation of the units and use a switch statement to get the actual unit classes from that when needed. But that feels overly complicated and error prone. 回答1:

Creating a MSSticker with a remote image

时间秒杀一切 提交于 2019-12-22 19:01:52
问题 I am trying to figure out way to create MSStickers with images that are hosted on the web. I can create MSStickers with local images, e.g.: NSString *imagePath = [[NSBundle mainBundle] pathForResource: @"image_name" ofType: @"png"]; NSURL *imageURL = [NSURL fileURLWithPath: urlString]; MSSticker *sticker = [[MSSticker alloc] initWithContentsOfFileURL: stickerURL localizedDescription: @"my-sticker" error: &err]; But I cannot do something like this: NSString *imageURLString = @"https://my-cdn

Location timestamp accuracy in ios

最后都变了- 提交于 2019-12-22 17:51:27
问题 After analysing location services in iOS 10, found that some inconsistency is in the caching behaviour. Fetching locations in a periodic time (in my case every 20 secs) returns locations but their timestamps are not in chronologically ordered. This indicates that the caching locations might have issues. So if you are checking accuracy through location-timestamp better to save the previous timestamps also. So that you could decide that the location fetched can be used or not. Below image is