ios10

Notification service extension for Local notification

大憨熊 提交于 2019-12-19 02:37:12
问题 will system loads Notification service extension and calls its didReceive(_:withContentHandler:) for local notifications in iOS 10? If yes how we can do that? 回答1: No. The accepted answer describes Notification Content Extensions, which allow you to present a ViewController in the expanded notification view, and works with both remote and local notification. Notification Service Extensions, that let you change the content of the notification (attaching images, etc) do not work with local

iOS 11 Navigation TitleView misplaced

左心房为你撑大大i 提交于 2019-12-19 02:30:42
问题 I have an iOS app in which I am setting a custom navigation title view. It was working fine till iOS 10, but in iOS 11 the navigation title view is misplaced. Here is the screen shot for iOS 10 - Here is the screen shot for iOS 11 - As you can see in the screen shots that when I run the code on iOS 10 the title view appears to be fine. But the same code on iOS 11 shifts the title view down by some pixels and it gets cut. This is how I am setting the title view - navigationItem.titleView = MY

CBCentralManager iOS10 and iOS9

痴心易碎 提交于 2019-12-18 21:18:05
问题 So I'm migrating to iOS10 but I also need my code to run on iOS9. I'm using CoreBluetooth and CBCentralManagerDelegate. I can get my code to work for iOS10 however I need the fallback to work for iOS9 as well. func centralManagerDidUpdateState(_ central: CBCentralManager) { if #available(iOS 10.0, *) { switch central.state{ case CBManagerState.unauthorized: print("This app is not authorised to use Bluetooth low energy") case CBManagerState.poweredOff: print("Bluetooth is currently powered off

iTunes Connect upload rejected with invalid binary because of missing NSCalendarsUsageDescription

懵懂的女人 提交于 2019-12-18 18:56:40
问题 I'm trying to upload an update for an existing App with XCode 8. After the upload I have received this email: "This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data." I know about the new privacy policy for iOS 10 and also how to add the needed description. My problem is: I'm not using the Calendar in my app. Is there a way to

Falling back to loading access token from NSUserDefaults because of simulator bug

偶尔善良 提交于 2019-12-18 13:53:14
问题 Xcode log show the above error while running in Xcode 8.1, ios 10.1. Is there any problem or should I ignore and continue? 回答1: I have this problem, too. It seems to be caused by an the Facebook SDK's Login Access Token. It caches just fine on a real device, but not on the simulators. Try running the app from a physical device. 回答2: You can ignore this warning, it's hard coded in the FacebookSDK when using the iOS Simulator. The SDK does contain a bug though which prevents the simulator from

Push notification not receiving in iOS 10

坚强是说给别人听的谎言 提交于 2019-12-18 12:29:24
问题 My App is in Appstore. Push notification is working fine in iOS 9, but in iOS 10 it is not working. I am not receiving any push notification for iOS 10 devices. I have checked the device token and certificate in my server. All are correct. I have also checked the notification properties in settings app. All are fine. But I didn't receive any notification. I just switch OFF and ON the notification for my app. And I opened my app to check whether device token is changing or not. It is changed

Push notification not receiving in iOS 10

点点圈 提交于 2019-12-18 12:29:17
问题 My App is in Appstore. Push notification is working fine in iOS 9, but in iOS 10 it is not working. I am not receiving any push notification for iOS 10 devices. I have checked the device token and certificate in my server. All are correct. I have also checked the notification properties in settings app. All are fine. But I didn't receive any notification. I just switch OFF and ON the notification for my app. And I opened my app to check whether device token is changing or not. It is changed

iOS 10.0 UIRefreshControl not showing indicator

主宰稳场 提交于 2019-12-18 11:53:36
问题 I am using a UITableView Which has a Pull down to refresh function but the spinner for pull down to refresh is not showing up when I call the [self.refreshControl beginRefreshing] The above code is called inside the viewDidLoad cause the table is loading some data initially. The spinner works fine if I perform a pull down to refresh after the initial refresh. The title shows up but not the spinner. Cant seem to solve this problem. It works fine on iOS 9.3.2 but not on iOS 10. Here is the code

iOS 10.0 UIRefreshControl not showing indicator

杀马特。学长 韩版系。学妹 提交于 2019-12-18 11:52:00
问题 I am using a UITableView Which has a Pull down to refresh function but the spinner for pull down to refresh is not showing up when I call the [self.refreshControl beginRefreshing] The above code is called inside the viewDidLoad cause the table is loading some data initially. The spinner works fine if I perform a pull down to refresh after the initial refresh. The title shows up but not the spinner. Cant seem to solve this problem. It works fine on iOS 9.3.2 but not on iOS 10. Here is the code

Getting loaded vs visible cells on a UITableView or UICollectionView

痴心易碎 提交于 2019-12-18 11:06:49
问题 With the introduction of iOS 10, it seems like we're going to have prefetching enabled by default on UITableView and UICollectionViews. This means that cells that aren't displayed on the screen are going to be fetched before the user actually sees them. Here are some relevant methods: UITableView: cellForRowAtIndexPath:: returns " nil if the cell is not visible." visibleCells: each item represents "a visible cell in the table view." indexPathsForVisibleRows: each item represents "a visible