xcode9

Compilation error when using Xcode 9.0 with clang (cannot specify -o when generating multiple output files)

你说的曾经没有我的故事 提交于 2019-12-22 12:19:51
问题 I updated my Xcode yesterday (version 9.0) and since then I cannot compile my code with clang anymore. It works great with with apple native compiler, but gives a compilation error with clang from macports. I will explain with more details now... I usually use clang 4.0 because it has openmp support and I change in Xcode by creating a user-defined setting as in the following figure. Image with how to use clang 4.0 from macports in Xcode This has been working perfectly for some time until I

How to get available all wifi network name Listing in iOS using swift

微笑、不失礼 提交于 2019-12-22 08:22:14
问题 I have simple question but i dont know how to implement this. I need to create an app that can get all list of available wifi networks names and information when user click on some network iphone have to connect to this network. Can i do this? and How ? 回答1: It is not possible to get all the available wifi networks names and information. BUT it is only possible to get the SSID ( SSID is simply the technical term for a network name) of the network that you are currently connected to. This

ARSessionConfiguration unresolved in Xcode 9 GM

牧云@^-^@ 提交于 2019-12-22 06:30:08
问题 I have created an ARKit project using a beta version of Xcode 9, which I was able to run on my real device without issues. Yesterday, I upgraded to Xcode 9 GM, and without touching anything, Xcode shows multiple errors, saying it does not know ARSessionConfiguration i.e.: Use of undeclared type 'ARSessionConfiguration' and: Use of undeclared type 'ARWorldTrackingSessionConfiguration' ...for this code: let session = ARSession() var sessionConfig: ARSessionConfiguration =

XCTest & GPX Files: Can Location Updates Be Started Automatically?

血红的双手。 提交于 2019-12-22 06:22:58
问题 I have added a gpx file to my project; its name is TrailOfHistory.gpx. I have edited my project's scheme so that this file will be used by Xcode 9 to perform locations updates. Here are screen shots of the scheme's Run and Test configurations wherein I have designated that the gpx file should be used: When I run my application, user location updates (as given by the gpx file) begin automatically. I can watch this happening on my application's MKMapView. In contrast, when I run one of my unit

“'NSOffState' is unavailable in Swift”

雨燕双飞 提交于 2019-12-22 04:47:39
问题 I have an extension of NSView with a simple function called clearControllersInView() which takes all the controllers in the view and sets them to a default value (i.e. checkboxes to off, popups and combos to first menu item, textfields to empty string). I had no problems with this under Swift 3. I'm using the current beta of Xcode 9 and updating this extension to Swift 4. The problem is in the section handling checkboxes where I'm getting the error "'NSOffState' is unavailable in Swift" when

'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.37_0')'

泪湿孤枕 提交于 2019-12-22 03:49:12
问题 I'm using Xcode 9.0 . My pod file : pod 'Alamofire', '~> 4.3' pod 'SwiftyJSON' pod 'AlamofireSwiftyJSON' pod 'KSToastView', '0.5.7' pod 'SDWebImage', '~> 4.0' pod 'NVActivityIndicatorView' pod 'Firebase/Core' pod 'Firebase/Messaging' pod 'CarbonKit' pod 'SBPickerSelector' pod 'SwiftyStoreKit' pod 'Fabric' pod 'Crashlytics' pod 'SAMKeychain', '1.5.2' My error log: ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.37_0')',

Xcode 9 simulator remove frames

风格不统一 提交于 2019-12-22 03:48:04
问题 The new simulator comes with the frames that make it look more like a phone in Xcode 9 beta. Is there any way to remove this frames and make it look more like the simulator in Xcode 8? 回答1: Yes there is and it was the first thing I removed. To remove the frames do the following: Click on the simulator Go to Window (top menu) Click on Show Device Bezels (which should have a checkmark on it) The simulator will now have the same look as the one in Xcode 8. 来源: https://stackoverflow.com/questions

Xcode 9 throws errors involving 'require'

[亡魂溺海] 提交于 2019-12-21 09:14:03
问题 When upgrading code to build under Xcode 9, I see compile errors in code using require and require_noerr : require(length > offsetof(struct blob, cert), outLabel); The first error is: error: implicit declaration of function 'require' is invalid in C99 I also get a lot of error: use of undeclared identifier 'outLabel' . This is in RRTransactionVerifier.m which is Apple code for dealing with receipt validation. How do I fix these errors? 回答1: require and require_noerr are macros that used to be

The spoiled simulator xcode 9. As a broken TV

喜你入骨 提交于 2019-12-21 05:02:52
问题 Almost every launch of the application on any Xcode 9 simulator results in that in the screenshot: Maybe someone encountered this problem and solved it? 回答1: You can try to switch render engine to OpenGl instead of metal Use this command in terminal. defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint 2 (1 = Metal, 2 = force use of OpenGL, 3 = OpenGL) Or if your gpu is HD3000 you need to use defaults write com.apple.CoreSimulator.IndigoFramebufferServices

How to calculate iOS 11 size in different orientation?

可紊 提交于 2019-12-21 03:33:14
问题 I calculate itemSize dependent on safe area for UICollectionView with horizontal scroll and custom layout. But for iPhone X safe area has different size for different orientation. My question is how should I calculate safe area size for landscape orientation in viewWillTransition function? Or how is it possible to do without this calculation? 回答1: EDIT To get safe area size without creating any additional views, use this: view.safeAreaLayoutGuide.layoutFrame.size If you want to use