Newest xcode Questions

Q&A for professional and enthusiast programmers

EXC_BAD_ACCESS in simple c++ XCODE program

I'm new to c++ and I'm trying to make a calculator. I designed this function for the purpose of getting factorial of a number: int factorial(int num1) { int sum; if (num1 == 1) { ...

Correct way of moving to another .SKS file

I have a game where I have two scenes: FarmScene and WoodScene. Each scene has a .SKS file and a .swift file - one to design, and one to code. I've managed to move from FarmScene to WoodScene like ...

Need to press 2 times a button to have the right video playing

My name is Christophe and I am novice in swift and xcode. My problem is: I have a view with a series of action buttons. All these buttons are connected to a function that allows me to play a video. I ...

#import <JWPlayer-SDK/JWPlayerController.h> In Brigding header causing error

Hi when i do #import on my Bridging Header it cause error "Ambiguous use of 'tag' on my other controllers. Im using tag in buttons. Those anyone know this error?

Add same IBAction to multiple buttons. Latest Xcode, swift 3, iOS 10

Before I used to think this was really trivial... but now I can't seem to do it. I used to create multiple buttons, change their respective tags, then create one IBAction and it'd be called for all my ...

How to Navigate between Viewcontrollers without any action from user swift

I have 2 view controllers and want to navigate from first one to the second without any user interaction but based on variable came from http request Edit:- 1- I tried to use segue like this: ...

Generate app bundle using XCode and Cmake files

I have a source tree with CMakeList files i want to create a app bundle using this source tree and CMake files. Is it possible to achieve it using XCode ? If yes how can it be done. If not how can it ...

Issue when trying to retrieve data from Firebase with Swift 3

I'm trying to retrieve data from my Firebase database. I use JSON to get the data. Using SwiftyJSON library. Here is my code: func retrieveUserDatabaseAdress(userID: String) { let userRef = ...

Function to Unfriend Twitter Returns Optional Error

So, here I have a function to unfriend a user displayed in a table. It uses the loop statement at the beginning to get the index of user and follows accordingly. Only, it returns and error indicating ...

How to fix this error “Failed to create provisioning profile.”

I git clone from my friend project and show me this error. I already add my apple account in xcode. And I fix this issue when I change my bundle ID. I have a question. When I submit the app to the app ...

Xcode: didUpdateLocations not called but location manager is updating

I am facing very strange issue.Location manager delegate method is not being called but if I check _locManager.location then it gives me updated location. PS: NSLocationAlwaysUsageDescription is ...

af_setImage - unexpectedly found nil while unwrapping an Optional value

I want to load my images from sever side, but af_setImage show me this error : fatal error: unexpectedly found nil while unwrapping an Optional value my code : override func collectionView(_ ...

Why can't I convert my UIImage to NSData?

I have a UIImage, and I am trying to convert it into NSData in Swift 2 like this: var cardImage = UIImage(named: "card") let cardData = UIImagePNGRepresentation(cardImage) as NSData? However, ...

Looping through phone numbers, creating a custom view and passing it the phone number in swift

I'm new to xcode and swift so I'm not able to explain it with the proper names for everything. I'm having trouble creating a view programatically inside a for loop from another controller. The ...

How to solve this error like Invalid `Podfile` file: [!] Unsupported options `{:exclusive=>true}` for target

I clone the project fro from repository and this project podfile containing the version 0.39.0.When i tried pod install command then i always get the error like Podfile file: [!] Unsupported options {...

macOS App still opens Serial Port after closing in source code

My macOS App is an App which tests a product for my client. It opens some serial ports and close the ports. This follows by using a third party Serial Port App or Terminal to open the port. Strangely,...

How to dismiss PopupViewController

So, I have a view controller in my main.storyboard, which acts as a popup to my view. I need to know how to dismiss it. (it takes up the whole screen) Thanks! (objective-c)

Swift 3 - Program crashes when trying to perform fetch request

currently, I'm trying to fetch an entity of type song on one of my view controllers. this is the code that's relevant, that I have: import CoreData class TimerScreenVC: UIViewController, ...

Xcode 8 - Framework not found -sqlite3

I integrated animation with Quartzcode, it's work fine but when I launch Xcode, since this modification, xcode crash on signin product step ( before build ). I have some pods installed for this ...

iOS Constraints - center image and dynamic text

What is the best way to center an image and a label with dynamic text (so dynamic height) inside a scrollview in iOS? What constraints do I have to add? I really cant figure out how its working, ...

Cannot profile XCTest in instruments

I have a performance test in my XCTest group that I want to profile in Instruments. Now I right click on the test in the test navigator, hit Profile "test..." and Instruments launches. When I choose ...

Reduce App Size in IOS

I created a xib with one cell contains UIImageView. imageview has leading, trailing, top, bottom constraints. xib is of 4kb and file size is 4kb. I created one more class with same contraints and ...

iOS : How to create .a file of Unity 3d export?

I have to integrate my unity 3d export into my existing native iOS app (Objective-C) So, need to create the static library of unity export but unable to create. I am using Xcode 8.2.1 and Unity 5.5....

All teams are not listed under my apple account in Xcode

I couldn't find a team in Xcode where I was recently added in iTunes Connect. My role is App Manager, and I want to add a new build for our customer. Do I need anything else to upload an app to iTunes ...

xCode - How to keep a clean project under version control for CI

I have been reading a lot about the pros/cons concerning keeping or not the Pods under version control for an iOS project. I know this is a bloody debate. Indeed, we recently deployed a Jenkins ...

react native status bar not displaying dark-content

I am using the following code, though the status bar appears to be displaying white text instead of black. Any help would be great // @flow import React, { Component } from 'react' import { View, ...

Swift Framework has no generated header file

I have created Framework in Xcode(8.2.1) Every settings are done (I already have found many answers in StackOverFlow) Define modules is OK, Objective-C Generated Interface Header Name is OK Then, ...

Xcode error while compiling the project

My Xcode project was running all good, I connected my iPhone to transfer the build and since then I am getting these errors Unknown type name CGContextRef in file CGBitmapContext.h I have been ...

React Native simulator cache

I've been having troubles with react native and running the simulator. Specifically, I've added some native libraries to xcode, and made some modifications to them. If I run from xcode on my device, ...

Download image from URL and add to scrollview subviews

I want to when my item have gallery get image urls and create imageView with url data and add this image view to scroll view subviews, and scroll between scroll view subviews. my imageView array have ...

How do I track down the cause of 'Undefined symbols for architecture x86_64'?

This is a little embarrassing, but I'm getting several self-inflicted errors after, I believe, fat-fingering my settings. I was working away and hit a strange combination of keys and the next thing I ...

C++ on iOS (XCode) Firebase #include firebase/app.h not found

I have my dependencies put in, gradle properties completed, pod installed and completed and JSON, SDK download and put to the relevant places. However why am I getting an error build on #include "...

React native app on iPhone stuck on splash screen but works on xcode simulator

My React Native app works on my xCode simulator with 0 issues, but I built the app on my iPhone SE 16gb and it launches and gets stuck on the Splash screen. Then after 10-15 seconds the app closes.

How to make i pad app for All Screen

I am making an iPad app My app runs in all iPad screens fine but it is not working properly in iPad pro (12.9inch) i know it can be solved by autolayout but, is there any other way to solve it ...

X-code iPhone as USB Camera

I am following this youtube tutorial: https://www.youtube.com/watch?v=u-BBHiyLS1k and everytime I click on the activate button within the app on my phone it crashes the app. Any suggestions on the ...

How to reopen application after login

I'm an android developer. in android, when user login in application, I will re-open the MainActivity class ( controller ) to refresh some views. in iOS applications, how to do this scenario ?

IOS Handwriting

I am trying to make the handwriting demo app. Is there the library or open source for it. I found the tesseract on google but I think it is for the ocr and ocr is different with handwriting. Can I use ...

Integrate existing db to xcode with swift3

I´m searching tutorials about how to insert and use an existing database in xcode with swift 3. I did a tiny part of the real database (less than the 1%, it will have 150k) to try if it´s possible to ...

Storyboard custom class attribute not showing up

I changed one my view from a UITableViewController to UIViewController. Heres what I did. Renamed the file name and changed the class name. I then proceed to try and update the storyboard scene ...

What are the sizes required for React-Native app icons?

I'm pretty confused about the requirements for app icons. I see this in the Xcode interface for applying app icon sizes: From what I can tell, these are different sizes for different iPhone screens. ...

Xcode Linker Flags Stanford Network Analysis Project (SNAP)

I am trying to SNAP with C++ on Xcode. I installed SNAP and provided these two header search paths to Xcode: /usr/local/Cellar/Snap-3.0/snap-core/ and /usr/local/Cellar/Snap-3.0/glib-core/. But it ...

Xcode C++ linker error: undefined symbol [duplicate]

This is the error I'm getting, and I don't quite understand what's going on here: Undefined symbols for architecture x86_64: "set::set(unsigned long)", referenced from: _main in test_set.o ...

Embed a video in swift 3, xcode

So I have been having some trouble with embedding a video into my Xcode project. More specifically, I am trying to get the video to play inside a box rather than in fullscreen. This is because the ...

Xcode Failed to create provisioning profile

I am new to Xcode and ran into an error. I try to sign my App to deploy it to the Appstore. But I get this error: Error I allready searched in Forums but non of this solutions worked.. Thanks for ...

Problems when integrating a UITableViewController with a PageViewController

In my app I have the following hierarchy: TabBarController > NavigationController > PageViewController > UITableViewController My problem is that the tops and bottoms of the tableview are obscured ...

Developing a “meet me” app

I am currently working on an application where I want users to be able to meet up using maps. I want this to happen by being able to browse user profiles, deciding they want to meet them and then once ...

IOS design from Storyboard or Code [on hold]

I've noticed some developers choose to create their UI in code rather than in storyboards or nibs; are there any advantages or disadvantages to either? Which should I use to architect my app?

disabling Cross-Origin Restrictions in Safari on xCode's IOS SIMULATOR (iPad)

For development purposes, I need to disable the Cross-Origin Restrictions in Safari in XCODE's IOS SIMULATOR (iPad) on my iMac. In Safari on my iMac, this can be done simply by checking 'Disable ...

Errors in prototype in C++ in XCode

This is what I have in my header file. typedef unsigned int uint; typedef initializer_list<initializer_list<double>> i_list; class Matrix { public: Matrix(uint rows, uint cols); ...

Spritekit scale full game to iPad

So I'm developing a game on Xcode using Spritekit, for the iPhone. And it looks all the same and great on all iPhone devices, by using the node.setScale() method. Now I want to make it Universal and ...
Translating... 0%