Questions tagged [xcode]

55500 questions
1

votes
1

answer
736

Views

react native xcode library not found for -lBranch-SDK

I have react native v0.49. After installing react-native-branch with this link link to react-native-branch, I try to run with xcode and I get the error ld: library not found for -lBranch-SDK in addition,when I run react-native-link I get react-native-branch ERR! Failed to add file to project
Adir Zoari
0

votes
0

answer
3

Views

Is markup formatting just for Swift playgrounds?

In swift file, I don’t see editor _ show rendered markup button. For example. //: - Experiment: //: Modify the anyCommonElements(_:_:) function to make a function that returns an array of the elements that any two sequences have in common. //: How can I show this in rendered markup mode in swift f...
John
2

votes
0

answer
9

Views

Update Facebook SDK issue

I use Facebook SDK login feature. In console written 'Your Facebook SDK is out of date. We recommend upgrading to the latest Version 4.37.0, to ensure your app's performance is not affected and to take advantage of our newest features!' I updated SDK pods to 4.4.1, but this warning still there. Any...
Artyom Vlasenko
1

votes
2

answer
520

Views

Getting memory usage Live/Dirty Bytes in iOS app programmatically (not Resident/Real Bytes)

According to what I've read so far, real/resident bytes indicates the number of bytes allocated to the app including bytes that the app is no longer using but hasn't been reclaimed by the OS. And live/dirty bytes is the bytes the the app is actually using and the OS can't reclaim. I think that the...
Alex Itelman
1

votes
1

answer
124

Views

UITests failing when run in group but succeed when run independently

I'm currently working on a project with many asynchronous code and I'm writing the UITests for this project. During the development I run them one by one but never in a group. So I thought the tests are succeeding. But when testing them all together most of them are failing. I implemented the setup...
Tom Kuschka
1

votes
2

answer
54

Views

In Xcode, how would you go about having view controllers which are only accessible to the user if they perform a certain action in the app?

The app I am making has multiple pages which the user swipes between. I need the user to be able to press a button and that create a new page in the app, and then also for the user to be able to delete that page of the app. Is there a way to generate/delete a view controller while the app is in use?...
Peter Ruppert
1

votes
1

answer
66

Views

CloudKit Public Records And Changes not Downloaded

CloudKit Public Records And Changes not Downloaded I have a CloudKit app with records for both a Public and a Custom Private Zone. I seem to have the change token process working for the custom private zone but am unable to get the public data to work. The code I am using is identical for both datab...
user2698617
0

votes
1

answer
14

Views

I have a 'UIImage' and I want to convert it to NSData to upload on firebase storage

I want to upload an Image of type Jpeg to firebase storage Below is the function to upload to firebase storage func uploadImageToFirebase (data: NSData){ let StorageRef = Storage.storage().reference().child('User Products') let uploadMetadata = StorageMetadata() uploadMetadata.contentType = 'image...
Na el
0

votes
0

answer
11

Views

Add *.framework to Build phases > Copy Files in Xcode template

Is there any opportunity to add my *.framework to Build phases > Copy Files from Xcode template (UITest Target)?
Alex G
1

votes
1

answer
116

Views

yarn run ios - Error: Cannot find module - React Native

So, I'm setting up new React Native project, and I'm trying to setup XCode simulator. I've opened my React Native project in XCode and in the terminal when I run 'yarn run ios' from a project folder I'm getting the error 'Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault' at Fu...
T.Jurko
1

votes
1

answer
139

Views

How to change Xcode Playground's to particular Swift Version?

I tried a swift code that's working well in the playground but not in Xcode project. So I want to know how to change a Playground's particular swift version.
sparrowceg
1

votes
2

answer
52

Views

How to access an object inside a ViewController from within a TableViewCell

I am fairly new at coding in swift and I've been trying to find a solution to my problem for the past couple days, and am not able to. I have a class named userData with various properties: class UserData { var name: String var age: Int var credits: Int = 1 ... init(name: String, age: Int) { self.n...
1

votes
1

answer
33

Views

XCTest: Is there a way to find a view of any type by ID in UI tests?

In XCTest there's a way to get all UI elements by type, and then filter by accessibilityIdentifier like: app.buttons[someID] But what if I don't know the type of the view? If I'm looking for a UIView, I can write: app.otherElements[someID] but this excludes UIButton views. I can implement this by ca...
battlmonstr
0

votes
0

answer
4

Views

How do I enable Full Disk Access for a macOS app being built and debugged in Xcode

I have an app that accesses system files. When I built and archive the app, I'm able to drag that app into the Settings > Security & Privacy > Privacy > Full Disk Access and grant it full permissions However, when the app is built using Xcode, how do I enable this? I don't know where Xcode stores a...
YichenBman
1

votes
2

answer
50

Views

Complex Multi-Device Orientation Handling

I have a universal application running both on iPads and iPhones. The application starts with a .xib file, built in interface builder, which acts as the launch image. Once the app launched, it switches to the appropriate view controller based on device size set in the app delegate: CGSize screenSize...
Gergely Kovacs
1

votes
3

answer
375

Views

Having a UIButton still selectable when UITextField is first responder?

I'm trying to figure out how to do something perhaps slightly non-standard. I have a view controller (a UIViewController) that has 1 UITextField and 3 UIButtons. I use the UIButtons basically as toggles; only 1 can be selected at a time. So each has: [myButton1 addTarget:self action:@selector(button...
aSadhankar
1

votes
2

answer
82

Views

bundleAtPath gives me the wrong path

I've put a actual folder inside my app project and i would like to get the content of the folder out. I've tried the code below, but it always sends me to my home directory on my computer. How do you get to root level in your app? NSArray *test = [[NSFileManager defaultManager] contentsOfDirectoryAt...
Niels Sønderbæk
0

votes
1

answer
13

Views

How to transition to a new viewController after Firebase Authentication?

I have successfully implemented Firebase pre-built UI. It includes providers for google, facebook, email, and phone. Launching the app brings you to a viewController with a login button. Clicking the button brings up the authUIController. After signing in to one of the providers, the authUIControlle...
Jack K.
1

votes
5

answer
6.6k

Views

Loading webpage inside iOS application

If we load a webpage, we can forward it to safari, but this causes users to leave our app. Is there any way so that a user visits any webpage and then come back to our application.
1

votes
1

answer
540

Views

Is there any way to display part of an image in a UIImageView?

I only want to display part of an image in an UIImageView, not the whole image. How do I do that?
aeubanks
0

votes
0

answer
11

Views

How to fix 'sh: brew: command not found' in XCode?

I'm making a command-line tool in Xcode, and want to call terminal commands with my C++ code. I found the system() function can run terminal commands. And I know that the commands I want work in my Terminal. But these commands are not working the same way when I call them with system() in XCode. Fo...
evn
0

votes
0

answer
5

Views

Adding multiple of the same SKSpriteNode() in swift 4.0

I know this question has been asked multiple times but i have looked online forever and cannot find the solution to my basic problem. I have a SKPhysicsContact that runs the following code when 2 objects come in contact: let ball = SKSpriteNode(imageNamed: 'circle') ball.position = CGPoint(x: self.f...
Questions
0

votes
0

answer
2

Views

Google heat map not showing in Xcode

I am trying to call data from firebase using google heatmaps. for some reason my simulator is just showing a white screen for the google map I am trying to implement googleHeatmaps that calls data from a database and store onto the MapView as a heatmap. import UIKit import GoogleMaps import Google...
Brian
0

votes
2

answer
11

Views

How to save the status of a cell so when I scroll or leave the page it doesn't refresh the cells?

I'm trying to make a store for a game where you can buy different colors of balls. I'm using a UICollectionView with all white balls to begin with, when I click a cell, it changes the white ball image to a colored ball image. when I scroll down and scroll back up, the cells I selected are reset to t...
Jperk
0

votes
0

answer
5

Views

Can't run iOS app on simulator in Xcode 10.2

In Xcode 10.2 I can no longer run my app on a simulator with thread sanitizer enabled. I get the error This app could not be installed at this time. WatchKit v3 app has disallowed Info.plist key: NSBuiltWithThreadSanitizer My app includes a watch app and a lot of frameworks (some for watch, some for...
Max
1

votes
1

answer
336

Views

ModuleName-Swift.h generated with missing methods

I have the following Swift class public class Model : NSObject { override init() { (...) } class func fileListHasBeenUpdatedEvent() -> String { (...) } func fileExtensions() -> [String] { (...) } func filesWithExtension(ext : String) -> [ModelFile] { (...) } func addFilesWithThoseURLs(urlLi...
AirXygène
0

votes
1

answer
29

Views

How can I split an array into specified lines when printing?

New to software development, I'm working through Big Nerd Ranch's book 'Swift Programming'. One of the challenges set by the book is to print an array within a dictionary that contains 15 zip codes and to have them split across three lines in groups of five. The formatting must exactly match how it...
Peter H
1

votes
7

answer
2.2k

Views

Can we use Two separate xib's for iPhone & iPad for one viewcontroller

I created two separate xib's for iPhone & iPad. From iPad xib i gave reference outlet to the viewcontroller. What i want is: I want to use those reference outlets for iPhone xib's. Note: I don't want to use size classes. @IBOutlet weak var zoomButton: UIButton! var delegate: FlipsideViewController...
0

votes
0

answer
7

Views

Fetching Data From Uerdefaults, From Outside The app

We want to Access the UserDefaults data with external tool. As we have stuck with issue where we have some data saved in the app in Userdefault, which can't be synched to web due to bug(Wrong check, which won't let the app to sych data). And we need that data urgently. - App is installed in Develop...
rinku khatri
1

votes
2

answer
266

Views

Autoscrolling infinite effect in .linear type of iCarousel in swift

I need infinite autoscrolling effect in .linear type in iCarousel and i already achieve autoscrolling in .cylinder type but i can't achieve this effect in .linear type. Here is my code of achieve autoscrolling in .cylinder type carousel.type = .linear carousel.autoscroll = -0.4; carousel.reloadData(...
SmarterSusheel
1

votes
1

answer
1.1k

Views

How to solve “code couldn't find a provisioning profile matching 'com.example.hello'.”?

I am using Xcode 8.3.3, and when I build my HelloWorld project, I get this error: Any helps?
Yanjuan Duan
1

votes
2

answer
8.1k

Views

xcode: class is not key value coding-compliant [duplicate]

This question already has an answer here: What does this mean? “'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X” 66 answers I'm currently working myself through this tutorial: https://developer.apple.com/library/content/referencelibrary/GettingSta...
Ginso89
1

votes
2

answer
853

Views

Operation not permitted when executing 'killall' with Swift

I'm trying to create a menu bar app to hide desktop icons and hopefully various other things mostly to learn more about Swift, and for some reason I can't get it to work. When I run this program and click on one of the menu items, nothing happens and I get this warning in the console: killall: warni...
twistedbagel
1

votes
3

answer
1.1k

Views

How do I add an outline to my label in Swift?

I'm new to Stackoverflow. I am currently developing a mobile application using XCode for iOS. However I'm trying to set add a white outline/stroke to my label but I do not know hot to. I have tried searching these forums but could not find any solution in swift. I have tried using the shadow propert...
Karliene
1

votes
1

answer
1.1k

Views

Visual Studio for Mac. Warning. Xcode 10.0 is currently selected in preferences and is incompatible with the version of Xamarin.ios being used

Warning: 'Xcode 10.0 is currently selected in Preferences and is incompatible with the version of Xamarin.ios being used. This may cause unexpected errors or warnings while building and deploying the project. To resolve this, go to Preferences and select a version of Xcode that is at least as new as...
Viktor
1

votes
1

answer
62

Views

xcode 10.1 Cannot find Build Phases Tab

I currently use xCode 10.1. Does anyone know how to access the build phases tab? All I can see is Info and Build Settings. I need to find a way to link RCTFBLogin.xcodeproj. Below is the screenshot:
Eunicorn
1

votes
3

answer
908

Views

Could not locate device support files in Xcode [duplicate]

This question already has an answer here: How to fix Xcode error: Could not locate device support files on iPhone with Xcode 4 answers I got following error in Xcode when run my app in my Device. Xcode Version is 10.01, My Device iOS Version 12.2 (iPhone 5S). Could not locate device support files.
Karthik
1

votes
1

answer
45

Views

Xcode Apple Clang enable avx512

In Xcode(Version 10.1 (10B61)), I used Macro as below to detect AVX512 support. #ifdef __SSE4_1__ #error 'sse4_1' #endif #ifdef __AVX__ #error 'avx' #endif #ifdef __AVX2__ #error 'avx2' #endif #ifdef __AVX512__ #error 'avx512' #endif In default Build Settings, SSE4_1 is active, but avx, avx2 and is...
冯剑龙
1

votes
1

answer
38

Views

What am I missing with my pod install? Xcode Build fails Azure Devops Pipeline

I am using an Azure Devops Build pipeline to build my Xcode workspace. It builds fine locally as well as if I import the repo and use it in AppCenter to build. But I want to use an external Git, thus using a Build Pipeline. It is pretty simple in terms of steps. 1 - Get Repo (finishes this step) 2 -...
K2SO Ghost Spirit
1

votes
3

answer
26

Views

Print image name to console from UICollectionView

I'm working with a UICollectionView where I have a UIImage with a Tap Gesture Recogniser as the cell model for my CollectionView. I also have 57 images with different names that I want to print to the console depending on which image I tap on. Here is my code: import UIKit class ViewController: UIV...
YachtSamba

View additional questions