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
220,736
questions
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 ...
909
votes
25
answers
554k
views
Xcode error "Could not find Developer Disk Image"
When attempting to run a build on a connected iOS device in Xcode I get the error:
Could not find Developer Disk Image
I saw that there was a public beta for Xcode, so I installed it.
One of the ...
883
votes
41
answers
776k
views
Disable Auto Zoom in Input "Text" tag - Safari on iPhone
I made an HTML page that has an <input> tag with type="text". When I click on it using Safari on iPhone, the page becomes larger (auto zoom). Does anybody know how to disable this?
588
votes
21
answers
358k
views
Is it possible to disable the network in iOS Simulator?
I am trying to debug some inconsistent behaviour I am seeing in an application that gets its primary data from the Internet. I don't see the issues in the simulator, just on the device, so I'd like ...
570
votes
24
answers
234k
views
How to lose margin/padding in UITextView
I have a UITextView in my iOS application, which displays a large amount of text.
I am then paging this text by using the offset margin parameter of the UITextView.
My problem is that the padding of ...
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,...
530
votes
20
answers
308k
views
Take screenshots in the iOS simulator
I want to take a screenshot of my iOS application when it is running in the simulator, and save the screenshot on my Mac. How can I do this?
523
votes
12
answers
281k
views
Missing Compliance status in TestFlight
When I added my latest build for internal testing with TestFlight, I saw that it had a "Missing Compliance" status.
Is this a major problem? Why does this appear? How can I resolve this ...
513
votes
8
answers
156k
views
iPad Multitasking support requires these orientations
I'm trying to submit my universal iOS 9 apps to Apple (built with Xcode 7 GM) but I receive this error message for the bundle in iTunes Connect, just when I select Submit for Review:
Invalid Bundle. ...
511
votes
35
answers
223k
views
How to navigate through textfields (Next / Done Buttons)
How can I navigate through all my text fields with the "Next" Button on the iPhone Keyboard?
The last text field should close the Keyboard.
I've setup the IB the Buttons (Next / Done) but now I'm ...
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 ...
490
votes
4
answers
94k
views
Ignore Xcode warnings when using Cocoapods
I use quite a lot third party libraries which have many warnings in it, after the latest Xcode updates. (for example the Facebook SDK pod)
Now all these warnings are shown in my Xcode on the place I ...
482
votes
14
answers
291k
views
Does my application "contain encryption"?
I'm uploading a binary for the first time. iTunes Connect has asked me:
Export laws require that products containing encryption be properly authorized for export.
Failure to comply could result ...
441
votes
28
answers
462k
views
Detect a finger swipe through JavaScript on the iPhone and Android
How can you detect that a user swiped his finger in some direction over a web page with JavaScript?
I was wondering if there was one solution that would work for websites on both the iPhone and an ...
435
votes
42
answers
262k
views
Xcode "Device Locked" When iPhone is unlocked
When I tried to build and run, Xcode said my device was locked. I looked at my iPhone, and it's not locked at all. How do I fix this?
416
votes
25
answers
324k
views
How to disable phone number linking in Mobile Safari?
Safari on iPhone automatically creates links for strings of digits that appear to the telephone numbers. I am writing a web page containing an IP address, and Safari is turning that into a phone ...
414
votes
11
answers
364k
views
Turn off iPhone/Safari input element rounding
My website renders well on the iPhone/Safari browser, with one exception: My text input fields have a weird rounded style which doesn't look good at all with the rest of my website.
Is there a way to ...
401
votes
34
answers
326k
views
How to dismiss keyboard for UITextView with return key?
In IB's library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as '\n'.
I can add a button and ...
388
votes
7
answers
97k
views
UILongPressGestureRecognizer gets called twice when pressing down
I am detecting if the user has pressed down for 2 seconds:
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]
initWithTarget:...
385
votes
29
answers
608k
views
How do you access a website running on localhost from iPhone browser
I am working on a mobile website and would like to test it using my iPhone browser. My Windows 7 machine and iPhone are on the same wireless network. How do I access localhost from the iPhone? Right ...
383
votes
23
answers
199k
views
Images can't contain alpha channels or transparencies
Apple has released new version of iTunes Connect & I got an error message when I tried to set Screenshots on itunes connect for my app.
"Images can't contain alpha channels or transparencies."
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.
375
votes
10
answers
315k
views
Remove or uninstall library previously added : cocoapods
I added an external framework via cocoapods into my iOS application. How can i remove that library from the project?
370
votes
6
answers
172k
views
Proper way to renew distribution certificate for iOS
My distribution certificate is expiring on June 7th, along with all of my provisioning files. How do I properly renew it? Should I revoke it now and request a new one? If I do that than will all my ...
367
votes
24
answers
214k
views
How to use Auto Layout to move other views when a view is hidden?
I have designed my custom Cell in IB, subclassed it and connected my outlets to my custom class. I have three subviews in cell content which are: UIView (cdView) and two labels (titleLabel and ...
362
votes
48
answers
213k
views
Xcode error: Failed to prepare device for development
I have updated to Xcode 12.3 beta. device version is 14.2, but Xcode complaining:
Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window.
...
358
votes
16
answers
258k
views
How do I draw a shadow under a UIView?
I'm trying to draw a shadow under the bottom edge of a UIView in Cocoa Touch. I understand that I should use CGContextSetShadow() to draw the shadow, but the Quartz 2D programming guide is a little ...
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] ...
348
votes
42
answers
191k
views
library not found for -lPods
I got an error when archiving a project. This is my environment.
Mac OS Lion
Xcode 4.3.1
iOS SDK 5.1
The project deployment target is:
IPHONEOS_DEPLOYMENT_TARGET 3.2
The error shows:
ld: library ...
346
votes
33
answers
124k
views
What are best practices that you use when writing Objective-C and Cocoa? [closed]
I know about the HIG (which is quite handy!), but what programming practices do you use when writing Objective-C, and more specifically when using Cocoa (or CocoaTouch).
344
votes
17
answers
276k
views
iPhone App Icons - Exact Radius?
I'm trying to create the icon for my iPhone app, but don't know how to get the exact radius that the iPhone's icons use. I've searched and searched for a tutorial or a template but can't find one.
I'...
343
votes
22
answers
239k
views
Color Tint UIButton Image
I noticed that when I place a white or black UIImage into a UISegmentedControl it automatically color masks it to match the tint of the segmented control. I thought this was really cool, and was ...
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?
327
votes
15
answers
191k
views
How to hide 'Back' button on navigation bar on iPhone?
I added a navigation control to switch between views in my app. But some of the views shouldn't have 'Back' (the previous title) button. Any ideas about how to hide the back button?
324
votes
18
answers
203k
views
Detect current device with UI_USER_INTERFACE_IDIOM() in Swift
What is the equivalent of UI_USER_INTERFACE_IDIOM() in Swift to detect between iPhone and iPad?
I get an Use of unresolved identifier error when compiling in Swift.
319
votes
7
answers
165k
views
Why does viewWillAppear not get called when an app comes back from the background?
I'm writing an app and I need to change the view if the user is looking at the app while talking on the phone.
I've implemented the following method:
- (void)viewWillAppear:(BOOL)animated {
[...
317
votes
23
answers
244k
views
UITableview: How to Disable Selection for Some Rows but Not Others
I am displaying in a group tableview contents parsed from XML. I want to disable the click event on it (I should not be able to click it at all) The table contains two groups. I want to disable ...
314
votes
35
answers
189k
views
Adding images or videos to iPhone Simulator
I am trying to use UIImagePickerController with UIImagePickerControllerSourceTypePhotoLibrary, but it says, "No photos". Where does the simulator get the images from? Where should I copy the images so ...
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 ...
307
votes
15
answers
530k
views
Capturing mobile phone traffic on Wireshark
How can I capture mobile phone traffic on Wireshark?
304
votes
8
answers
90k
views
How to Sync iPhone Core Data with web server, and then push to other devices? [closed]
I have been working on a method to sync core data stored in an iPhone application between multiple devices, such as an iPad or a Mac. There are not many (if any at all) sync frameworks for use with ...
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 ...
299
votes
10
answers
231k
views
How can we programmatically detect which iOS version is device running on? [duplicate]
I want to check if the user is running the app on iOS less than 5.0 and display a label in the app.
How do I detect which iOS is running on user's device programmatically?
Thanks!
294
votes
24
answers
182k
views
Creating a left-arrow button (like UINavigationBar's "back" style) on a UIToolbar
I'd love to create a "back" left-arrow-bezel button in a UIToolbar.
As far as I can tell, the only way to get one of these is to leave UINavigationController at default settings and it uses one for ...
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 ...
291
votes
21
answers
315k
views
How to add line break for UILabel?
Let see that I have a string look like this:
NSString *longStr = @"AAAAA\nBBBBB\nCCCCC";
How do I make it so that the UILabel display the message like this
AAAAA
BBBBB
CCCCC
I don't ...
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 ...
287
votes
35
answers
322k
views
Xcode 8 shows error that provisioning profile doesn't include signing certificate
Xcode 8 shows error that provisioning profile doesn't include signing certificate.
This issue is with Xcode-8 only with Xcode 7, same provisioning profile showing related identified certificate.
287
votes
6
answers
271k
views
String replacement in Objective-C
How to replace a character is a string in Objective-C?
286
votes
22
answers
211k
views
Where does the iPhone Simulator store its data?
I have a SQLite DB that I'm using to store app data, and I could do with taking a look inside it to debug a problem I'm having - but where does the iPhone Simulator store its data, typically?