I am Working on Xcode 9.2 Swift 4.0 using FacebookSDKs-iOS-20160316 for Facebook Login Authentication Integration . My storyboard is empty . On Running Facebook Login button is coming on an app When clicked Facebook login page comes, after successful login Permission for my app is asked, When allowed following page comes Please refer Link : https://stackoverflow.com/questions/52867810/facebook-login-button-not-changing-to-logout-button-immediate-after-login-in-swift **For images** When I click on done button of this page I am redirected to my storyboard , and this time also same login button is there , my login button is not changed to Logout. On clicking it again following page comes: Please …

Member Avatar
+0 forum 0

I have two apps that are both open source, I am using Swift on iOS. I want to incorporate one into the other. The main App is a radio station, the second is a news feed. I want the news feed as a "sub project". After a few days of Googling I have added the sub-project as advised on the following pages: https://forums.developer.apple.com/thread/49659 https://curisious.com/the-correct-way-to-add-existing-project-to-workspace/ And I have tried to link the sub-project/framework as detailed here https://www.raywenderlich.com/126365/ios-frameworks-tutorial I seem to have got the first bit sorted, I have the newsfeed as a dependency to the radio player, but I am struggling …

Member Avatar
+0 forum 0

I'm trying to initialize var altitude. init(altitude: CLLocationDistance) { self.altitude = altitude super.init(nibName: nil, bundle: nil) } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } But it gives me an error: Property 'self.altitude' not initialized at super.init call Thanks

Member Avatar
+0 forum 0

Hello, I am working on a simple timer toolbar app in swift for macOS and I am experiencing a visual bug. Basically, I should be able to add any number of timers to the main screen and they should stack on top of each other. Once the space is filled up in the window, a scroll bar appears allowing you to scroll through all the timers. My issue is that when I add the timers, they do not show all the time. I have a hunch it is either some refresh issue or some spacing issue. The blank screen looks …

Member Avatar
+1 forum 0

Hi everyone, I am working on a coin collection app, and I have recently started integrating core data into my app. My app is of the following format: I have a core data database which stores custom CoinCategory objects and each CoinCategory object has an array of Coin objects. This way, my app stores everything in terms of categories. When I integrated the core data, I can add my first category without any errors and delete it without any problems, but when I add in a second coin category, I experience the following error: 2017-06-26 09:55:37.218 CoinCollection[18889:12839563] -[CoinCollection.CoinCategory compare:]: unrecognized …

Member Avatar
Member Avatar
+0 forum 1

Using swift programming import UIKit var str = "Hello, playground" func ls(array: [Int]) -> (large: Int, small: Int)//function { var lar = array[0] // array of large number var sma = array[0] // array of small number let num = 0 // check odd or even for i in array[1..<array.count] { if i < sma && num % 2 == 0 { sma = i }else if (i > lar) { lar = i } else if num % 2 == 0 { print("this is an even number") } else { print("this is an odd number") } } return (lar, …

Member Avatar
Member Avatar
+0 forum 5

We have developed an app for iPhone. Our business requirement is to run the app at the background and listen to our server for the updates. We need to get the list of online users. This helps us in getting the list of online users and also in listenning to the server. Problem: iOS is killing the app after few minutes. I need the app to run at the background for ever. This is a proven concept and used by lots of apps on apple store. Please suggest me how to achieve this. If we use Background audio then the …

Member Avatar
Member Avatar
+0 forum 2

Hi. I'm in the process of learning Swift coding and decided to attempt a porting of one of my existing Windows programs. The thing is, that program relies heavily on connecting to a remote MySQL server. I've seen a few attempts to provide various connectors to an assortment of databases, including MySQL. Most solutions say that it can be done using a bridge to Object C, but none really show how. Does anyone here have any experience in connecting a Cocoa/Swift application to a MySQL server (or any remote database at all)?

Member Avatar
Member Avatar
+0 forum 4

Hi, I am working on a blackjack game as a person learning swift. Due to my need to learn the basics of swift before jumping into learning how the view controllers and other mobile-app specific details work, I am making this game in a playground. I wrote a function that is intended to get a user's input from the console, but the function does not wait for the user to enter his input. Instead, it returns an empty string and lets the program go on without letting the user enter in the appropriate input. Here is my function (that gets …

Member Avatar
Member Avatar
+0 forum 1

I keep getting a direct identifier error. I have tried deleting the pillarPlat004 assets and re-importing it and connecting it to the code, but that doesn't seem to be the problem. I'm using swift in xcode. ![Screenshot_2016-04-09_19.27_.25_.png](/attachments/small/4/1f4a31b4ae5c37226cc4901e500e6fcd.png "align-left") ![Screenshot_2016-04-09_19.31_.50_.png](/attachments/small/4/4d94fd0a79c2f6fa708b11ec67f58885.png "align-left")

Member Avatar
+0 forum 0

Hi all, I wanted to develop an app about retrieving latest transport service updates from a specific twitter account @LTAsg. My app's targeted user is not expected to have a Twitter account. Therefore, I know that I need to use Application-Only Authentication method, if I am not mistaken after I have read the API here: https://dev.twitter.com/oauth/application-only Apart of getting a Token from Twitter directly, I would like to know how to apply this info into Swift context where the tweets could be placed onto a tableview?

Member Avatar
+0 forum 0

The Swift computer language is the brainchild of a number of Apple associates. In my humble opinion it shows some nice features, but also some warts. Part 1 (constants, variables, strings, tuples, arrays) explores a number of the features to give you a taste of the language. I hope I can follow this soon with part 2 (dictionaries, loops, if/else, switch/case,.functions, classes) Even if you don't have an Apple computer, you can educate yourself using the Swift computer language. Just go onto the **Swift online playground** at **swiftstub.com** and start typing Swift code, enjoy the experience! Note: Xcode 7.0 came …

Member Avatar
Member Avatar
+2 forum 27

let session = NSURLSession.sharedSession() //1 let downloadTask = session.downloadTaskWithURL( url, completionHandler: { [weak self] url, response, error in // 2 // return } ) Please explain the meaning of [weak self] inside closure . what if we dont declare it as [weak self] ? Thanks /

Member Avatar
+0 forum 0

Part 2 of exploring/tasting the Swift language takes a look at dictionaries; process flow controls like loops, if/else and switch/case; functions and sorting. I hope I can follow this up with part 3, a closer look at class operations.

Member Avatar
Member Avatar
+2 forum 23

In part 4 of tasting Swift, we explore structures. Swift has added some interesting features to structures like defaults, methods, multiple init(). This way struct objects come close to class objects with a little less overhead. As an option, methods can be added externally too. Take a look! Down the road there may be a part 4, exploring some odds and ends. Remember, Swift uses three access levels: public (least restrictive) internal (default) private (most restrictive) If no access level is used, Swift defaults to internal.

Member Avatar
Member Avatar
+1 forum 6

I have high hopes for the Swift programming language, the presentation showed a lot of potentials for this language in apple keynote, just a question do you guys think swift will come to windows in an IDK soon?

Member Avatar
Member Avatar
+0 forum 6

Like most modern languages Swift has sets and set operations. Here is a quick look. Coming in the fall of 2015 ... Swift2 replaces println() with just print() that has a newline default. The sort of thing that Python3 did to print(). There are some other syntax changes. Good news, there will be a Swift 1-to-2 migrator utility to change Swift1 syntax to Swift2 syntax.

Member Avatar
Member Avatar
+1 forum 1

I had a discussion a few weeks ago regarding getting Swift Mailer to work, and thought I had it all resolved but then got sidetracked. I’m back on it now and realizing that I’m still running into an issue that I haven’t found a solution to. I have a form that someone fills out, and then a place where they browse to select a file to attach to the email that is sent when submitted. I have a folder on the server for uploaded docs to be temporarily stored in called 'uploads' with permissions set to 777 to test This …

Member Avatar
Member Avatar
+0 forum 1

Hello, just a question, have anyone tried the new language from Apple (Swift) as a web development tool? if so, what was the result?

Member Avatar
Member Avatar
-1 forum 1

Part 3 of the taste of Swift explores class objects in Apple's Swift language. A class allows you to group methods (class functions) together that belong together. Class Person groups some information of people working in an office. Class Pay inherits class Person and adds pay information. Class File groups file read and write methods. By convention class names start with a capital letter. Once a class is written it can be inherited by another class which eliminates a lot of extra code writing. Part 4 will talk about a related object, the structure. Swift has elevated the structure to …

Member Avatar
Member Avatar
+1 forum 5

Ever since I got a fancy iMac and started using the Xcode IDE, I got hooked on Apple's new Swift language. From what I heard, it is supposed to replace the aging Objective C. I left a couple of Swift code snippets in the Computer Science section about my one-month experience with Swift. I think Apple is onto a great thing. They want to make Swift Open Source by year's end. See ... https://www.daniweb.com/software-development/computer-science/code/496606/a-taste-of-swift-part-1 On the side: Looks like the Objective-C Discussion Community is dying.

Member Avatar
Member Avatar
+1 forum 5

I'm studying the Swift Mailer, and wondered if there is someone in here that is familiar enough with the way it works, that you could give me a little guidance. I have a form that I created that allows someone to enter their information as required, and that works just fine. Once submitted, it generates an email that is sent to the company, and a copy is sent to the person submitting it. Currently I am using mail() in a mailing function that I have that isn't related to Swift Mailer. I need to give the submitter the opportunity to …

Member Avatar
Member Avatar
+0 forum 11

Everytime I link a `webview` into my OS X project, it always brings up `Use of undeclared type 'WebView'`. How am I supposed to fix this? I've tried linking the WebKit framework and things like that, but they never worked.

Member Avatar
Member Avatar
+0 forum 2

I have couple of errors with creating and callng functions.pls have a look.I am using swift for coding. [img]http://i.imgur.com/OVARWui.png[/img]

Member Avatar
Member Avatar
+0 forum 1

I'm trying to create simple game on xcode (swift) what I'm trying to do is moving player pieces from their positions how can I implement moving pieces from [number]positions to [number]positions for example from positions 1 to either 2 or 0 otherwise it get back to the previous positions more details so this is my game filed A & B represent player pieces (like in chess) each player have 3 pieces and I placed image view on each of these black point if player place one piece in position 1 in the next round they can move their piece from …

Member Avatar
+0 forum 0

Hello. I am getting into app development and started with a calculator. The input is not equal to the output in any size I set. Here are some screenshots: Input: [Screenshot](https://www.dropbox.com/s/otncvnpfotfgetu/Screenshot%202015-02-05%2014.44.43.png?dl=0) Output: [Screenshot](https://www.dropbox.com/s/360u5iastr69hgq/Screenshot%202015-02-05%2014.45.11.png?dl=0) And finally, here is the size thing: [Screenshot](https://www.dropbox.com/s/23aln2fzovpv72y/Screenshot%202015-02-05%2014.46.00.png?dl=0).

Member Avatar
Member Avatar
+0 forum 6

i want to start developing ios apps on my lap (windos) i dont have mac so how can i start

Member Avatar
Member Avatar
+0 forum 2

I expected there to be one, especially on a site as popular as this one.

Member Avatar
Member Avatar
+0 forum 2

I keep running this code and it works until I press the button, `findShapeCalc()`, and then I get EXC_BAD_INSTRUCTION in the main.swift at the line `NSApplicationMain(C_ARGC, C_ARGV)`. Why does this keep happening? Code in question: import Cocoa class ViewController: NSViewController { @IBOutlet var dropDown : NSPopUpButton @IBOutlet var length : NSTextField @IBOutlet var label : NSTextField @IBOutlet var width : NSTextField @IBAction func findShapeCalc(sender : AnyObject) { dropDown.title.toInt() if dropDown.itemAtIndex(0){ circle(); }else if dropDown.itemAtIndex(1){ rect(); } } func circle(){ var radius = (length.stringValue as NSString).floatValue var circumfrence = 2.0 * 3.14 * radius label.stringValue = "Circumfrence is \(circumfrence)" } func …

Member Avatar
+0 forum 0

I have an openstack setup with ceilometer (polslter and notifier) installed. I am getting the required metrics like Storaeg_objects_incoming_bytes, storage_objects_size of swift in the metering tab. how ceilometer is getting these metrics.. what are the underlying components of swift which ceilometer api is communicating.. i am writing a python code so that the code would be able to communicate the swift drivers and print the metric...

Member Avatar
Member Avatar
+0 forum 3

The End.