Skip to content

Instantly share code, notes, and snippets.

@sdpjswl
sdpjswl / Xcode paths
Created September 29, 2019 15:03
For color themes and code snippets
Color themes: ~/Library/Developer/Xcode/UserData/FontAndColorThemes
Code Snippets: ~/Library/Developer/Xcode/UserData/CodeSnippets
Source: https://stackoverflow.com/questions/10172336/how-can-i-install-themes-on-xcode-4-3-2
@sdpjswl
sdpjswl / Commands
Created April 18, 2019 12:20
Look inside static libraries, frameworks and binaries
otool -L <path>
nm -u <path>
strings <path>
@sdpjswl
sdpjswl / compile_framework.txt
Last active December 14, 2018 13:05
How to compile a framework
1. In the framework target's build settings, set "Skip Install" to NO
2. Select the framework and archive it
3. Export the archive's "Built Products" to obtain the framework
Link: https://stackoverflow.com/questions/33580528/xcode-7-1-swift-framework-app-builds-but-not-archiving/33581287
--
@sdpjswl
sdpjswl / gist:bee9de2d7b6820956be9100fcc3cd4cb
Created September 18, 2018 06:29
Navigation stack modification
You can edit the order of view controllers anytime using:
- (void)setViewControllers:(NSArray<UIViewController *> *)viewControllers animated:(BOOL)animated;
@sdpjswl
sdpjswl / Increment build no.
Created May 13, 2017 00:33
Increments project build number on every build
http://elliotchance.postach.io/post/incrementing-the-xcode-build-number
http://crunchybagel.com/auto-incrementing-build-numbers-in-xcode/
@sdpjswl
sdpjswl / Nice stuff
Last active November 5, 2018 04:42
A few useful links
// set evenly spaced views using autolayout
http://stackoverflow.com/a/30249550
// change app icon at runtime
https://www.raywenderlich.com/105641/change-app-icon-build-time
// handle local and server builds using targets
http://www.appcoda.com/using-xcode-targets/
// hide back button text
@sdpjswl
sdpjswl / Navigation bar appearance
Last active July 29, 2016 06:24
Set default navigation bar and back button for app
// hide back button text
// fixes navigation title position
http://stackoverflow.com/questions/23853617/uinavigationbar-hide-back-button-text
- (void)setupNavigationBar
{
[UINavigationBar appearance].barStyle = UIBarStyleDefault;
[UINavigationBar appearance].barTintColor = [UIColor blueColor];
[UINavigationBar appearance].translucent = NO;
@sdpjswl
sdpjswl / WebRTC
Created June 6, 2016 03:56
Resources to study WebRTC
- https://webrtc.org/architecture
- http://webrtc-security.github.io
- https://github.com/ISBX/apprtc-ios
@sdpjswl
sdpjswl / Cleanup repos
Created June 6, 2016 00:42
Reduce size of large repositories
BFG Repo Cleaner:
https://rtyley.github.io/bfg-repo-cleaner
@sdpjswl
sdpjswl / disable_bitcode.rb
Created May 24, 2016 02:36
Disable bitcode in Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end