ios11

UIActivityViewController Facebook sharing URL + IMAGE and URL + TEXT not working

蓝咒 提交于 2019-12-08 04:13:57
问题 Please don't mark duplicate already seen iOS11: UIActivityViewController not successfully sharing UIImage to 3rd party apps So I am trying to share Image + URL with UIActivityViewController . However when tap on facebook it only show URL , Image is not showingup Here is my code @IBAction func btnShareTapped(_ sender: UIButton) { if let image = self.imgBackground.image, let jpgImage = UIImageJPEGRepresentation(image, 0.8) { let shareItems:Array = [jpgImage,URL(string: "https://www.facebook.com

Having trouble with MusicKit sample app provided by Apple

社会主义新天地 提交于 2019-12-08 03:30:18
问题 I am trying to build "Adding Content to Apple Music”, Music Kit sample app provided by Apple, on Xcode 9 beta 3. However I am having 4 errors like this : three “Ambiguous use of 'play()’” errors and one “Ambiguous use of 'pause()’” Please tell me how to fix this if you already solved this problem. func beginPlayback(itemCollection: MPMediaItemCollection) { musicPlayerController.setQueue(with: itemCollection) //Ambiguous use of 'play()’ musicPlayerController.play() } func beginPlayback(itemID:

Programmatic beginRefreshing() on iOS11 has problems with largeTitles mode

旧巷老猫 提交于 2019-12-07 13:24:51
问题 We have found what seems to be a bug in UIKit but wanted to post here to see if anyone else has this problem or found a solution. We're trying to use the new iOS11 large titles and hoisted search bar/refreshcontrol. We seemed to have found a problem where the root viewController of the navigation stack shows a minor display issue (problem A) but once another viewcontroller is pushed onto the navigation stack, the display goes nuts (problem B): Things to note: The problem is worse on the 2nd

Prompt when trying to dial a phone number using tel:// scheme on iOS 11

谁说胖子不能爱 提交于 2019-12-07 11:38:02
问题 I am facing an issue, while trying to start a phone call from my iOS app using: UIApplication open(_:options: completionHandler:) iOS shows an confirmation popup/alert before starting the call with two button Call & Cancel and CompletionHandler called with a Bool parameter having true/false based on button action in iOS 10. But now in iOS11 the problem is that the completionHandler is being called automatically before tapping on "Cancel" or "Call" button of confirmation popup, always having

Google Admob live ads not showing in iOS 11 on real device

拟墨画扇 提交于 2019-12-07 10:42:32
问题 I have searched and found posts online and on StackOverflow which have the same or similar error message as me, but none of them are having the same bug as me. They have different conditions i.e. the error message appears in different situations or they are on a different version of iOS etc. I’ve tried all the solutions i’ve found online. Basically I am using Admob to show banner ads and interstitial ads in my iOS app. These have been running in the live app for over a year, they are still

How do i handle HTTP load failed (error code: -1009 [1:50]) in swift 4?

我怕爱的太早我们不能终老 提交于 2019-12-07 09:13:36
问题 I created on app using swift 4 and Xcode 9. when I login into my app I send a request and successful login on result which come from json. But when I switch my internet of my phone it crashed and give me this error HTTP load failed (error code: -1009 [1:50]) So how do I handle this error and give popup or any warning to user to check your internet connection without app crashing. 回答1: Swift 4, Xcode 10.1 You can access to the error code: class ViewController1: UIViewController,

CoreNFC debug not working

给你一囗甜甜゛ 提交于 2019-12-07 09:11:58
问题 How programmatically work CoreNFC on xcode-9 func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error) { //What I need to do here } func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) { //What I need to do here } override func viewDidLoad() { super.viewDidLoad() let sessionReader = NFCNDEFReaderSession.init(delegate: self, queue: nil, invalidateAfterFirstRead: true) let nfcSession = NFCReaderSession.self let nfcTag =

how to prevent screen record in ios11

ぃ、小莉子 提交于 2019-12-07 08:20:17
问题 To some reasons, our APP dont't want people record screen, but in ios11 a new feature can let user record there iphone screen, so is there an API or notification indicate me user is recording now thank u very much 回答1: You can detect if the screen is being recorded with: UIScreen.main.isCaptured // True if this screen is being captured (e.g. recorded, AirPlayed, mirrored, etc.) You can't prevent it using project settings, but you could use a modal or something to request the user to disable

Cannot compose tweets with Twitter Kit 3

ε祈祈猫儿з 提交于 2019-12-07 07:14:24
I followed instruction from https://dev.twitter.com/twitterkit/ios/compose-tweets to compose tweets via my Object C app for iOS 11 // Objective-C TWTRComposer *composer = [[TWTRComposer alloc] init]; [composer setText:@"just setting up my Twitter Kit"]; [composer setImage:[UIImage imageNamed:@"twitterkit"]]; // Called from a UIViewController [composer showFromViewController:self completion:^(TWTRComposerResult result) { if (result == TWTRComposerResultCancelled) { NSLog(@"Tweet composition cancelled"); } else { NSLog(@"Sending Tweet!"); } }]; However, after clicking Connect button at [Connect

Bluetooth didConnect or didFailToConnect not called Xcode 9.2 with iOS 11.1.2

百般思念 提交于 2019-12-07 04:49:48
问题 I am having the problem with Xcode 9.2 and iOS 11.1.2,"didDiscover" is working fine and my peripheral is saved in an array before I call connect, but "didConnect" or "didFailToConnect" not called, so the peripheral state will stay at "connecting"... Please help var manager: CBCentralManager! override func viewDidLoad() { super.viewDidLoad() manager = CBCentralManager(delegate: self, queue: nil) //manager = CBCentralManager (delegate: self, queue: DispatchQueue.main) //manager =