Posts

Showing posts with the label xcode

Facing “Missing XCode Dependency: Python Module ”Six“ ” even after installing six

Facing “Missing XCode Dependency: Python Module ”Six“ ” even after installing six Facing "Missing XCode Dependency: Python Module "Six" " even after installing six Pip Already installed pip install six Requirement already satisfied: six in /usr/local/lib/python2.7/site-packages (1.11.0) But still flutter doctor asks to install pip Shivas-MacBook-Pro:Flutter shivapokala$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.5 17F77, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK 27.0.0) [!] iOS toolchain - develop for iOS devices (Xcode 9.4.1) ✗ Missing Xcode dependency: Python module "six". Install via 'pip install six' or 'sudo easy_install six'. [✓] Android Studio (version 3.1) [!] Connected devices ! No devices available ! Doctor found issues in 2 categories. 1 Answer ...

OSX Swift open URL in default browser

OSX Swift open URL in default browser How to open a url in system default browser by using Swift as programming language and OSX as plattform. I found a lot with UIApplication like UIApplication.sharedApplication().openURL(NSURL(string: object.url)) but this works just on iOS and not on OSX And the Launch Services, I found has no examples for swift and there is a lot deprecated for OSX 10.10 Any help welcome - thanks. I guess it's because we're supposed to use the new Extensions instead... – Michele De Pascalis Nov 2 '14 at 22:31 I upvoted because I neede to know how to do that in iOS only xd – Josh Nov 12 '15 at 11:37 6 Answers ...

How to add multiple segues from one viewController

How to add multiple segues from one viewController I have a UI view controller(viewControllerOne) with a table view in it. I have a segue from a button in the cell to another viewController (viewControllerTwo). This works fine. now , i have a third view controller and want to have a segue from another button in View Controller one . How to have multiple segues from one view controller to go to different viewController. 2 Answers 2 First segue should be between the VC itself ( not a button inside the cell ) to the destinationVC as to be able to send data in prepareforSegue , so from the yellow icon of VC1 drag to both VC2 and VC3 and give a segue identifier like toSecond & toThird respectively then in code do prepareforSegue // change segue identifier if you want to third self.performSegue(withIdentifier: "toSecond ", sender:nil) After that I used if el...

UIButtons and UITextViews not working in Scrollview

Image
UIButtons and UITextViews not working in Scrollview So I have a scrollview with a view inside. In this view I have several textviews and buttons. When I run the app, it will scroll, but I cannot click the buttons or insert text into the textviews. I have checked for multiple solutions online and have yet to find one. I have already allowed user interaction on everything. I have disabled the click delay. I am running out of ideas here. share code or better a demo of what you have tried – Sh_Khan Jun 30 at 23:06 Have you tried using the Debug View Hierarchy to check if there is something else blocking the textview and buttons? – mn1 Jun 30 at 23:28 please share your cod...

non-deterministic crashing behavior in app w/ custom frameworks

non-deterministic crashing behavior in app w/ custom frameworks I am working on an app that uses 4 frameworks i made. Its structured as a workspace and each framework has a project. This one framework that basically encapsulates some UIKit convenience functions keeps on crashing at this call site. containerView.pinTo(superView: hostView) . containerView.pinTo(superView: hostView) what happens is I build and run the app once. Then, for the second and remaining runs it crashes here. So its non-deterministic in that it works once, but never again. Here, both hostView and containerView are not nil. hostView containerView When problems occur at this level (frameworks, linking, etc.) I don't even know where to begin. I've embedded and linked the frameworks as best as I know. What is happening here? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, priv...

Encoding base64 string to image in swift received from mysql

Encoding base64 string to image in swift received from mysql I am receiving a base64 string from mysql (stored as blob) and try to encode it like this: func loadImage() { var request = URLRequest(url: URL(string: URL_IMAGES)!) request.httpMethod = "POST" let userid = self.defaultValues.integer(forKey: "userid") let postString = "userid=(userid)" request.httpBody = postString.data(using: .utf8) let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data, error == nil else { print("error=(String(describing: error))") return } if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode != 200 { print("statusCode should be 200, but is (httpStatus.statusCode)") print("response = (String(describing: response))") } let responseString = String(data: data, encoding: .utf8)...

Storing app data under one entity Core Data

Storing app data under one entity Core Data I am making an app where a string is shown, and then they have to pick the correct string from 4 options. I need to update a score, based on whether they get it right or wrong. Let's call the string that is shown to them: shownString For ease and efficiency, I am planning to have ONE core data entity and only store one object for that entity, which will be a transformable type, that is an array with nested arrays/tuples, that contains shownString and the score for every shown string that could come up in multiple choice. The reason I am doing it like this as opposed to storing individual objects for each word and score is because it will make it easier to update the object i.e. delete and add it back in again. I am fairly new to Core Data, so please could you tell me if there are any problems with this, or if you think it is a good/acceptable way that will work well then please also tell me. Thanks What's t...

Disable code autoformatting in Xcode?

Disable code autoformatting in Xcode? Does anyone know of a way to completely disable any form of automatic formatting or indentation in the current version of Xcode? Essentially, as far as text editing, I want it to behave like a "dumb" editor, e.g. TextEdit or Notepad. I am thinking about removing everything from your question apart the last paragraph since it's just useless noise and it doesn't have anything to do with the actual question. – Sulthan Jun 30 at 14:42 Anyway, most likely Xcode is not the correct tool for you, it's not really configurable. However, as far as I know, Xcode behaves as dumb editor for every file it does not recognize. Therefore changing the file extension could do the trick. – Sulthan Jun 30 at 14:44 ...

iOS Back Button Vertical Position

iOS Back Button Vertical Position I have a custom back button in my app in the Navigation Bar and for the life of me, cannot figure out why it is being pushed up. It is in normal position in iOS 11.0 and up, but for any version below 11.0, the image is pushed slightly up vertically (with the top of the button touching the bottom of the status bar). App Delegate Code: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let navigationBarAppearace = UINavigationBar.appearance() UINavigationBar.appearance().backIndicatorImage = UIImage(named: "backButton") UINavigationBar.appearance().backIndicatorTransitionMaskImage = UIImage(named: "backButton") UIBarButtonItem.appearance().setBackButtonTitlePositionAdjustment(UIOffset(horizontal: 5.0, vertical: -60.0), for: .default) Has anyone else encountered this? Edit: Added two screenshots. First one shows on simulator in iOs 9.3 ...