ios10

Xcode 8 Core Data Template for iOS 8,9

孤街浪徒 提交于 2019-11-28 05:06:36
I'm developing an app in a new Xcode 8 and I noticed an obvious thing. Xcode generated me Core Data with the latest API references. So if I change deployment target to iOS 8 or 9, it conflicts and propose me to take in brackets: AVAILABLE my Core Data code. That means I have to write from scratch Core Data code from previous API. Does anybody have template for AppDelegate with both of them or maybe it's possible to make Xcode generate them? Thanks in advance! Because no one should have to download Xcode 7, install it, start a new project, and port the template code to swift 3 just to utilize

Error in iOS 10 : Unable to copy asset information from https://mesu.apple.com/assets/ for asset type

北城以北 提交于 2019-11-28 04:49:38
2016-10-05 13:36:21.383340 MyApp[1867:72704] 0x60000015e350 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x60000015e350> { count = 1, transaction: 0, voucher = 0x0, contents = "Result" => <int64: 0x600000226fe0>: 29 } 2016-10-05 13:36:21.385076 MyApp[1867:72704] 0x608000556420 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x608000556420> { count = 2, transaction: 0, voucher = 0x0, contents = "Dictionary" => <dictionary: 0x6080005566e0> { count = 1, transaction: 0, voucher = 0x0, contents = "ServerURL" => <dictionary: 0x608000556790> { count = 3, transaction

ios10: viewDidLoad frame width/height not initialized correctly

拈花ヽ惹草 提交于 2019-11-28 04:06:48
Since upgrading to XCode8 GM and ios10, all of my views created via Interface Builder are not being initialized correctly until much much later than expected. This means in viewDidLoad, cellForRowAtIndexPath, viewWillAppear, etc, the frame size is set to {1000,1000} for every view. At some point they seem to correct, but its far too late. The first problem encountered is with common rounding of corners failing across the board: view.layer.cornerRadius = view.frame.size.width/2 Further problems are showing for anything that relies on frame size to do calculations in the code.

Leaks in Swift 3 / iOS 10

谁都会走 提交于 2019-11-28 03:55:27
问题 When I'm running instruments and check for leaks, it's showing leaks mainly consisting of: _ContiguousArrayStorage<String> _NativeDictionaryStorageOwner<Int, CGFloat> _NativeDictionaryStorageOwner<String, AnyObject> This is when I'm using Swift 3 and testing on devices using iOS 10. The leaks only show up in iOS 10 while on iOS 9.x everything seems to be normal. On top of that, in iOS 10 UISwitch doesn't seem to deallocate either. Currently I've been creating all kinds of workarounds trying

iOS “thread-id” doesn't group push notifications

。_饼干妹妹 提交于 2019-11-28 03:42:14
问题 From the documentation: thread-id | string | When displaying notifications, the system visually groups notifications with the same thread identifier together. For remote notifications, the value of the threadIdentifier property is set to the value of this request header. Our push notification payloads: { aps = { alert = { body = "Leeroy J asked you: Test Push Notification"; }; badge = 12; sound = default; "thread-id" = 9150; }; n = "6kQ/0x6556"; r = 9150; } { aps = { alert = { body = "Leeroy

CTCallCenter is deprecated. What is the alternative?

自闭症网瘾萝莉.ら 提交于 2019-11-28 03:23:43
问题 I am using CTCallCenter in my project. Now it's deprecated, I would like to know what are alternatives? How to get the event for the voice call? 回答1: This is poorly documented, but I've found this mention in CTCallCenter public header files: "Replaced by <CallKit/CXCallObserver.h> " So, from iOS 10 you should use CXCallObserver class of new CallKit framework to retrieve info about active calls: CXCallObserver *callObserver = [[CXCallObserver alloc] init]; Provide object, conforming to

Xcode 8 Beta (null) was unable to service the request

十年热恋 提交于 2019-11-28 02:36:47
问题 I have an app that worked fine in the released version of Xcode. I downloaded the beta and after I fixed all the little changes I ran it and it worked. I just came back and ran it again and I get an error saying The request to open "com.matthewhsingleton.Smoke" failed . (null) was unable to service the request. I have quit Xcode and reopened it, I have restarted my computer, tried different iPhone simulators and all produce the same resulte 回答1: My error was similar, instead of "(null)", the

UIImagePickerController in Swift 3

自作多情 提交于 2019-11-28 01:57:43
I've recently updated to Swift 3 in Xcode 8 using the developer beta. I'm trying to implement Firebase Auth, and everything's going well. My Problem: I'm trying to upload an image as a user's profile picture to a Firebase database. I thought I could use the UIImagePickerController to do this, but when I do, I get a "Thread 7: Signal SIGABRT I know what this would normally indicate, but I checked, and my image does indeed print my test statement when I tap it. My failed method: ViewController.swift import UIKit import Firebase import Photos class ViewController: UIViewController,

Cropping CIImage

孤街醉人 提交于 2019-11-28 01:33:40
问题 I have a class that takes an UIImage , initializes a CIImage with it like so: workingImage = CIImage.init(image: baseImage!) Then the image is used to cut out 9 neighbouring squares in a 3x3 pattern out of it - in a loop: for x in 0..<3 { for y in 0..<3 { croppingRect = CGRect(x: CGFloat(Double(x) * sideLength + startPointX), y: CGFloat(Double(y) * sideLength + startPointY), width: CGFloat(sideLength), height: CGFloat(sideLength)) let tmpImg = (workingImage?.cropping(to: croppingRect))! } }

Multiple UNUserNotifications not firing

本小妞迷上赌 提交于 2019-11-28 01:24:59
I'm setting multiple UNUsernotifications as below, - (void)viewDidLoad { [super viewDidLoad]; notifCount = 0; UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; [center requestAuthorizationWithOptions:(UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert) completionHandler:^(BOOL granted, NSError * _Nullable error) { if (!error) { NSLog(@"request succeeded!"); [self set10Notif]; } }]; } In the set10Notif method, I'm setting multiple(8 for testing) notifications with time 10 seconds from current time. -(void) set10Notif {