iOS Programming

Subscribe to iOS Programming feed
A subreddit to share articles, code samples, open source projects and anything else related to iOS, watchOS or tvOS development. Swift or Objective-C.iOS Programming
Updated: 16 min 32 sec ago

I created a podcast with my friend, called CmdSwift. We would love to hear some feedback.

55 min 3 sec ago

Hi everyone,

With my friend we created a new podcast and we want to keep doing it. We are just starting out so it isn't a very professional podcast yet.

We talk about iOS development, topics related to it and general technology. In the first episode we talk about ourseves and one of our projects just as and introduction. The episode is 20 minutes long.

We appreciate any constructive feedback.

Here are the links if you are interested:

YouTube link

Apple podcast link

Overcast link

submitted by /u/reddioment
[link] [comments]

[Hep] Is Hexadecimal Required for IOS Exploitation & Reverse Engineering?

3 hours 18 min ago

Would i require to learn the purpose and foundation of hexadecimal in order to successfully exploit IOS and reverse engineer the kernel? Thanks.

submitted by /u/PhantomBP
[link] [comments]

How to start

6 hours 5 min ago

Hey guys In my we had a guy who developed our iOS App, but about a month ago he quit and now nobody knows how to work with XCode or how to use Objective C (the App is programmed in Objective C) My boss told me I should take care of the app and fix all the bugs and stuff, but I never worked with XCode or Objective C. I searched for some tutorials and made some little examples, to learn how Xcode works, but all I found was very beginner stuff.

The App is an very big Master Detail App, which Connects to our Database to get Data (obviously).

Now my question is, where should I start to decrypt these lines of Code and where to look for some advanced tutorials.

submitted by /u/Dr_0etker
[link] [comments]

How can you detect if the user has already subscribed to a product when implementing IAP with StoreKit

7 hours 46 min ago

I’m asking for some guidance. I have implemented IAP in an app we are building at work. I would like to ask how I can know if user has already subscribed. I did some research and states that I would need to do a receipt validation by setting up a server of my own. I don’t have any backend experience. Is there an easier way one would recommend.

submitted by /u/ryhan112
[link] [comments]

Help!! I get fatal error whenever I try to obtain the user location

8 hours 11 min ago

This is my code. The error happens at this line: mapView.showsUserLocation = true

Please Help.


// MainVC.swift

// aidkit


// Created by Roberto Guarneros on 1/15/19.

// Copyright © 2019 Roberto Guarneros. All rights reserved.


import UIKit

import MapKit

import CoreLocation

class MainVC: UIViewController, MKMapViewDelegate {

@IBOutlet var helpLabel: UILabel!

@IBOutlet weak var mapView: MKMapView!

let locationManager = CLLocationManager()

let regionInMeters: Double = 10000

override func viewDidLoad() {



NotificationCenter.default.addObserver(self, selector: #selector(showFirstAidKit), name: NSNotification.Name("ShowFirstAidKit"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showCPR), name: NSNotification.Name("ShowCPR"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showBleeding), name: NSNotification.Name("ShowBleeding"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showChoking), name: NSNotification.Name("ShowChoking"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showSeizures), name: NSNotification.Name("ShowSeizures"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showSprains), name: NSNotification.Name("ShowSprains"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showBurns), name: NSNotification.Name("ShowBurns"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showFractures), name: NSNotification.Name("ShowFractures"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showMap), name: NSNotification.Name("ShowMap"), object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(showHelp), name: NSNotification.Name("ShowHelp"), object: nil)


func setUpLocationManger() {

locationManager.delegate = self

locationManager.desiredAccuracy = kCLLocationAccuracyBest


func centerViewOnUserLocation(){

if let location = locationManager.location?.coordinate{

let region = MKCoordinateRegion.init(center: location, latitudinalMeters: regionInMeters, longitudinalMeters: regionInMeters)

mapView.setRegion(region, animated: true)



func checkLocationServices(){

if CLLocationManager.locationServicesEnabled(){



}else {

//show alert



func checkLocationAuthorization(){

switch CLLocationManager.authorizationStatus(){

case .authorizedWhenInUse:

mapView.showsUserLocation = true




case . denied:


case .notDetermined:



case .restricted:


case .authorizedAlways:




@objc func showFirstAidKit(){

performSegue(withIdentifier: "ShowFirstAidKit", sender: nil)


@objc func showCPR(){

performSegue(withIdentifier: "ShowCPR", sender: nil)


@objc func showBleeding(){

performSegue(withIdentifier: "ShowBleeding", sender: nil)


@objc func showChoking(){

performSegue(withIdentifier: "ShowChoking", sender: nil)


@objc func showSeizures(){

performSegue(withIdentifier: "ShowSeizures", sender: nil)


@objc func showSprains(){

performSegue(withIdentifier: "ShowSprains", sender: nil)


@objc func showBurns(){

performSegue(withIdentifier: "ShowBurns", sender: nil)


@objc func showFractures(){

performSegue(withIdentifier: "ShowFractures", sender: nil)


@objc func showHelp(){

performSegue(withIdentifier: "ShowHelp", sender: nil)


@objc func showMap(){

performSegue(withIdentifier: "ShowMap", sender: nil)


@IBAction func onMoreTapped() {

print ("Toggle Side Menu") NSNotification.Name("ToggleSideMenu"), object: nil)


@IBAction func helpButton(_ sender: Any) {

if helpLabel.isHidden {

helpLabel.isHidden = false

} else {

helpLabel.isHidden = true



@IBAction func linkButton1(_ sender: Any) { "")! as URL, options: [:], completionHandler: nil)


@IBAction func linkButton2(_ sender: Any) { "")! as URL, options: [:], completionHandler: nil)


@IBAction func linkButton3(_ sender: Any) { "")! as URL, options:[:], completionHandler: nil)


@IBAction func linkButton4(_ sender: Any) { "")! as URL, options: [:], completionHandler: nil)


@IBAction func linkButton5(_ sender: Any) { "")! as URL, options: [:], completionHandler: nil)


@IBAction func linkButton6(_ sender: Any) { "")! as URL, options: [:], completionHandler: nil)


@IBAction func linkButton7(_ sender: Any) { "")! as URL, options: [:], completionHandler: nil)



extension MainVC: CLLocationManagerDelegate {

func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

guard let location = locations.last else { return }

let region = MKCoordinateRegion.init(center: location.coordinate, latitudinalMeters: regionInMeters, longitudinalMeters: regionInMeters)

mapView.setRegion(region,animated : true)


func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {




submitted by /u/robertguarneros
[link] [comments]

Searching for iOS 12 cookbook

Thu, 01/17/2019 - 23:58

A couple of years ago I had bookmarked a website, which was basically a collection of snippets for things like reading contacts from the address book, creating calendar events, taking a picture and so forth. It was a huge help because it saved me hours of googling how to achieve specific things. I’m wondering if there is something similar for iOS 12?

submitted by /u/linusan
[link] [comments]

Warping an image without OpenGL

Thu, 01/17/2019 - 23:28

Is it possible to warp an image with touch on uiImage, kinda like photoshop and facetune without having to learn OpenGL ? I find OpenGL very complicated

submitted by /u/ewelumokeke
[link] [comments]

My app is rejected for 11 days and every time with a different reason.

Thu, 01/17/2019 - 18:13

Sorry for the long rant. I am just tired of Apple review team’s hypocrisy. I am dealing with them for 11 days. Still they aren’t happy. I changed my app to subscription model. Since I knew that many people were rejected for subscription, I studied what other apps were doing and tried to copy their purchase screen. Here it goes.

  • I copied Overcast’s App info for Privacy. Since it’s developer said it can be used freely.

Result: Rejected.

Reason:No “Terms of Use” in app info on AppStore Connect.

  • Subscription terms are added to same web site.

Result: Rejected.

Reason: Terms of use must be in separate web site and must be titled as “Terms of Use” you can’t use subscription terms. I said those 5 top subscription apps from AppStore don’t have “Terms of Use”, they said “you may not agree with the feedback we provided”

  • I separated Terms of Use and Privacy and send again.

Result: Rejected

Reason: We were unable to find all of the required information within your app. Please note that adding the following information to a modal alert is not sufficient; the information must also be displayed within the app itself, and it must be displayed clearly and conspicuously during the purchase flow without requiring additional action from the user (such as opening a link).

They say that having a button which opens “Subscription Terms” inside the app(not link to any website) is considered as hiding the information. However usual “Payment will be charged to your iTunes account at confirmation of purchase. The subscription will automatically renew every year unless auto-renew is turned off at least 24 hours before the end of the current period…..” was not hidden at all. Still no go.

  • I put all subscription terms inside the app without using any buttons what so ever. Now purchase screen is 2-3 pages.

Result: Rejected.

Reason: We noticed that your app requires users to register with personal information to purchase non account-based in-app purchase products, which does not comply with the App Store Review Guidelines.

You can use the app without creating an account. However registered users need to have an account for certain futures but I can’t make them understand. I removed the feature.

Now 11 days passed. I really don’t know what will be the next reason for my rejection. I do know that some apps may get away with some rules. I just hate the hypocrisy. If you apply the rules, please at least be consistent with your most used apps. Instead of telling me all those reasons for rejections at once, they do it one at a time and it is really depressing. I am sorry for a long rant and my English because I am not a native speaker.

submitted by /u/Lapter
[link] [comments]

My first app: StockPapers

Thu, 01/17/2019 - 18:10

Hi guys 👋

I’ve just released my first app, please let me know what do you think about

It uses the Unsplash API to get the photos, nothing too special yeah, but I’ve learned a lot from it 💪

> I want to know if you have any recommendations (I know about some bugs, like the animated view on startup on non X/Xs devices)

Just let me know what do you think about it 😃

Download on App Store


submitted by /u/rawnly
[link] [comments]

In WatchKit, how do you pass data from a modal back to the interface controller that presented it?

Thu, 01/17/2019 - 15:46

For example, in the watchOS Activity app the user can change the calorie goal in a modal interface controller (menu item selected with Force Touch) which then reflects the change in the root interface controller.

submitted by /u/refine_and_refine
[link] [comments]

How to show a progress bar for a WKWebView in a collection cell?

Thu, 01/17/2019 - 12:16

So I have a collection view with collection cells taking up the entire screen and I would like to show a progress bar for the webview loading whenever and have it start over whenever the next cell is scrolled to, similar to SumbleUpon. Im struggling to figure out how to do this. I tried loading the progress bar in the cellForRow but it didnt work, I attemped to load it in willDisplayCell but it didnt work

submitted by /u/p511
[link] [comments]

Do you know any better logging method instead of Xcode Console?

Thu, 01/17/2019 - 09:06

I really depend on logging sometimes, and many of my code runs at once producing lots of output. I like to use CocoaLumberjack, and format output to contain the essential infos too (class names, line numbers). Really liked Xcode-Colors plugin, which allowed me to instantly find and deal with the important parts of my log, but it's no longer working with Xcode 10's rewritten console. :(

Do you know any solution which gives me (any of) the following:

- Filterable logs via log level

- Colors based on log levels

- Foldable lists. For example network traffic folded by default but free to explore if you need it

- Easy JSON/Object browsing from logs

I'm desperately looking for these since years. :(

submitted by /u/gruberkristof
[link] [comments]

Image Carousel/Slideshow?

Thu, 01/17/2019 - 02:14

Hi everyone, I'm pretty new to iOS programming and everything. I was trying out this tutorial I found on Medium, and was wondering if it's possible for me to do a smaller version of this - maybe about 1/4 of a screen size?

I've tried to scale it down - it kinda works, but it scrolls vertically too. I've also tried to disable the vertical scrolling but to no avail. :-(

Any help would be amazing and really, really appreciated!

Thank you in advance! :-)

submitted by /u/mintdoll
[link] [comments]