ios9

With CNContactPickerViewController in iOS 9.0, how to enable/disable single or multiple selection?

人走茶凉 提交于 2019-12-20 11:51:46
问题 The delegate CNContactPickerDelegate have methods for single and multiple selections. But how do we specify we want single or multiple selection when we present the view controller? I guess I miss something that perhaps also causes the problem I have described in: CNUI ERROR Selection predicates are set but the delegate does not implement contactPicker:didSelectContact: 回答1: You need to implement ONLY the method you need. If you want only one contact, implement: contactPicker:didSelectContact

Sample code on dynamic UIApplicationShortcutItems

十年热恋 提交于 2019-12-20 10:37:12
问题 I'm looking after some Obj-C sample code for a dynamic UIApplicationShortCutItem . Basically, I have three static UIApplicationShortcutItems and I only want to display them under certain conditions. I presume that you can't change the visible status of a static UIApplicationShortcutItem , so I'm looking after a simple way to add dynamic UIApplicationShortcutItem s. 回答1: You can use the following code to add shortcutitem for you app dynamic: UIApplicationShortcutIcon * photoIcon =

UIStackView before iOS 9.0

六眼飞鱼酱① 提交于 2019-12-20 08:56:18
问题 I recently upgraded XCode to the latest Version 7.0 beta 3 (7A152u). I am using Swift for building an iPhone app and when I try to use a Stack View in Main.storyboard I get the error " UIStackView before iOS 9.0 ". I thought with the upgrade to Xcode 7 beta 3, I have iOS 9. Please correct my understanding as I am quite new to Swift development. 回答1: Check in Project Targets-> Deployment info -> Deployment Target .If it's not 9.0 change it to 9.0. You need to change the deployment target of

3D Touch Home Shortcuts In Obj-C

落爺英雄遲暮 提交于 2019-12-20 08:35:31
问题 All of my apps are currently written in Obj-C. The link https://developer.apple.com/library/content/samplecode/ApplicationShortcuts/Introduction/Intro.html#//apple_ref/doc/uid/TP40016545 for the sample code of implementing Home Screen Shortcuts with 3D Touch is completely compiled in Swift. Anyone come across documentation for Obj-C, so I don't have to go through my AppDelegate and translate it all? UPDATE: After adding in all the shortcuts in Info.plist, I added in the AppDelegate.m: - (void

Push notification is not receiving on device

你说的曾经没有我的故事 提交于 2019-12-20 07:34:58
问题 I am using push notification through PHP script. Code seems to be working fine, it does not give me any error. But notification does not receive me on my device. Here is my code: $passphrase = '123'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'cert.pem'); stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase); $fp = stream_socket_client( 'ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT

Firebase/Swift 2 - How to get an authenticated users password and email

给你一囗甜甜゛ 提交于 2019-12-20 06:37:03
问题 I'm trying to setup a password reset within an app using swift 2 and Firebase. Following Firebases example: let ref = Firebase(url: "https://<YOUR-FIREBASE-APP>.firebaseio.com") ref.changePasswordForUser("bobtony@example.com", fromOld: "correcthorsebatterystaple", toNew: "batteryhorsestaplecorrect", withCompletionBlock: { error in if error != nil { // There was an error processing the request } else { // Password changed successfully } }) How can I access an authenticated users email &

Exclude iPhone 4S devices from downloading app

旧城冷巷雨未停 提交于 2019-12-20 03:37:08
问题 I will be releasing an app soon, but I specifically want to support iPhone 5 or later. Is there a way of excluding iPhone 4s devices? My app deployment target is iOS9, and iPhone 4S is the oldest device that can have iOS9, but because of screen size constraints I would prefer not to support those devices. 回答1: No, if you are going to support iPhone you need to support all the iPhones that support the version of the operating system. Apple will reject it for not supporting the 4S. It is a pain

UITableView line seperator visible for alternative cells in iOS 9

自作多情 提交于 2019-12-20 03:14:05
问题 I am facing issue for UITableView line separator. Line is visible for alternative rows. Adding UIView with height 1 to the cell will give the solution but this is not the correct way. And the below code is working perfect for iOS 8 but in 9 it's showing different nature. - (IBAction)curencySelect:(id)sender { currencyTable = [[UITableView alloc]initWithFrame:CGRectMake(29, 257, 265,113) style: UITableViewStylePlain]; } #pragma mark - #pragma mark UITableViewDelegate - (NSInteger

Enable bitcode Xcode 7.1

我的梦境 提交于 2019-12-20 03:13:38
问题 I'm having this error in XCode 7.1 when building the application for iOS9: (...) MyoKit(TLMHub.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) When building the application for the simulation, it works. I've been searching and I can't find an option to enable

App stuck in splash screen on iOS 9 with no error

若如初见. 提交于 2019-12-20 03:02:10
问题 My app gets stuck on splash screen in iOS 9 both on iPhone and simulator. I can run it on iOS 8 or lower on device and simulator with no problem. My colleague working on the same app has exactly the same problem. There is no error or anything, just hangs on splash screen. If I stop it on xcode and try to run it from the phone or simulator directly, it would run without any problem. By the way, I don't see didFinishLaunchingWithOptions or willFinishLaunchingWithOptions getting called! 回答1: In