xcode8

“Use Legacy Swift Language Version” (SWIFT_VERSION) Error When Publishing Cocoapods

送分小仙女□ 提交于 2020-01-06 04:12:28
问题 I am trying to publish this library https://github.com/ankurp/Dollar to cocoapods using the following command pod trunk push Dollar.podspec --allow-warnings --verbose and getting the following error which is preventing the publishing of the library to cocoapods. There is no build errors and all tests pass on my local and Travis CI https://travis-ci.org/ankurp/Dollar I recently upgraded the project to use Swift 3 syntax and also updated the project to us SWIFT_VERSION=3 https://github.com

My app is simple app is crashing

天大地大妈咪最大 提交于 2020-01-05 07:41:34
问题 I have made a small program which I use to count the money in the safe at work. But after updating my iPhone it crashes. I have tried a lot but can't find a solution. The crash happens when I press the button which activates the following function: @IBAction func Knap(sender: AnyObject) {} I'm very new to coding so please keep the answers as simple as possible :) My app is as follows: // // ViewController.swift // Pengeskabstæller // // Created by Alex on 09/07/2016. // Copyright © 2016 Alex.

How to use a view controller as a side menu in Swift3

[亡魂溺海] 提交于 2020-01-05 03:58:05
问题 I am trying to implement the side menu in my application programatically. So I have designed a view controller with half of its view as table view. The design as well as coding is done, now i wish to use this view controller as a Side Menu controller. My SideMenu Storyboard is: Now my code looks like this: import UIKit class SideBarViewController: UIViewController { @IBOutlet weak var menu: UIView! @IBOutlet weak var menuTableView: UITableView! var fieldImages = [UIImage]() var

UIImage from camera is rotated 90 degrees - using extensions

被刻印的时光 ゝ 提交于 2020-01-05 03:47:11
问题 When Image data is returned and applied to a UIImage, if the data comes from the camera then the image appears rotated 90 degrees. I tried adding the extension UIImage { func correctlyOrientedImage() -> UIImage { if self.imageOrientation == UIImageOrientation.up { return self } UIGraphicsBeginImageContextWithOptions(self.size, false, self.scale) self.draw(in: CGRect(origin: CGPoint(x: 0,y :0), size: CGSize(width: self.size.width, height: self.size.height)) ) let normalizedImage:UIImage =

iOS app crashing in release mode, works in debug mode

岁酱吖の 提交于 2020-01-05 02:46:38
问题 Recently my app started breaking if I create the .ipa file for AppStore release. It works fine if I run the same code in emulator or if I run it on my iPhone from xcode, but once I create the release package it crashes while opening a particular view controller. I went through few of the posts on Stackoverflow where people had similar problems and tried following things: Setting SWIFT_OPTIMIZATION_LEVEL = "-Onone"; for release mode Setting GCC_OPTIMIZATION_LEVEL = 0; for release mode

How can I add spaces to the app name

本秂侑毒 提交于 2020-01-04 06:03:02
问题 I'm trying to add spaces to my app name and even though my Bundle display name contains spaces they won't show up on the simulator. Does anybody know how do achieve that? Thank you very much 回答1: Open project "Info". Add a property "Bundle Display Name" into "Custom iOS Target Properties". (as "Key") Enter the display name, that will be shown on iPhone/iPad screen under an app icon. (as "Value") And also you should delete previously installed app and reinstall it. 回答2: From iOS 11, if app

Getting error while installing realm through cocoapods

孤人 提交于 2020-01-03 21:03:03
问题 I am getting this strange error while installing realm on xcode 8 , cocoa pods version cocoapods-1.2.0 The error is - Installing Realm (2.4.3) [!] /bin/bash -c set -e sh build.sh cocoapods-setup ./scripts/swift-version.sh: line 59: [: =: unary operator expected No version of Xcode found that supports Swift 3.0.2 All other pods work great. Thanks for the help in advance. 回答1: Hey for anyone looking for an answer - I did find out that I had the second xcode installed (xcode 7), due to which the

Crashlytics not showing some crashes

£可爱£侵袭症+ 提交于 2020-01-03 18:44:13
问题 I've added crashlytics in my app and I've uploaded a build in our private download site which is available for test users. The version which I had uploaded my build used crashlytics version 3.9.0. In my fabric dashboard I was getting crashlog and last crash log was dated last Thu, Nov 9. For past few days(since last friday) I've been getting report from users that they have experienced few crash which they are unable to reproduce and happens occasionally. But when I look at the fabric

Convert single file to Swift 3 in Xcode 8?

不羁岁月 提交于 2020-01-03 08:52:51
问题 Is there any way in Xcode 8 or 8.1 to do a Swift 2.X -> Swift 3 migration for a single file in a project that's already been converted to Swift 3? For technical debt/legacy build process reasons, we are currently having to maintain both Xcode 7 and Xcode 8 versions of our project. This is causing headaches when we have to merge new development from Xcode 7 over to Xcode 8 . Since the project has already been fully converted to Swift 3 in our Xcode 8 branch (including a ton of hand fixes), we

Swift manually rotate view controller

北城以北 提交于 2020-01-03 03:45:11
问题 So I'm working on an iOS 10 app using Swift 3 and Xcode 8.3.3. In my app I have to take successively 8 pictures with indicators on the camera. So I'm using AVCaptureVideoPreviewLayer for the custom camera and I need to set the view displaying the camera on landscape mode. I did it using this extension that I found on stackoverflow while searching for the problem. struct AppUtility { static func lockOrientation(_ orientation: UIInterfaceOrientationMask) { if let delegate = UIApplication.shared