Questions tagged [xcode]

42595 questions
0

votes
0

answer
3

Views

iOS IAP not working on Unity, “Service Unavailable”

I'm trying to test IAP of my game in Unity 3D but it doesn't work, it woks fine on Android but when I test it on iOS it said: Service Unavailable, please check your internet connection. This is the log: AdMob client has been initialized. EasyMobile.AdClientImpl:Init() EasyMobile.Advertising:SetupAdC...
Youssef
1

votes
1

answer
145

Views

VS2012 C++ to XCode

I have written a DLL in VS2012 C++ and did not use anything fancy. I think I have stayed cross-platform, at least I hope so. Can somebody tell me how to most easily get it to compile to OSX code? I think I will have to do some manual work, but I would like to find a pipeline that would allow me to...
tmighty
1

votes
1

answer
26

Views

Set a custom font without using attributed text

I don't know what I'm doing wrong, but I'm trying to use plain text in a UILabel using storyboard to have a custom font. I can only see the fonts when I'm switching the text style from Plain text to Attributed. The steps I have done to install them: Dragged fonts into the project (.ttf) Checked tha...
Jacob Ahlberg
1

votes
1

answer
207

Views

CGImage causing memory leak

I am creating a cgimage using this code: UIGraphicsBeginImageContext(CGSizeMake(size*2, size*2)); CGContextRef ctx = UIGraphicsGetCurrentContext(); [[SKColor colorWithWhite:0.8 alpha:1] setFill]; CGContextFillEllipseInRect(ctx, CGRectMake(0, 0, size*2, size*2)); UIImage *textureImage = UIGraphicsGet...
maxhud
1

votes
1

answer
514

Views

In Xcode, how do I extract .png image from an .icns file programmatically?

A beginner in iOS7 and Xcode. If I understand well, an .icns file is a container and not an image. It contains different sizes with different extensions (e.g. png, jpg) of the icons and perhaps other stuff. Right or wrong? If so, is there a way of extracting a 512x512.png version of icon from this f...
0

votes
0

answer
4

Views

Search Firebase data using search bar in Swift

I'm trying to be able to search my Firebase data using a UISearchBar in my app & I am stuck. I am successfully receiving data from Firebase in a table view. I am looking for users to be a to search "releases" by releaseName and/or releaseType. View Firebase data structure View Controller import UIKi...
B. Matlock
1

votes
3

answer
942

Views

how to hide keyboard when i touch screen in iOS

i am creating search bar in iOS when i press search bar keyboard will be appeared but after the search complete i want keyboard will be disappeared on screen. i am implement code but its not hide . //this methos show to create dynamic search bar -(void)SearchBarCode...
Chetan Gharat
1

votes
1

answer
5k

Views

Parsing JSON Swift

I am working on an app that displays the live Bitcoin price. I am using 2 APIs to do this - one plaintext, and one JSON. I am having a bit of trouble with the JSON API. Here's a bit of my Swift code func BTCFallback(){ var string2 = currencySelector.currentTitle var url = NSURL(string:"https://bitpa...
rocket101
1

votes
1

answer
1.3k

Views

Can't find “Foundation” option while creating Objective-C Project in XCode 6

I am new to Objective-C and following Big Nerd Ranch guide. In chapter 13, it asks to make a foundation project. I am using Xcode 6 with Mac OS X Yosemite, but can't find any Foundation option while creating project. There are four language options which i can see i.e., C, C++, Objective-C and Swift...
badar1653
1

votes
1

answer
277

Views

Setting up Parse in iOS

I am having some difficulties setting up the Parse framework in iOS. I have set up all the libraries, linked frameworks etc... The specific issue is that I cannot get the subclasses to autocomplete anything related to parse I have included the libraries... I have linked the frameworks in build phase...
Josh Engelsma
1

votes
1

answer
4.1k

Views

Call function in view controller from UITableViewCell

I have a problem which drives me nuts, how is it possible to invoke a function in a view controller from within a UITableViewCell. - I am doing that in Swift. So I have a View Controller - called mainVC in this mainVC I have declared a tableView which holds a UITableViewCell (Custom/ Dynamic) in tha...
Armin Scheithauer
1

votes
2

answer
1.9k

Views

anyobject does not have a membered named objectforkey in SWIFT

I am trying to get the objectForKey from a notifaction, although I am getting the error: anyobject does not have a membered named objectforkey The code I am using is: func executeAlbum(notification:NSNotification){ let data = notification.userInfo.objectForKey("data") as [AlbumModel] // ERROR HERE s...
Henry Brown
1

votes
1

answer
1.4k

Views

xcode - with multiple test targets what does the scheme test do

Im uncertain what the schema test does when clicking on edit schema. My project has multiple test targets. I have tried checking them off in the schema but unchecking them affects nothing. My question is what does the test schema menu really do ?? Here is an image how to get to the schema menu:...
j2emanue
1

votes
1

answer
155

Views

What “jump to original source” Xcode menu item do?

I stumbled upon Navigate>Jump to Original Source menu item in Xcode and wonder what is it for? I didn't manage to make it active, it's always grayed out. Google know nothing about it
DanSkeel
1

votes
2

answer
343

Views

Size of UIScrollView and Size of Images

I have created this scrollview that loads the images dynamically. However I cannot get the images to cover the screen (should adapt to iPhone/iPad) one and one. And the height of the images is also corrupt (see attached image) What am I doing wrong? Image Source to load images: for (int i=0; i < num...
Joakim M
1

votes
1

answer
484

Views

swift error exc_bad_access loading image using iboutlet

I'm new in iOS-programming. I tried the following. I created a custom class for a button (source founded on internet) like. class CustomButton : UIButton { var myAlternateButton:Array? var downStateImage:String? = "radiobutton_down"{ didSet{ if downStateImage != nil { self.setImage(UIImage(named: do...
Arnold Schmid
1

votes
3

answer
1.3k

Views

How to setup first time launch of an iOS App

I want to show the terms and conditions only the first time of my app launch. Currently I am writing my code in didFinishLaunchingWithOptions. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Handle launching from a notification if ([[...
Dalvik
1

votes
1

answer
3.7k

Views

Removing test target completely from Xcode project

I tried to remove test target from Xcode project so I followed suggestions from this Stackoverflow post. Then I deleted AppnameTests folder with files in it (AppnameTest.m and info.plist) by right-clicking and choosing move to trash. Also tried Xcode->Edit->Delete for deletion. After that, I tried t...
Whirlwind
1

votes
2

answer
21

Views

Opening Xcode project with two pods installed

I'm trying to add to my app both Moltin and Firebase pods. I know that if I want to open the file (with only one pod installed) I need to open it from the .xcworkspace file instead of using the .xcodeproj file. Which file do I have to open if I have more than one pod installed (and so two .xcworksp...
Nicop.dev
1

votes
0

answer
23

Views

Delay in UISearchBar being removed when pushing next view controller

Xcode 10.1, Swift 4.2 ViewController A has LargeTitles, UISearchController and UITableView in operation. When pushing ViewController B (also a TableView) after selecting a TableViewCell, there is a delay in the space that was occupied by the UISearchBar being removed as shown in the animation. ViewC...
rbaldwin
1

votes
1

answer
492

Views

Installing Pocketsphinx/Sphinxbase in OSX for use in XCode 6

I'm trying to use Pocketsphinx/Sphinxbase in an OSX OpenframeWorks application. I have cloned both https://github.com/cmusphinx/pocketsphinx and https://github.com/cmusphinx/sphinxbase And configured/installed them as per the instructions on the readme's. However I'm struggling on how to include th...
benjgorman
1

votes
2

answer
488

Views

How to apply auto layout to a group of items in Xcode?

For example, I add one label and two text fields to the main view. After that, I want this group of items to be centered horizontally. That is, the center of this group is on the center of the superview. How to achieve that with Xcode or programmingly?
Siyuan Ren
1

votes
2

answer
583

Views

Using acceptsMouseMovedEvents for SpriteKit mouse actions with Storyboards and Swift

I have created a SpriteKit scene by referencing a custom NSView using Storyboards in Xcode. However, I cannot implement any mouseMoved events using SpriteKit because I do not know how to reference the program's NSWindowto set its acceptsMouseMovedEvents property to "true". How can I create an @IBOut...
Alex Laing
1

votes
1

answer
207

Views

Parse query not loading in descending order

For some reason when I add an image to a tableView with Parse, it is pulling file from Parse fine, but is not loading in descending order...not sure why? Thanks for any help! class HomePageViewController: UIViewController, UITableViewDelegate { @IBOutlet var homePageTableView: UITableView! var albu...
user3708224
1

votes
2

answer
3k

Views

xcode-select -p returns command not found in terminal?

So theres my problem, according to someone when I key this in xcode-select -p, I should get /Applications/Xcode.app/Contents/Developer however what I get is this I have the CommandLineTools installed /Library/Developer/CommandLineTools/usr/bin and I also tried changing paths and such but still no lu...
Edward Lim
1

votes
2

answer
599

Views

Splash screen requirement iOS app - Portrait

I am developing an iPhone app in Xcode 7 which will only open in portrait mode. My question is do I need to provide the launch/splash/default screen also for landscape mode or providing it in the various portrait mode sizes will be sufficient?
bably
-3

votes
0

answer
19

Views

Xcode- Random Questions Quiz

To further expand my quiz app, I wish to have randomised questions so the quiz is different each time. Please can someone help me with this. Thank you so much. Im using xcode 9 and Swift 4.
Cathal 37
0

votes
0

answer
7

Views

Multiple Universal Link for Production and Development

I am trying to use two universal link in a project. One say www.abc.com for my production and www.def.com for development. Is that possible ? if yes how please ? Currently my Associated domain looks like this:
Arafin Russell
-2

votes
0

answer
11

Views

How to implement a scrolling calendar view?

I'm replicating a design from my designer for my IOS application in the Main.storyboard and I do not know how I would go about implementing a scrolling calendar. Here is the design I am replicating: http://prntscr.com/mmydbc I tried looking on GitHub for any repositories but couldn't find a specifi...
Etiekyed
0

votes
3

answer
22

Views

draw rounded lines iOS Swift

Im trying to make an app which draws a fractal tree. I managed to make the code that generates all the start and end points from all the lines. I also managed to draw the lines but right now they are really boxy and want them to have rounded corners. I using a UIView and using UIBezierPaths to draw...
PortalGamesMais
1

votes
1

answer
3.7k

Views

Integrating Paypal SDK with native iOS App

I am referring and integrating PayPal-iOS-SDK with my native iOS app. I have successfully integrated the app(this is what I feel ) Please refer the code func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for c...
onkar
1

votes
2

answer
408

Views

Swift ASYNC Event Handling With Xcode UI Test

I am using swift for an Xcode UI Test app. Our application under test sometimes pops up an "Alert Box" that affects normal work flow of test case. There is no way of predicting when the popup would appear. It might appear at test case 1 or test case number x. I wanted to dismiss the "Alert Box" and...
nixtalker
1

votes
1

answer
344

Views

Take Screenshot of ViewController that is not currently open

I am writing an app in Swift. In my app, I have a ViewController. There is a button on it, as well as an image view. When I press that button, I need to take a screenshot of another ViewController, have all the constraints that I defined in Interface Builder for the second ViewController work, and...
William Taylor
8

votes
1

answer
211

Views

iOS10 filesystem - are files no longer in app container?

For debugging purposes I've often written data to files on iOS using code such as this... NSString *docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; NSString *filePath = [docsPath stringByAppendingPathComponent:testName]; FILE* resultsFile = fo...
wilsonmichaelpatrick
1

votes
2

answer
37

Views

how to find a controller in appdelegate

I wanna initialize dataModel for a controller called CategoryPickerViewController in appdelegate. but I can't get my target controller correctly. The console keeps telling me uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 2 beyond bounds [0 .. 0]...
张家鹏
0

votes
1

answer
16

Views

How to switch between multiple .xcassets files

We have 3 targets for 3 different apps offering similar sets of features but different UI. all these 3 targets are having different .xcassets files. But now as per Apple 4.3 guideline, they are asking us to create one container and handle different UI from the same container. Now as we already have...
Praful Kadam
0

votes
2

answer
31

Views

How to export and run iOS project from Kony Visualizer to Xcode?

I am not used to work with kony platform and I have created simple app but I want to export it and run it as native iOS .xcocdeproj.
Rishil P.
1

votes
0

answer
6

Views

ios - send traffic over a connection (afnetworking or not) while waiting for response to keep it alive

situation: ios client that makes a GET request to a server and will save the response on a file. server that take up to 10 minutes to compute a specific request sent by the client. after task is completed, it will send back a large amount of data (300MB - 500MB). in the http header I have "Keep-A...
Andrea Palazzesi
1

votes
1

answer
403

Views

Draw a line that can stretch like the Xcode assistant editor in Swift

When it comes to drawing lines in Swift, most solutions out there are to override the drawRect function in a UIView, but I'm looking for a more dynamic way to draw a line. I have a button, and I want to be able to drag from this button to the next. While dragging, I would like to draw a line from th...
Ian Yang
1

votes
4

answer
346

Views

How can I get array of UIStoryboard in Swift?

I find that my Storyboard has become very complex and decided to split it into different Storyboards. But I want to have the freedom to instantiate a UIViewController no matter where I put the view controller in. That way, I can move around View Controller from Storyboard to Storyboard without the n...
Chen Li Yong

View additional questions