Skip to main content

User defined settings iOS

With User defined settings we can set values specific to build configuration.

Creating User Defined Settings

  1. Select Target > Build Settings
  2. Click Plus icon, present beside the search bar



Using User Defined Settings

when we need to access the values set in User defined build settings we can do it in two ways 
  1. From info.plist

    $(NEW_SETTING)
  2. From Code

    let value = Bundle.main.infoDictionary?["NEW_SETTING"] as! String

Comments

Popular posts from this blog

Cloning repositories using SSH

Using the Secure Shell (SSH) protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to Version Control Account (BitBucket/GitHub..) accounts without supplying your username or password at each visit.  We need to generate SSH key pair, Add the private key to ssh agent and public key to Version control account. 1. Generating SSH key pair Open  Terminal  and paste the text below, substituting in your email address or some unique key like employee Id. ssh-keygen -t rsa -b 4096 -C " your_email@example.com " This creates a new ssh key, using the provided email as a label. This generates public/private rsa key pair. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location. 2.   Adding your SSH key to the ssh-agent Start the ssh-agent in the background. eval "$(ssh-agent -s)" If you're using macOS Sierra 10.12.2 or l...

Advanced Debugging with Xcode and LLDB - WWDC 2018

Advanced Debugging Tips and Tricks: Injecting Code at runtime We can change values of variables at runtime while debugging (here variable_name is a Bool) expression variable_name = false  Here we are injecting value at runtime, so no need to run again to see the effect. (Other eg.,  expression animator.delegate = self) Under Xcode > Preferences > Behaviours > Running > Pauses > Check Show Tab Named, In order to show new tab while a breakpoint is hit. We can set other behaviours as well. We can add symbolic breakpoints on methods in frameworks. like This is in objective c because UIKit is in objective c. In order to find the values/parameter of a function inside framework, we can use For expression -[UILabel setText:] po $arg1 <UILabel ****> po (SEL)$arg2   "setText:" po $arg3 "0 ft" We can set symbolic breakpoints in 2 ways 1. By clicking plus in bottom left and choosing symbolic (Cons: Sets BP in all places) 2. By adding a breakpoi...