ios,objective-c,xcode,layout,xcode5Related issues-Collection of common programming errors


  • Run Loop
    ios facebook
    I followed Facebook Scruptious example and have an issue with authorizing the app. When I run the app and the user is logged into the native Facebook app, the authorization of the app works perfectly – the user is taken to the native app, authorizes and is returned to the app. However, if the user is not logged into the facebook app, he is asked to log in, but then authorization is not requested and the user remains in the Facebook app. Questions: 1. Is this a FB bug and is there any way to reso

  • captainkirkwood
    ios xcode worklight worklight-adapters worklight-security
    We have an “iPhone” environment in our Worklight project that we use for our native iOS client development in XCode 5. We are getting an authentication error, despite having App Authentication disabled in the Worklight console.The steps we’re following are:Call wlConnectWithDelegate: method on WLClient sharedInstance On success from wlConnectWithDelegate, we invoke our adapter procedure with invokeProcedure:withDelegate:The code looks like this:#import <BlocksKit/A2DynamicDelegate.h>+ (voi

  • seedeg
    ios ajax sencha-touch-2 native
    I have been researching on this subject and am still a bit confused.I have a Sencha Touch 2 which is working perfectly on my machine. This is for the simple reason that I have a configured proxy on my machine’s apache which allows me to call the server without the need of an absolute path. i.e. the requests are made from my machine to the server in the following manner:url: /folder/subfolder/etcThe app also works if accessed publicly on the domain abc.mydomain.com since the server is on the same

  • user198725878
    iphone ios sencha sencha-2
    Mac-mini-2:sink eit$ sencha app build native[INFO] Deploying your application to /path/to/www/sink/build/package [INFO] Copied sdk/sencha-touch.js [INFO] Copied app.js [INFO] Copied resources/css/app.css [INFO] Copied resources/images [INFO] Copied resources/icons [INFO] Copied resources/loading [INFO] Resolving your application dependencies… [INFO] Found 139 dependencies. Concatenating all into app.js… [INFO] Processed sdk/sencha-touch.js [INFO] Minifying sdk/sencha-touch.js [INFO] Processe

  • Yannis Rizos
    ios development-environment xcode
    Let me explain my need:I’m having a networked environment with 3 computers connected to a server which will be running full-time. The server also runs a FTP server. I would like to create an environment where 3 developers will be able to work on the same project.For example, if I’m creating a CRM app, I would like to split the project into modules so that each one will be working on each module like Developer A will be working on authentication, Developer B will be working on saving/retrieving

  • xpg934
    ios uitableview garbage-collection monotouch monotouch.dialog
    Please help me, what am I doing wrong.I use BubbleCell and BubbleElement from the examples. For unknown reasons, the application sometimes crashes in native code. I try out a little bit to correct the situation if I do not use DequeueReusableCell, and always create a new BubbleCell. Also, the problem disappears if the constructor BubbleElement to pass a string constant as the caption, not the object field.Stacktrace: http://pastebin.com/KAYzpHDkThe problem is deeper than it seems. Your suggestio

  • Idan Adar
    ios native worklight
    Our Worklight project uses both hybrid and native screens. Both work fine independently. Our problem pertains to Native screens calling/embedding the Worklight page.The structure of the native screen is:Header & footer with some data and Middle section is a native WebView componentIf we try to load the Worklight page in the native WebView, it fails to initialize and load the Worklight framework.In the native WebView we use the following to call the Worklight page:[webView loadHTMLString:@”wo

  • Arpit MIshra
    ios ios4 sencha-touch sencha-touch-2
    I am new to sencha touch and developed a small test app using sencha touch 2 and generated a native package for i-os and it’s working fine with the emulator but when i tried installing iton the device it’s falling in installation with the message entitlements are not valid. I have generated the certificate from apple official site and also have the provisioning profile for the same then why the installation fails?Is there any way to specify the i-os version in packaging for which i have to devel

  • Stéphane Péchard
    ios plugins cordova
    I have some values generated from my native code that I would like to pass to phonegap. These data are generated in real time and are not directly influenced by the user’s actions through the phonegap gui.My native code is part of a plugin that I made.What is the best way to approach this? I want to have a function to send data over anytime and have a listener on the cordova side. I’m using Cordova 1.5 with Xcode 4.3.Here is what I have so far:swipe.js:var swipe={callNativeFunction: function (s

  • 99tm
    ios sencha sencha-touch-2
    I am building a WebApp with Sencha Touch 2. Running it on the iOSSimulator with:sencha app build nativeworks fine. But when I change to iOS device and iPhone in the packager.json file I get the following error:[INFO] The application was successfully packaged The applicationwas successfully signed Only iOS simulator is supported to runpackaged apps Failed to run packaged applicationDoes anyone know how to handle this?

  • Littm
    objective-c ios5 phonegap ios4 phonegap-plugins
    This is what I did:1) Installed Cordova version 2.0.02) My XCode Version is 4.3.33) Created a phone gap project by ./create command. 4) in index.html:<script type=”text/javascript”>function nativePluginResultHandler (result) { alert(“SUCCESS: \r\n”+result ); } function nativePluginErrorHandler (error) { alert(“ERROR: \r\n”+error ); } function callNativePlugin( returnSuccess ) { alert(“Invoking..”);HelloPlugin.callNativeFunction( nativePluginResultHandler, nativePluginErrorHandler, return

  • Daniel
    objective-c binding monotouch native
    I’m trying to make a c# binding for “iCarousel” objective-c library. I’ve created a new target “Cocoa Touch Static Library” for the Xcode project and i’ve created the static libraries after that using the tutorial commands:/Developer/usr/bin/xcodebuild -project iCarousel.xcodeproj -target libiCarousel -sdk iphonesimulator -configuration Release clean build /Developer/usr/bin/xcodebuild -project iCarousel.xcodeproj -target libiCarousel -sdk iphoneos -arch armv6 -configuration Release clean build

  • airpaulg
    ios objective-c logging monotouch stderr
    I am linking a third-party native library using the LinkWith attribute. This native library is outputting various logs in the stderr channel. I would like to access those logs because I need to report a bug in the said third-party library.I tried redirecting the stderr with Console.SetError(Console.out) to have it in my console, but no dice. I also tried to output it in the Environment.SpecialFolder.Personal folder with the -keeptemp extra argument to have it on my disk, but this alternative als

  • MayurCM
    ios objective-c oauth tumblr
    my issue is I can successfully logged in to tumblr However, unable to post on tumblr. Below is my codeNSString *path = @”blog/myName.tumblr.com//post”; // set your Tumblr name hereNSDictionary *parameters = @{@”type” : @”text”,@”title” : @”I’m On on Tumblr”,@”body” : @”Its going to be fun”};NSURLRequest *preparedRequest = [OAuth1Controller preparedRequestForPath:pathparameters:parametersHTTPmethod:@”POST”oauthToken:_oauthTokenoauthSecret:_oauthTokenSecret];// Send the request and w

  • Guy
    iphone objective-c ios image-processing
    I’m trying to combine two photos into one image (think a body with a hole in the face on top of a picture of a different person’s face). The top image has some semi-transparent pixels and some fully transparent pixels and I want to overlay it on top of a solid image.Here’s what I’m doing: I have a Context with the right size and I draw the bottom image on it, without any alpha (faceImage). On top of that I draw an image that has a transparent hole in it, with various levels of transparencies (co

  • Dov
    objective-c cocoa unit-testing key-value-observing ocmock
    I would like to test that Key-Value-Observation is working properly for a class of mine. It has one property, which depends on another. They are set up like so:+ (NSSet *)keyPathsForValuesAffectingSecondProperty {return [NSSet setWithObjects:@”firstProperty”,nil]; }- (NSArray *)secondProperty {return [self.firstProperty array]; }I want to run a unit test to verify that when firstProperty changes, an object bound to secondProperty gets a notification. At first I thought I would be able to use +[O

  • danielpunkass
    ios objective-c osx cocoa automatic-ref-counting
    In Apple’s documentation about ARC, they make a point of spelling out a problematic scenario in which ARC will generate a boilerplate temporary variable behind the scenes. Search on “The compiler therefore rewrites”:https://developer.apple.com/library/mac/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.htmlThe gist of the warning seems to be that because the stack-based variable is “strong” and the by-reference parameter to the called method (performOperationWithError:) i

  • SaamJB
    iphone objective-c ios
    I have a UITableViewController that when a cell is pressed, I want the controller to pop itself, and then have the controller it pop’s to, push another view controller onto the stack.I am invoking this method because the popped-to viewController is the delegate of the tableViewControllerI am currently invoking this method with a delay on it, because otherwise, everything gets screwed up waiting for the animation to end. Doing it this way seems a bit hacky and seems to me like it would fail if so

  • Steven
    objective-c ios oauth
    I’ve been trying to get a basic OAuth interaction working without success. There are certainly similar questions already posed on SO, but most of them have no replies. I’m getting pretty desperate here, so I’m just going to start by posting my entire code:// OAuth parameters NSString *oauthNonce = [self genRandStringLength:20]; NSString *oauthSignatureMethod = [NSString stringWithFormat:@”HMAC-SHA1″]; time_t oauthTimeStamp = (time_t) [[NSDate date] timeIntervalSince1970];// generate OAuth signat

  • morgancodes
    objective-c cocoa cocoa-touch json
    In java-land, there are a handful of useful libraries which will convert json strings to objects of matching type. The json libraries I’ve seen for cocoa simply create nested NSDictionaries and NSArrays. Is there a tool out there which will go the extra step of reconstituting whatever object type I want? So, for example, if I have a class called “Unicorn”, with a property “maneColor”, and I have json that looks like this:{“maneColor”:”silver” }I can automatically instantiate a Unicorn object wit

  • anderZubi
    xcode osx-mavericks
    Since upgrading to 10.9 and XCode5 I get the following compile message on the log console during compilation:Native OpenCL program build failed:error: PCH file contains compiler errorsMy Program display images with or without CoreImage Filters. When I activate a filter I get on the console the following messages, the displayed image is also totally messed up. If I turn of the the filter every thing is back to normal.######################################## clBuildProgram() failed (-11) for kern

  • captainkirkwood
    ios xcode worklight worklight-adapters worklight-security
    We have an “iPhone” environment in our Worklight project that we use for our native iOS client development in XCode 5. We are getting an authentication error, despite having App Authentication disabled in the Worklight console.The steps we’re following are:Call wlConnectWithDelegate: method on WLClient sharedInstance On success from wlConnectWithDelegate, we invoke our adapter procedure with invokeProcedure:withDelegate:The code looks like this:#import <BlocksKit/A2DynamicDelegate.h>+ (voi

  • Yannis Rizos
    ios development-environment xcode
    Let me explain my need:I’m having a networked environment with 3 computers connected to a server which will be running full-time. The server also runs a FTP server. I would like to create an environment where 3 developers will be able to work on the same project.For example, if I’m creating a CRM app, I would like to split the project into modules so that each one will be working on each module like Developer A will be working on authentication, Developer B will be working on saving/retrieving

  • jtc
    ruby-on-rails ruby xcode rvm
    I tried everything from others’ posts. -I’m on Lion -Installed Xcode 4.6.3 (4H1503) -Brew up to date and ready to brew -Installed rvm with ruby 2.0.0 -Installed command line tools – gcc42-4.2.1- – tried ‘sudo ln -s llvm-gcc-4.2 gcc-4.2’And still get this error below. Please help!!Building native extensions. This could take a while… ERROR: Error installing rails:ERROR: Failed to build gem native extension./junetic.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb/junetic.rvm/rubies/ruby-2.0.0-p

  • Victor
    ruby-on-rails ruby xcode gem
    I have latest Xcode Tools 3.2.4 installed. Just whenever I try to install any gem, for example, the MySQL gem, such error occurs:VNMB:rails2app ABC$ sudo env ARCHFLAGS=”-arch i386″ gem install mysql — \–with-mysql-dir=/usr/local/mysql –with-mysql-lib=/usr/local/mysql/lib \–with-mysql-include=/usr/local/mysql/includePassword:Building native extensions. This could take a while…ERROR: Error installing mysql:ERROR: Failed to build gem native extension./Users/ABC/.rvm/rubies/ruby-1.8.7-p302/b

  • Staffan Estberg
    ruby-on-rails ruby xcode gcc rvm
    I’m new to Terminal so please bear with me. Completed installing the following successfully (in this particular order):xCode 4.5 RVM 1.16 GCC 4.2.1 Ruby 1.9.3When trying to install Rails (“gem install rails”) the installation starts but is then interrupted with an error: “Failed to build gem native extension”. No idea what this refers to. Ideas? Something else I need to install beforehand? On my first attempt to install Rails I accidentally ran it with sudo. Will this affect anything?Edit: And t

  • TheAmateurProgrammer

  • aLFaRSi
    objective-c xcode
    i`m trying to make an NSMutableArray From NSUserDefaults so i can add/delete and edit it latermy code is- (void)viewDidLoad { [super viewDidLoad];NSUserDefaults *ArrayTable = [NSUserDefaults standardUserDefaults]; [ArrayTable setObject:@”One” forKey:@”myArray”]; [ArrayTable setObject:@”Two” forKey:@”myArray”]; [ArrayTable setObject:@”Three” forKey:@”myArray”]; [ArrayTable setObject:@”Four” forKey:@”myArray”]; [ArrayTable setObject:@”Five” forKey:@”myArray”]; [ArrayTable synchronize];NSMutableArr

  • Rob Caraway
    ios objective-c xcode xcodebuild osx-server
    I’m getting this error when trying to use an Xcode bot to integrate for unit tests:Integration failed. Unexpected error while building. See the integration’s logs for more details.I couldn’t make any sense of the logs. They pretty much spit out any error with the system whether related or not.I use a remote repository from from Github, testing currently on only 1 device. I’m .gitignore-ing the standard stuff from Xcode.Here is the most relevant messages from the log I could find:’2014-01-01 10

  • jerik
    ios xcode app-store rename appstore-approval
    I want to submit my app to the apple approval process. According to the guideline, they will reject apps that are beta versions. During the history of development, my code was based on an earlier beta version, thats why I have some files and folders, which contains the string “beta”: ./FooBeta ./FooBeta/FooBeta-Info.plist ./FooBeta/FooBeta-Prefix.pch ./FooBeta.xcodeproj/xcuserdata/bar.xcuserdatad/xcschemes/FooBeta.xcscheme ./FooBeta.xcworkspace/xcshareddata/FooBeta.xccheckout ./FooBetaTests

  • Perception
    java swing layout
    I’m still trying to learn how layout managers work. I made a Frame with two JPanels. The first one contains a textArea with a boxLayout. The second one contains a flow layout with a button.I set the preferredSize of each panel accordingly, packed them, but got unexpected results.import java.awt.*; import javax.swing.*;public class LayoutMgrTest {public static void main(String[] args){TableBasic frame = new TableBasic();frame.setDefaultCloseOperation( EXIT_ON_CLOSE );frame.setVisible(true);frame.

  • chhh
    html css layout
    is there a way to auto adjust container DIV height to accomodate absolutely positioned child DIVs? i’d like to get something like+———————–+ | container | | +——+ +——+ | | | chld | | chld | | | | 1 | | 2 | | | | | | | | | +——+ +——+ | | +——+ | | | chld | | | | 3 | | | | | | | +——+ | +———————–+i try something like:<div class

  • Anne
    css layout
    I am having troubles to achieve quite an “exotic” layout which is some kind of a “nested” layout where the HEADER and Footer are actually part of the right column (or “frame”):- Left column – Fixed,Static – Right column – Fluid/liquid/scrollable — Header – fixed — left/main fluid/liquid — Right/sidebar – fixedvisually it should be something like that :so basically the yellowish area is static, fixed and always in view.The green frame is scrollable , and it contains the header, footer and

  • EmptyStack
    iphone android objective-c ios layout
    I want to add a subview in the top of my view, I have to recalculate the origin y value for all of other views and re-position them to leave space for the new added view.It is very boring, as I know android have relativelayout or linearlayout can help automatically do that.How to solve this problem easily in ios development?

  • Jeroen Moons
    javascript layout svg stack d3.js
    I successfully mapped y values, but I’m having trouble mapping an x value to an arbitrary field on my values when creating a stacked bar graph using the stack layout. I’m not really familiar with Javascript and d3; so I’m probably missing something basic here.A value in my array of data looks like { “xInit”: 0, “yInit”: 91 }. I want to map xInit to x in the graph and yInit to y.This works (suggested by Bryan Clark):var st = d3.layout.stack().values(function (d) { return d.values; }).y(function (

  • unwind
    gui layout types point
    or “How I learned to stop worrying and learned to love measurement systems”I wanted a central spot that I can refer to later to give me a quick low-down on various units of measurement used in programming. SO seemed the best place to put it, and while I could go ahead and answer the question myself, y’all are a much smarter bunch than I, so I might as well let you do it.Please pick one unit that you’re familiar with, use “#name” in the first line to give it as the heading (making it easy to fin

  • Seraphim’s host
    android layout user-interface drawtext android-4.2
    I’m facing a serious issue with my Application, published on Google Play and apparently working fine on all versions of Android except for > 4.0.This is a screenshoot from my Android 4.0 HTC phone:And this is what I get on Nexus 7, Android 4.2.1 (same behaviour in the emulator):I see the same behaviour for each text drawn using canvas.drawText()the Paint used to draw text is:paint = new Paint(); paint.setAntiAlias(true); paint.setColor(color); //some color paint.setTextSize(size); //some size pa

  • casperOne
    jquery html layout
    I have a website that has a menu div at the top and a side nav to the left. I’ve been using ajax .load() to replace the content div with whatever I want. I seem to be having a lot of issues when using jQuery in the content of those pages that get loaded in. Using the .live() function is helping but I keep getting unexpected behavior in places.What is the right way to handle a menu/nav layout, without refreshing the entire page, and having no issues with the content that goes in? What frameworks

  • Pedro Pertino
    sharepoint layout master-pages
    I need to create a Publishing Page without master page, I already try with a custom layout, and overriding PublishPageLayout but i’m getting unexpected error. The only master page I can assign is seattle.master, not even oslo.master, neither minimal.master or a custom masterpage, so it’s like I can’t do anything. (I already registered the assembly a safe in the web.config file) I can create a blank page from MSD but I don’t know how to edit it, I mean, use some web parts and staff.I’m sorry if y

  • f4bzen
    android android-layout layout screen-resolution
    i´m pretty new to android development and creating different layouts for each resolution wasn´t really that easy for me. So, I was able to optimize my app for most devices (in eclipse), but i´m still having some problems here and there:do I really have to copy the same images with different resolutions for each device-resolution into the respective folder? I´m currently using the hdpi, large-hdpi, mdpi and xdpi folders… isnt it possible to use one drawable-folder and just scale the images down

  • Eptin
    ios xcode frameworks xcode5 google-maps-sdk-ios
    I’ve been carefully following the directions for ‘Adding the Google Maps SDK for iOS to your project’ with the Google Maps iOS 1.5.0 SDK and Xcode 5.0, while building to an iPhone 4S. When building the project, I get the following warning:Check dependencieswarning: skipping file ‘/Users/Michael/iOS Development/C&G rough draft/ComingAndGoingRoughDraft/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle’ (unexpected file type ‘wrapper.plug-in’ in Frameworks & Libraries build phase)

  • Amar
    xcode git xcode5
    i am using git with one of my projects. this project is located at : /Users/infinityar/Documents/XcodeProjects/src/InfinityAR-ThinkerBell/iPhonewhen i am trying to make a PULL, COMMIT, PUSH suddenly a new remote has added looks like this XcodeProjects he is the unwanted / unexpected one. once i have added static library and it was linked against it fromxcode build settings Library Search Pathes but i have changed the location and removed the reference to that path tough i am still seeing this re

  • OnesAndZeros
    objective-c xcode5
    The code snippet below worked to resize a UITextView frame to it’s content height, before installing Xcode 5 but it doesn’t work since the upgrade:CGRect frame = _textView.frame; frame.size.height = _textView.contentSize.height; _textView.frame = frame;I’ve searched and haven’t found the fix. Any thoughts?

  • Shebuka
    ios objective-c uinavigationcontroller segue xcode5
    This is a continuation/alternative of this thread: popToRootViewControllerAnimated problem to sort out what is the problem/mistake in a more structured and easier to understand way. When pressing the back button in VC3 i want to go back to VC1.I have the following setup:The following code:VC1:@implementation ViewController – (IBAction)myButton1:(id)sender {//Call InformationViewController for Quick Game [self performSegueWithIdentifier:@”toVC2″ sender:self];}- (void)viewDidLoad { [super viewDidL

  • bneely
    xcode5 xctest
    Is there any way to disable some of the extra console messages when running tests using XCTest in Xcode 5? Every time I run tests Xcode will print out a number of useless lines about tests I’m not running:Test Suite ‘xxxxViewTests’ started at 2014-01-13 17:10:48 +0000 Test Suite ‘xxxxViewTests’ finished at 2014-01-13 17:10:48 +0000. Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds Test Suite ‘yyyyyyViewTests’ started at 2014-01-13 17:10:48 +0000 Test Suite ‘yyyyyyViewTes

  • iMani
    ios xcode5 arm64
    I am using xcode5 building a iOS static library which support arm64 for iphone5s, but when building the assembly file, It shows the error message as below./Users/markchen/iDev/webRTC/ios/svnWebRTC/webrtcLibSource/trunk/webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S:1:1: error: unexpected token at start of statement @ ^ /Users/markchen/iDev/webRTC/ios/svnWebRTC/webrtcLibSource/trunk/webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S:2:1: error: unexpected token at st

  • Undo
    objective-c ios7 xcode5 objective-c-modules
    I have some classes that use the new @import module directive and it works fine in my non-workspace project but once I move those files over to a project in a workspace I get the error Unexpected ‘@’ in program similar to this question: @import “Unexpected @ in program” However I DO have Enable Modules build settings ticked to Yes. The static library in my workspace project also has this option enabled. I tired cleaning the build as well with no luck. Are there any other settings I’m m

  • Can Poyrazoglu
    ios xcode interface-builder autolayout xcode5
    I am building an iOS app in Xcode 5, and I’m having trouble adding layout constraints. In Xcode 4.x, I could just add leading/trailing/top/bottom spaces to container (superview) to any UI element. Now, I only have this option:I want to add a “bottom space to superview” constraint to my text view. It says “spacing to nearest neighbor”, but I don’t want to create a constraint to “nearest neighbor”, I have something else under my text view, and I don’t want to create a constraint with that. If ther

  • Faisal Ahamed
    sqlite3 compiler-errors nsstring xcode5
    Help Help Here is my code i am getting error like “unexpected @ in program ” in nsstring *insertSQL” statement. can anyone help to overcome this . i am confused whats that .!- (BOOL) saveData:(NSString*)registerNumber name:(NSString*)name department:(NSString*)department year:(NSString*)year; {const char *dbpath = [databasePath UTF8String];if (sqlite3_open(dbpath, &database) == SQLITE_OK){NSString *insertSQL = [NSString stringWithFormat:@”insert intostudentsDetail (regno,name, department,

  • MrJre
    ios ios7 xcode5
    I updated project to Xcode 5 and enabled modules in build settings. However, I see compiler error Unexpected ‘@’ in program when I use @import.#ifndef __IPHONE_7_0 #warning “This project uses features only available in iOS SDK 7.0 and later.” #endif#ifdef __cplusplus #import <opencv2/opencv.hpp> #endif#ifdef __OBJC__ @import SystemConfiguration; @import UIKit;Is it anything else that should be done?

Web site is in building