Questions tagged [iphone]

DO NOT use this tag unless you are addressing Apple's iPhone and/or iPod touch specifically. For questions not dependent on hardware, use the tag [ios]. More tags to consider are [xcode] (but only if the question is about the IDE itself), [swift], [objective-c] or [cocoa-touch] (but not [cocoa]). Please refrain from questions regarding the iTunes App Store or about iTunes Connect. If using C#, tag with [mono].

iphone
Filter by
Sorted by
Tagged with
504 votes
30 answers
150k views

How to develop or migrate apps for iPhone 5 screen resolution?

The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels). What is required to develop new or transition already existing applications to the new screen size? What ...
Lukasz's user avatar
  • 19.9k
174 votes
4 answers
49k views

What is the best way to deal with the NSDateFormatter locale "feature"?

It seems that NSDateFormatter has a "feature" that bites you unexpectedly: If you do a simple "fixed" format operation such as: NSDateFormatter* fmt = [[NSDateFormatter alloc] ...
Hot Licks's user avatar
  • 47.3k
1270 votes
42 answers
1.1m views

How can I develop for iPhone using a Windows development machine?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows? The only other way I can think of doing this is to run a Mac VM image on a ...
550 votes
32 answers
411k views

How to determine the current iPhone/device model?

Is there a way to get the device model name (iPhone 4S, iPhone 5, iPhone 5S, etc) in Swift? I know there is a property named UIDevice.currentDevice().model but it only returns device type (iPod touch,...
The Mach System's user avatar
376 votes
31 answers
199k views

Determine device (iPhone, iPod Touch) with iOS

Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible.
Rob's user avatar
  • 5,588
339 votes
9 answers
236k views

Programmatically get own phone number in iOS

Is there any way to get own phone number by standard APIs from iPhone SDK?
Vadim's user avatar
  • 9,463
275 votes
7 answers
143k views

How to store custom objects in NSUserDefaults

Alright, so I've been doing some poking around, and I realize my problem, but I don't know how to fix it. I have made a custom class to hold some data. I make objects for this class, and I need to ...
Ethan Mick's user avatar
  • 9,537
119 votes
20 answers
162k views

How to get the indexpath.row when an element is activated?

I have a tableview with buttons and I want to use the indexpath.row when one of them is tapped. This is what I currently have, but it always is 0 var point = Int() func buttonPressed(sender: ...
Vincent's user avatar
  • 1,645
228 votes
0 answers
315k views

iPhone development on Windows [duplicate]

Possible Duplicate: How can I develop for iPhone using a Windows development machine? Is there a way to develop iPhone (iOS) applications on Windows? I really don't want to get yet another ...
183 votes
14 answers
241k views

Launch an app from within another (iPhone)

Is it possible to launch any arbitrary iPhone application from within another app?, For example in my application if I want the user to push a button and launch right into the Phone app (close the ...
user avatar
217 votes
26 answers
137k views

Detecting which UIButton was pressed in a UITableView

I have a UITableView with 5 UITableViewCells. Each cell contains a UIButton which is set up as follows: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)...
rein's user avatar
  • 33.3k
139 votes
4 answers
135k views

How do I set up a simple delegate to communicate between two view controllers?

I have two UITableViewControllers and need to pass the value from the child view controller to the parent using a delegate. I know what delegates are and just wanted to see a simple to follow example. ...
Strong Like Bull's user avatar
302 votes
24 answers
156k views

How to detect iPhone 5 (widescreen devices)?

I've just upgraded to Xcode 4.5 GM and found out that you can now apply the '4" Retina' size to your view controller in the storyboard. Now if I want to create an application that runs on both ...
Finn Gaida's user avatar
  • 4,010
227 votes
19 answers
218k views

Opening the Settings app from another app

Okay, I know that there are many question about it, but they are all from many time ago. So. I know that it is possible because the Map app does it. In the Map app if I turn off the localization for ...
FelipeDev.-'s user avatar
  • 3,133
349 votes
20 answers
146k views

iOS UIImagePickerController result image orientation after upload

I am testing my iPhone application on an iOS 3.1.3 iPhone. I am selecting/capturing an image using a UIImagePickerController: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] ...
james's user avatar
  • 26.2k
200 votes
9 answers
101k views

How do I export UIImage array as a movie?

I have a serious problem: I have an NSArray with several UIImage objects. What I now want to do, is create movie from those UIImages. But I don't have any idea how to do so. I hope someone can help ...
Nuker's user avatar
  • 2,597
159 votes
20 answers
134k views

How to take a screenshot programmatically on iOS

I want a screenshot of the image on the screen saved into the saved photo library.
Jab's user avatar
  • 27.3k
293 votes
24 answers
255k views

Proper way to exit iPhone application?

I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what's the appropriate method to call to terminate the ...
user21293's user avatar
  • 6,479
290 votes
10 answers
139k views

Build fat static library (device + simulator) using Xcode and SDK 4+

It appears that we can - theoretically - build a single static library that includes both simulator and iPhone and iPad. However, Apple has no documentation on this that I can find, and Xcode's ...
Adam's user avatar
  • 33k
265 votes
8 answers
162k views

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

Possible Duplicate: How to develop or migrate apps for iPhone 5 screen resolution? I was just wondering with how should we deal with the iPhone 5 bigger screen size. As it has more pixels in ...
jturolla's user avatar
  • 6,626
75 votes
4 answers
113k views

What are all the custom URL schemes supported by the Facebook iPhone app?

Note These URL's are likely not available. Facebook has been updated a number of times and did not officially support any of these. /Note I am trying to see what information is available about ...
The Lazy Coder's user avatar
142 votes
7 answers
60k views

iPhone Data Usage Tracking/Monitoring

I've searched over this topic but found very few details which were helpful. With these details I've tried to cook some code as follows. Note: Please compare the details shared in this post with ...
Sahil Khanna's user avatar
  • 4,312
234 votes
13 answers
156k views

Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?

I'd like to have iOS to open URLs from my domain (e.g. http://martijnthe.nl) with my app whenever the app is installed on the phone, and with Mobile Safari in case it is not. I read it is possible to ...
Martijn Thé's user avatar
  • 4,684
272 votes
23 answers
285k views

How to get device make and model on iOS?

I was wondering if it's possible to determine what kind of iPhone (for example) the currentdevice is? I know it's possible to get the model through NSString *deviceType = [[UIDevice currentDevice] ...
Nathan Fraenkel's user avatar
104 votes
6 answers
137k views

iPhone/iOS JSON parsing tutorial [closed]

As a learning experience, I want to make an iPhone application that calls a webserver/webservice, retrieves a JSON response, and uses that response to populate the rows of a UITableView (assuming it ...
Casey Flynn's user avatar
  • 13.9k
22 votes
3 answers
24k views

How to send Device to device notification by using FCM without using XMPP or any other script.?

Is there any way to send Upstream notification message through FCM from one android device to another devices connected with Firebase database. I know that XMPP server can then receive the upstream ...
Vishal Patoliya ツ's user avatar
156 votes
9 answers
106k views

iPhone get SSID without private library

I have a commercial app that has a completely legitimate reason to see the SSID of the network it is connected to: If it is connected to a Adhoc network for a 3rd party hardware device it needs to be ...
Steve Reed Sr's user avatar
127 votes
5 answers
146k views

AES Encryption for an NSString on the iPhone

Can anybody point me in the right direction to be able to encrypt a string, returning another string with the encrypted data? (I've been trying with AES256 encryption.) I want to write a method which ...
Boz's user avatar
  • 1,646
185 votes
12 answers
291k views

How can I check if an app is installed from a web-page on an iPhone

I want to create a web-page, a page that will redirect an iPhone to the App Store if the iPhone does not have the application installed, but if the iPhone has the app installed I want it to open the ...
Joakim Engstrom's user avatar
201 votes
24 answers
225k views

How do I URL encode a string

I have a URL string (NSString) with spaces and & characters. How do I url encode the entire string (including the & ampersand character and spaces)?
xonegirlz's user avatar
  • 8,939
146 votes
12 answers
143k views

How can I programmatically get the MAC address of an iphone

How to programmatically get an iPhone's MAC address and IP address?
user avatar
58 votes
7 answers
25k views

Prefixing property names with an underscore in Objective C [duplicate]

I've previously avoided underscores in my variable names, perhaps a holdover from my college Java days. So when I define a property in Objective C this is what I naturally do. // In the header @...
Michael Behan's user avatar
80 votes
4 answers
34k views

How to add a breakpoint to objc_exception_throw?

this was the answer from the brad larson on this SO question If you add two breakpoints, you should be able to debug these exceptions. To do this, go to Run | Show | Breakpoints and create two global ...
Rahul Vyas's user avatar
  • 28.5k
225 votes
14 answers
189k views

Figure out size of UILabel based on String in Swift

I am trying to calculate the height of a UILabel based on different String lengths. func calculateContentHeight() -> CGFloat{ var maxLabelSize: CGSize = CGSizeMake(frame.size.width - 48, ...
Cody Weaver's user avatar
  • 4,826
182 votes
16 answers
95k views

How do I detect that an iOS app is running on a jailbroken phone?

If I want my app to behave differently on a jailbroken iPhone, how would I go about determining this?
Ben Gottlieb's user avatar
  • 85.5k
87 votes
14 answers
127k views

iOS Launching Settings -> Restrictions URL Scheme

I've recently discovered the awesome iOS5 custom Settings URL Scheme, which can be explained in detail at this great website. I've found this to work, directing the user to the Settings app from my ...
kturner's user avatar
  • 1,101
175 votes
32 answers
505k views

HTML5 Video tag not working in Safari , iPhone and iPad

I am trying to create an html5 web page in which there is a small video like 13s , I converted the flash version of this video into 3 format : .ogv using fireFogg , .webm using firefogg also and .mp4 ...
Khaled Al Hage Ismail's user avatar
108 votes
22 answers
104k views

Remove HTML Tags from an NSString on the iPhone

There are a couple of different ways to remove HTML tags from an NSString in Cocoa. One way is to render the string into an NSAttributedString and then grab the rendered text. Another way is to use ...
lfalin's user avatar
  • 4,229
310 votes
14 answers
213k views

Comparison between Corona, Phonegap, Titanium

I am a web developer and I want to move my web products to iPhone. One of the products is like Google Maps: show map on the phone screen, you can drag or resize the map and view some information that ...
Mickey Shine's user avatar
  • 12.3k
225 votes
7 answers
150k views

How to access SOAP services from iPhone

I'm planning to develop an app for the iPhone and that app would have to access a couple of SOAP services. While doing some basic checking in the iPhone SDK I was not able to find any support for ...
Gero's user avatar
  • 2,967
103 votes
13 answers
95k views

HTML character decoding in Objective-C / Cocoa Touch

First of all, I found this: Objective C HTML escape/unescape, but it doesn't work for me. My encoded characters (come from a RSS feed, btw) look like this: & I searched all over the net and ...
treznik's user avatar
  • 8,044
39 votes
10 answers
18k views

How to know the UITableview row number

I have a UITableViewCell with UISwitch as accessoryview of each cell. When I change the value of the switch in a cell, how can I know in which row the switch is? I need the row number in the switch ...
Jean Paul's user avatar
  • 2,419
156 votes
19 answers
96k views

How to detect total available/free disk space on the iPhone/iPad device?

I'm looking for a better way to detect available/free disk space on the iPhone/iPad device programmatically. Currently I'm using the NSFileManager to detect the disk space. Following is the snippet of ...
Code.Decode's user avatar
  • 3,736
118 votes
17 answers
154k views

Expand/collapse section in UITableView in iOS

Could somebody tell me the way to perform UITableView expandable/collapsible animations in sections of UITableView as below? or
vinnitu's user avatar
  • 4,284
19 votes
1 answer
19k views

Firebase query - Find item with child that contains string

I'm having a bit of trouble with a Firebase Query. I want to query for objects, where the objects child value contains a certain string. So far I have something that looks like this: Firebase *ref = ...
Holger Sindbaek's user avatar
243 votes
11 answers
166k views

How can I send mail from an iPhone application

I want to send an email from my iPhone application. I have heard that the iOS SDK doesn't have an email API. I don't want to use the following code because it will exit my application: NSString *url =...
Khushi's user avatar
  • 3,119
190 votes
17 answers
124k views

UIImage: Resize, then Crop

I've been bashing my face into this one for literally days now and even though I feel constantly that I am right on the edge of revelation, I simply cannot achieve my goal. I thought, ahead of time ...
Carson C.'s user avatar
  • 2,372
116 votes
6 answers
263k views

javascript scroll event for iPhone/iPad?

I can't seem to capture the scroll event on an iPad. None of these work, what I am doing wrong? window.onscroll=myFunction; document.onscroll=myFunction; window.attachEvent("scroll",myFunction,...
ck_'s user avatar
  • 3,383
96 votes
17 answers
79k views

Is there a documented way to set the iPhone orientation?

I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the ...
Dave Verwer's user avatar
  • 6,170
40 votes
4 answers
7k views

Difference between self.ivar and ivar?

aclass.h @interface aClass : NSObject { NSString *name; } @property (nonatomic, retain) IBOutlet NSString *name; @end aclass.m @implementation aClass @synthesize name; - (void)dealloc { ...
ohho's user avatar
  • 51.4k

1
2 3 4 5
663