xcode9-beta

Swift unrecognized selector of ObjC Category

雨燕双飞 提交于 2019-12-08 08:54:10
问题 I get a SwiftDeferredNSDictionaryVs11AnyHashableP__ objectForKeyNotNull: 2017-07-14 12:52:58.138873+0200 Adding-Content-to-Apple-Music[1954:511529] -[_TtGCs26_SwiftDeferredNSDictionaryVs11AnyHashableP__ objectForKeyNotNull:]: unrecognized selector sent to instance 0x1c02239c0 for a object defined in a swift Dictionary let apiOptions:Dictionary<String,Any> = [ "options.push.enabled": false, "options.debuglevel": 4, ] that I pass to a Objective-C library, that does like if ([options

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:

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

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 =

dyld: Library not loaded: @rpath/CoreNFC.framework/CoreNFC, iOS11 and Xcode 9 beta

女生的网名这么多〃 提交于 2019-12-07 03:42:06
问题 I get this error and app get crash while run CoreNFC sample code in Xcode 9.0 beta 2 dyld: Library not loaded: @rpath/CoreNFC.framework/CoreNFC Referenced from: /var/containers/Bundle/Application/2837709C-C852-4811-B696-38F2725554D4/iOS-11-by-Examples.app/iOS-11-by-Examples Reason: image not found Does anyone knows how to fix this? 回答1: I combined some answers together to fix this thanks to @Chinchan Zu's comment here is how to mark Core NFC as Optional stackoverflow question First you make

Ambiguous use of play of MPMusicPlayerController in iOS11, swift4

别说谁变了你拦得住时间么 提交于 2019-12-07 00:48:35
I'm running the Apple iOS11 example Adding Content to Apple Music on Xcode Version 9.0 beta 3 (9M174d) . I get a Ambiguous use of 'play() in /adding-content-to-apple-music/AppleMusicSample/Controllers/MusicPlayerManager.swift:78:9: Ambiguous use of 'play()' The suggested solutions to explicitly define the selector in order to avoid the ambiguity like: let play = #selector(musicPlayerController.play) did not work in this case. The MPMusicPlayerController instance in the MusicPlayerManager class is defined as let musicPlayerController = MPMusicPlayerController.systemMusicPlayer and then referred

Having trouble with MusicKit sample app provided by Apple

♀尐吖头ヾ 提交于 2019-12-06 21:44:38
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: String) { musicPlayerController.setQueue(with: [itemID]) //Ambiguous use of 'play()’

Xcode 9 borderColor doesn't work in User Defined Runtime Attributes

爱⌒轻易说出口 提交于 2019-12-06 15:30:58
I'm using this CALayer extension: var borderUIColor: UIColor { set { self.borderColor = newValue.cgColor } get { return UIColor(cgColor: self.borderColor!) } } I thought that maybe because of this extension my borderColor of the Submit button from the bottom of the page doesn't change to white (as I want it to be): But no, I hooked up an IBOutlet and tried to set directly the color like this: submitButton.layer.borderColor = UIColor.white.cgColor Did it in viewDidLoad , viewWillAppear and viewDidAppear because I know that in the last big update (iOS 10) the frame rendering was changed

How to dynamically create annotations for 3D object using scenekit - ARKit in iOS 11?

℡╲_俬逩灬. 提交于 2019-12-06 12:03:54
问题 I am working on creating annotations using overlaySKScene something similar to this(https://sketchfab.com/models/1144d7be20434e8387a2f0e311eca9b1#). I followed https://github.com/halmueller/ImmersiveInterfaces/tree/master/Tracking%20Overlay to create the overlay. But in the provided example, they are creating only one annotation and it is static. I want to create multiple annotations dynamically based on the number of child nodes we have and also should be able to position annotation on top

is `addingPercentEncoding` broken in Xcode 9?

為{幸葍}努か 提交于 2019-12-06 05:02:39
问题 in Swift 3.x with Xcode 9 beta 2, using addingPercentEncoding gives unexpected results. CharacterSet.urlPathAllowed always contains ":", so by definition of addingPercentEncoding , it should never escape it. Yet, using this code: // always true print(CharacterSet.urlPathAllowed.contains(":")) let myString = "info:hello world" let escapedString = myString.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)! print(escapedString) I get those results: cases where I get an undesirable