ios10

Get blank page while log in, share and like with Facebook SDK on iOS 10 with Facebook SDK 4.15.1

拜拜、爱过 提交于 2019-12-10 21:36:51
问题 I get this error when using FBSDKLoginKit, FBSDKShareKit, to login, share link and like a link in my application. I using FBSDKLoginButton to login @property (nonatomic, strong) IBOutlet FBSDKLoginButton *loginButton; - (void)viewDidLoad { [super viewDidLoad]; self.loginButton.publishPermissions = @[@"publish_actions"]; } Using FBSDKShareKit to share: - (FBSDKShareDialog *)getShareDialogWithContentURL:(FBSDKShareLinkContent *)content { FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]

ios 10 app crashes when accessing camera

浪子不回头ぞ 提交于 2019-12-10 21:23:24
问题 I am new to ios. I am building an app which requires camera access, and according to new requirements I have already added following camera permission in info.plist but still I am getting following exception. I have also tried cleaning and reinstalling app on my phone. Does any one know how to fix this. info.plit This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a

CLLocation Prompt shows and disappears in one moment

纵然是瞬间 提交于 2019-12-10 17:56:04
问题 In my app I try to get longitude and latitude from GPS. To do that I have to ask user about permission to access to his location. Before I do that I add to Info.plist this two rulees: Privacy - Location When In Use Usage Description and Privacy - Location Always Usage Description , then in AppDelegate I ask about permission doing it (SWIFT 3.0): if CLLocationManager.locationServicesEnabled() == true { let localisationManager = CLLocationManager() localisationManager

Notification extension access Core Data

↘锁芯ラ 提交于 2019-12-10 17:55:27
问题 I am trying to send a local notification with custom UI that shows the user more content than the notification itself contains. I want to get the content from the app's core data. Is it possible? When I debug the notification content extension it crashes on the following line where the core data model path is retrieved: let modelURL = NSBundle.mainBundle().URLForResource("Model", withExtension: "momd")! Also, when I print(NSBundle.allBundles()) from the notification extension code, it prints

AVCaptureDevice isFlashModeSupported deprecated iOS 10

最后都变了- 提交于 2019-12-10 16:26:16
问题 I am using AVCaptureDevice's instance method "isFlashModeSupported" as below: NSArray *captureDeviceType = @[AVCaptureDeviceTypeBuiltInWideAngleCamera,AVCaptureDeviceTypeBuiltInMicrophone]; AVCaptureDeviceDiscoverySession *captureDevice = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:captureDeviceType mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified]; NSArray *deviceList = [captureDevice devices]; AVCaptureDevice *selectedCamera = [deviceList

How to set both spacing between characters (kern) and strikethrough style for `UILabel`?

放肆的年华 提交于 2019-12-10 14:32:24
问题 I need to set two attributes to a text presented by a UILabel : spacing between letters (kern), and its strikethrough style. Based on the NSAttributedStringKey documentation I have created the following extension to the UILabel : extension UILabel { func setStrikeThroughSpacedText(text: String, kern: CGFloat?) { var attributes: [NSAttributedStringKey : Any] = [:] if let kern = kern { attributes[.kern] = kern } attributes[.strikethroughStyle] = NSNumber(integerLiteral: NSUnderlineStyle

-canOpenURL: failed for URL: “fbauth2:/” - error: “This app is not allowed to query for scheme fbauth2” (OSStatus error -10814.)

∥☆過路亽.° 提交于 2019-12-10 14:17:13
问题 This error message when I try to login:_ -canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" I have macOS High Sierra 10.13.6. My Xcode version is 9.4.1. SDKs iOS 10.2, Simulator I have tried mothod but doesn't help: https://developers.facebook.com/docs/ios/ios9 I also did try to play around LSApplicationQueriesSchemes but not success as well. 回答1: The same issue I resolved it by adding this in Info.plist <key

IBInspectable with Cocoa Touch Framework not working? (code attached)

蹲街弑〆低调 提交于 2019-12-10 13:17:07
问题 I can not seem to get the "titleText" IBInspectable attribute working. I have a simple framework view with a UILabel which I create an IBInspectable variable "titleText". I note the inspectable "layer" variables work as expected, but not my custom "titleText" which is supposed to update the main view using this framework. Issues are: Interface Builder not updating the titleLabel? (i.e. at design time) i.e. I'm expecting that this should, just like it is working for the "layer" items. At Run

Xcode 8 Simulator crash

血红的双手。 提交于 2019-12-10 11:08:11
问题 I recently downloaded the Xcode 8 beta. When I try to open the simulator, it gets stuck on the black Apple screen and I get a crash message for "SpringBoard". Any ideas? I'm happy to edit if I left out anything. Thanks in advance! 回答1: This is a known issue that is mentioned in the release notes and is related to issues in the download and install process. If you don't follow the installation instructions exactly, you can trip over this issue. The workaround is rather straight forward: Using

ld: framework not found error in xcode 8

喜你入骨 提交于 2019-12-10 11:07:53
问题 I am using xcode 8 for development and cocoapods 1.0.1 for frameworks. After installing frameworks, i couldn't able to build my project. I am getting "ld: framework not found" error. I am using following lines in pod file: # Uncomment this line to define a global platform for your project platform :ios, '9.0' target 'Sample' do use_frameworks! pod 'MBProgressHUD', '~> 0.9' pod 'TPKeyboardAvoiding', '~> 1.2' pod 'SDWebImage', '~> 3.7' pod 'UIActivityIndicator-for-SDWebImage' pod 'UITextView