# Keep the problem. Keep the thinking.

Language: en
Canonical: [Keep the problem. Keep the thinking.](<https://allluckly.cn/en/journal/>)
中文：[中文 HTML](<https://allluckly.cn/journal/>)
English: [English HTML](<https://allluckly.cn/en/journal/>)

DEVELOPMENT NOTES · 2015–2017

128 historical notes, organised by topic from interface animation to audio and video. Original publication dates, article addresses and code are retained so you can follow an idea through the archive.

These articles describe the development environments of their time. Examples have not been rerun for this archive update. Each article includes its own authorship, source and version context.

## Choose a topic

[01 48 articles

### UIKit & graphics

Layout, lists, gestures, rich text, UIView, Core Animation and drawing.

Explore topic](<https://allluckly.cn/en/journal/topics/uikit-graphics/>)[02 15 articles

### Swift & runtime

Swift language notes, Objective-C messaging, KVO, blocks and code organisation.

Explore topic](<https://allluckly.cn/en/journal/topics/swift-runtime/>)[03 7 articles

### Concurrency & performance

Threads, RunLoop, keeping a thread alive, UI stalls and performance investigation.

Explore topic](<https://allluckly.cn/en/journal/topics/concurrency-performance/>)[04 24 articles

### Data & networking

Core Data, caching, network requests, messaging, notifications and system services.

Explore topic](<https://allluckly.cn/en/journal/topics/data-network/>)[05 20 articles

### Tools & releases

CocoaPods, Git, static libraries, Xcode, testing, compatibility and release notes.

Explore topic](<https://allluckly.cn/en/journal/topics/tooling-release/>)[06 5 articles

### Audio & video development

Building FFmpeg, H.264 decoding, capture, streaming and player integration.

Explore topic](<https://allluckly.cn/en/journal/topics/audio-video/>)[07 9 articles

### Web & development notes

WebView, JavaScript bridges, mini programs, blog maintenance and development reflections.

Explore topic](<https://allluckly.cn/en/journal/topics/web-notes/>)

## All articles

128 articles · grouped by topic

### UIKit & graphics

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/uikit-graphics/>)

- 2016-11-14 

  #### [Custom iOS Transitions with a Two-Line API](<https://allluckly.cn/en/journal/2016-11-14-custom-ios-transitions-with-a-two-line-api/>)

   

  Introduces WTKTransitionAnimate, selecting transitions through a navigation delegate and factory methods. It combines drag gestures with percentage-based progress to implement an interactive back transition and explains the organization behind the wrapper.

   

  逆流丶而上 WTKTransitionAnimate · navigation transitions · interactive animation
- 2016-10-09 

  #### [Practical UITextField Input Rules and Keyboard Handling](<https://allluckly.cn/en/journal/2016-10-09-practical-uitextfield-input-rules-and-keyboard-handling/>)

   

  Addresses text length, numeric and currency input, Chinese input composition, and keyboard overlap. Categories and runtime features organize extensible input rules, while keyboard notifications are used to adjust the interface position.

   

  Sindri UITextField · input validation · Chinese text input
- 2016-09-20 

  #### [Animating iOS Buttons with Core Animation](<https://allluckly.cn/en/journal/2016-09-20-animating-ios-buttons-with-core-animation/>)

   

  Builds on Core Animation fundamentals to animate button gradients and shapes with CALayer, CABasicAnimation, and animation groups. It explains layer properties, timing, and the organization of cooperating animations.

   

  Sindri Core Animation · CABasicAnimation · CAAnimationGroup
- 2016-09-09 

  #### [Recreating the Profile Avatar Wave Animation in Baidu Waimai](<https://allluckly.cn/en/journal/2016-09-09-recreating-the-profile-avatar-wave-animation-in-baidu-waimai/>)

   

  Breaks down the waves around a profile avatar: CADisplayLink drives updates, trigonometric functions generate the curves, and CAShapeLayer draws them. It explains the components needed for a continuous wave animation.

   

  乔同X CADisplayLink · CAShapeLayer · wave animation
- 2016-07-12 

  #### [iOS game development with UIKit: Hardest](<https://allluckly.cn/en/journal/2016-07-12-ios-game-development-with-uikit-hardest/>)

   

  Introduces the structure of the Hardest mini-game built with Objective-C and UIKit, including level selection, game state, score calculation, sound effects and saved data. It also distinguishes this exercise from work better suited to a dedicated game engine.

   

  维尼的小熊 UIKit · mini-games · level management
- 2016-07-04 

  #### [Breaking Down a Complex iOS Animation: Objective-C and Swift](<https://allluckly.cn/en/journal/2016-07-04-breaking-down-a-complex-ios-animation-objective-c-and-swift/>)

   

  Breaks a welcome-screen animation into circular scaling, elliptical compression, edge bulges, rotation, and a wave fill. The article sequences layer and path changes to show how a visual effect can be translated into implementable animation steps.

   

  HenryCheng CAShapeLayer · path animation · keyframe animation
- 2016-06-19 

  #### [An introduction to Core Animation on iOS](<https://allluckly.cn/en/journal/2016-06-19-an-introduction-to-core-animation-on-ios/>)

   

  Introduces Core Animation through CALayer, CAAnimation and CAAction, explaining the relationship between layers and animation objects, timing control and action lookup. Examples distinguish the organisation of implicit and explicit animations.

   

  Sindri Core Animation · CALayer · CAAnimation
- 2016-06-12 

  #### [Adding a launch advertisement to an iOS app](<https://allluckly.cn/en/journal/2016-06-12-adding-a-launch-advertisement-to-an-ios-app/>)

   

  Wraps a launch-ad view with full-screen and bottom-logo layouts. SDWebImage fetches the ad image, while opacity animation and block callbacks handle presentation, taps and dismissal.

   

  Bison LBLaunchImageAd · splash ads · SDWebImage
- 2016-05-12 

  #### [iOS animation: a fragment-based reveal](<https://allluckly.cn/en/journal/2016-05-12-ios-animation-a-fragment-based-reveal/>)

   

  Explains how UIView's maskView affects which content is visible, then divides the mask into regions and animates them separately. These steps build a fragmented reveal and an image-carousel transition.

   

  Sindri maskView · fragment animation · UIView
- 2016-04-29 

  #### [Rich text with hyperlinks on iOS](<https://allluckly.cn/en/journal/2016-04-29-rich-text-with-hyperlinks-on-ios/>)

   

  Draws attributed strings with Core Text, inserts images into reserved text positions and adds hyperlink interaction, then compares the approach with TextKit. The examples connect the basic steps needed for chat emoji and mixed text-and-image layout.

   

  Sindri Core Text · NSAttributedString · mixed text and images
- 2016-04-15 

  #### [Building a Pomodoro timer app for iOS](<https://allluckly.cn/en/journal/2016-04-15-building-a-pomodoro-timer-app-for-ios/>)

   

  Connects timers, notification reminders, music playback and a Today Widget in a Pomodoro app. It identifies implementation entry points for card layouts, transitions, xib files and URL Schemes, helping readers follow how the features fit together in the project.

   

  威權在B612等着那阵温柔的风 Pomodoro timer · NSTimer · Today Widget
- 2016-03-23 

  #### [iOS animation: a closer look at layout animation](<https://allluckly.cn/en/journal/2016-03-23-ios-animation-a-closer-look-at-layout-animation/>)

   

  Uses an expanding account list and a shrinking button on a login page to demonstrate animating top, height and horizontal-margin constraints. It examines how the view hierarchy and constraint changes work together to produce a continuous transition.

   

  Sindri Auto Layout · layoutIfNeeded · login animation
- 2016-03-17 

  #### [A circular expanding transition in Swift, inspired by Gewara](<https://allluckly.cn/en/journal/2016-03-17-a-circular-expanding-transition-in-swift-inspired-by-gewara/>)

   

  Moves from an ordinary navigation push to an expanding circular transition, using a CALayer mask to control the revealed area. Gesture-driven animation extends the example, which is explained in Swift with an Objective-C implementation for comparison.

   

  HenryCheng custom transitions · CALayer mask · Swift
- 2016-03-15 

  #### [Building a WeChat-style iOS app, part 7](<https://allluckly.cn/en/journal/2016-03-15-building-a-wechat-style-ios-app-part-7/>)

   

  Breaks down the chat input bar and message cells, using blocks to send submission and visibility events to the controller. Message ownership determines avatars and stretchable bubble backgrounds, while model-side sizing accommodates messages of different lengths.

   

  WzxJiang chat interface · UITableViewCell · bubble layout
- 2016-03-04 

  #### [Core Graphics for Swift developers: an in-depth introduction](<https://allluckly.cn/en/journal/2016-03-04-core-graphics-for-swift-developers-an-in-depth-introduction/>)

   

  Starts with obtaining a drawing context and constructing paths, then draws rectangles, circles, curves, text and images in Swift. Further examples cover linear and radial gradients, blend modes, coordinate transforms, and bitmap and PDF output.

   

  大石头布 Core Graphics · Quartz 2D · Bézier curves
- 2016-02-28 

  #### [A first look at Auto Layout animation on iOS](<https://allluckly.cn/en/journal/2016-02-28-a-first-look-at-auto-layout-animation-on-ios/>)

   

  Introduces constraints through text layouts in portrait and landscape, then breaks down an interface that animates as a list scrolls. Changing constraint values controls element positions and sizes, demonstrating the basics of combining Auto Layout with animation.

   

  SindriLin Auto Layout · NSLayoutConstraint · constraint animation
- 2016-02-22 

  #### [GitHub source-code picks, February 22: SmallDay and LoveFreshBeen in Swift 2.0](<https://allluckly.cn/en/journal/2016-02-22-github-source-code-picks-february-22-smallday-and-lovefreshbeen-in-swift-2-0/>)

   

  Selects two Swift 2.0 recreation projects, SmallDay and LoveFreshBeen. Repository links and an introduction to their author let readers inspect complete projects to study screen organisation and UI implementation.

   

  Bison Swift 2.0 · SmallDay · LoveFreshBeen
- 2016-02-17 

  #### [A custom pull-to-refresh control in Swift](<https://allluckly.cn/en/journal/2016-02-17-a-custom-pull-to-refresh-control-in-swift/>)

   

  Creates a text view in a xib file to cover UIRefreshControl's default appearance, then rotates, recolours and scales the letters in stages. Simulated loading and row insertion connect the beginning and end of the custom refresh workflow.

   

  威權在B612等着那阵温柔的风 Swift · UIRefreshControl · xib
- 2016-02-15 

  #### [Custom iOS view-controller transitions in practice](<https://allluckly.cn/en/journal/2016-02-15-custom-ios-view-controller-transitions-in-practice/>)

   

  Distinguishes the roles of from, to and presenting controllers, then implements custom modal and navigation transitions. Interactive animations and the transition coordinator extend the examples and explain how to organise reusable animation logic.

   

  bestswifter UIViewController transitions · interactive animation · UINavigationController
- 2016-02-15 

  #### [iOS animation: transforms and keyframes](<https://allluckly.cn/en/journal/2016-02-15-ios-animation-transforms-and-keyframes/>)

   

  Uses changing seasonal text and falling leaves to explain affine transforms and keyframe animation. Scaling, translation and rotation are combined step by step, showing how transform parameters and animation stages affect the resulting motion.

   

  SindriLin CGAffineTransform · keyframe animation · UIView
- 2016-02-05 

  #### [Core Text layout in Swift 2.0, continued](<https://allluckly.cn/en/journal/2016-02-05-core-text-layout-in-swift-2-0-continued/>)

   

  Builds on basic Core Text layout by examining baselines, ascenders, descenders and other font metrics. Drawing line by line gives Chinese text and emoji consistent line heights, before extending the rich-text interaction to links and mentions.

   

  大石头布 Core Text · CTLineDraw · font metrics
- 2016-02-01 

  #### [Building a WeChat-style iOS app, part 3](<https://allluckly.cn/en/journal/2016-02-01-building-a-wechat-style-ios-app-part-3/>)

   

  Continues the main interface by exposing constraints from xib files and adjusting their constant values for the screen. It also refines navigation-bar button positions and loads images with SDWebImage placeholders.

   

  WzxJiang Auto Layout · xib · UIBarButtonItem
- 2016-01-31 

  #### [Core Text layout in Swift 2.0: an in-depth introduction](<https://allluckly.cn/en/journal/2016-01-31-core-text-layout-in-swift-2-0-an-in-depth-introduction/>)

   

  Begins with attributed-text properties such as fonts, colours and ranges, then introduces Core Text's layout and drawing steps. Combining text and images illustrates the basic objects needed for more complex text interfaces.

   

  大石头布 Swift 2.0 · Core Text · NSAttributedString
- 2016-01-30 

  #### [Building a WeChat-style iOS app, part 2](<https://allluckly.cn/en/journal/2016-01-30-building-a-wechat-style-ios-app-part-2/>)

   

  Builds the Contacts, Discover and profile screens using grouped UITableViews and a custom personal-information cell. Sorting and grouping the contact data demonstrates the initial interface structure shared by several pages.

   

  WzxJiang UITableView · contacts · grouped lists
- 2016-01-29 

  #### [Building a WeChat-style iOS app, part 1](<https://allluckly.cn/en/journal/2016-01-29-building-a-wechat-style-ios-app-part-1/>)

   

  The opening instalment organises the project and its MVC folders, introduces shared view controllers, and creates the feature pages and UITabBarController. It establishes the common navigation structure that later screens will use.

   

  WzxJiang WeChat-style app · MVC · UITabBarController
- 2016-01-28 

  #### [Moving cell images as a table view scrolls](<https://allluckly.cn/en/journal/2016-01-28-moving-cell-images-as-a-table-view-scrolls/>)

   

  Adjusts an image's position using the offset between the cell's centre and its parent view's centre, creating parallax during UITableView scrolling. It records the custom cell and visible-item updates, with adapted code and a link to the original project.

   

  WzxJiang UITableView · parallax · cell reuse
- 2016-01-22 

  #### [iOS animation: starting with UIView animations](<https://allluckly.cn/en/journal/2016-01-22-ios-animation-starting-with-uiview-animations/>)

   

  Uses a login screen's arriving text fields and appearing button to introduce animatable UIView properties, duration and options. Adding spring animations shows how position, opacity and transforms can be combined into a continuous sequence.

   

  SindriLin UIView animation · animatable properties · spring animation
- 2016-01-22 

  #### [Understanding parallax animation in iOS](<https://allluckly.cn/en/journal/2016-01-22-understanding-parallax-animation-in-ios/>)

   

  Explains parallax through the positions of several view layers. Dragging the middle layer, compensating for the text layer's offset and clipping overflow keeps the text stationary relative to the bottom layer, showing how occlusion and movement combine.

   

  WzxJiang parallax animation · clipsToBounds · view hierarchy
- 2016-01-19 

  #### [A League of Legends skin-selection animation with UICollectionViewFlowLayout](<https://allluckly.cn/en/journal/2016-01-19-a-league-of-legends-skin-selection-animation-with-uicollectionviewflowlayout/>)

   

  Builds a character-skin selection effect with a custom UICollectionViewFlowLayout. It adjusts layout attributes and the final scroll position, then integrates the layout subclass into the collection view to keep the selected card centred.

   

  WzxJiang UICollectionViewFlowLayout · card layouts · scroll positioning
- 2016-01-17 

  #### [Recreating pop-up effects from Jianshu and Taobao on iOS](<https://allluckly.cn/en/journal/2016-01-17-recreating-pop-up-effects-from-jianshu-and-taobao-on-ios/>)

   

  Separates the effect into content, a dimming overlay and the presented view. Two-stage layer transforms and dismissal animation make the background appear to recede, while the article explains the stacking order when adding views to a window.

   

  WzxJiang pop-up views · CATransform3D · overlays
- 2016-01-14 

  #### [Recreating an animation from the National Geographic iOS app](<https://allluckly.cn/en/journal/2016-01-14-recreating-an-animation-from-the-national-geographic-ios-app/>)

   

  Breaks down a National Geographic-inspired pop-up page animation into status-bar hiding, view dragging and spring-back, navigation-bar coordination and back-button colour changes. The implementation follows how several interface layers move together.

   

  WzxJiang UIView animation · drag gestures · navigation bar
- 2016-01-13 

  #### [Building a custom pop-up view with HWPopTool](<https://allluckly.cn/en/journal/2016-01-13-building-a-custom-pop-up-view-with-hwpoptool/>)

   

  Introduces HWPopTool integration and its controls for the content view, background overlay and close button. It also explains how to handle closing after the component changed its callback mechanism from a delegate to a block.

   

  HenryCheng HWPopTool · pop-up views · overlays
- 2016-01-13 

  #### [Event delivery and the responder chain in iOS](<https://allluckly.cn/en/journal/2016-01-13-event-delivery-and-the-responder-chain-in-ios/>)

   

  Uses UIResponder, UIEvent and UITouch to explain how touch events reach views. Custom views reveal the relationship between the responder chain and gestures, followed by discussion of how event-delivery behaviour can be used in an interface.

   

  SindriLin UIResponder · responder chain · UITouch
- 2016-01-04 

  #### [A Windows AliWangWang-style login screen with a paper-feed animation](<https://allluckly.cn/en/journal/2016-01-04-a-windows-aliwangwang-style-login-screen-with-a-paper-feed-animation/>)

   

  Recreates the printer-paper login animation from Windows AliWangWang. Keeping the view's horizontal position and width fixed while gradually adjusting its height creates the unfolding effect; the LBPrinterPaper project supplies the example.

   

  Bison UIView animation · frame · login screen
- 2015-12-07 

  #### [GitHub source-code picks, December 25: gesture unlock, a profile SDK and an image carousel](<https://allluckly.cn/en/journal/2015-12-07-github-source-code-picks-december-25-gesture-unlock-a-profile-sdk-and-an-image-carousel/>)

   

  Collects three open-source components for gesture unlocking, a profile page and an infinite image carousel. Download links and selected integration code help readers identify the component that matches an interface requirement.

   

  Bison PCGestureUnlock · LBPersonalPage · SDCycleScrollView
- 2015-11-23 

  #### [Mac development series: NSImageView](<https://allluckly.cn/en/journal/2015-11-23-mac-development-series-nsimageview/>)

   

  Demonstrates creating an NSImageView, assigning an image and adding it to a macOS interface. Enabling its backing layer and configuring corner radius and border then produces a circular avatar style.

   

  Bison macOS · NSImageView · NSImage
- 2015-10-24 

  #### [Integrating an endlessly flipping 3D banner in one minute](<https://allluckly.cn/en/journal/2015-10-24-integrating-an-endlessly-flipping-3d-banner-in-one-minute/>)

   

  Combines left and right swipe gestures with transition animations to cycle through banner images in 3D. It covers component import and tap delegation, while explicitly noting that the effect uses a private animation API and is retained as a technical experiment.

   

  Bison Banner · CATransition · gesture interaction
- 2015-10-19 

  #### [iOS 9 3D Touch quick actions, with a Swift update](<https://allluckly.cn/en/journal/2015-10-19-ios-9-3d-touch-quick-actions-with-a-swift-update/>)

   

  Explains iOS 9 Home Screen quick actions: defining icons, titles and types in Info.plist, then dispatching selections through AppDelegate. Both Objective-C and Swift implementations illustrate the configuration and callback flow.

   

  Bison 3D Touch · UIApplicationShortcutItem · AppDelegate
- 2015-09-19 

  #### [Building a UICollectionView programmatically in Swift](<https://allluckly.cn/en/journal/2015-09-19-building-a-uicollectionview-programmatically-in-swift/>)

   

  Starts with data-source and delegate setup, then builds UICollectionView cells, loads network data and adds reusable headers. These steps bring together the structure of a collection-view interface implemented entirely in Swift code.

   

  Bison UICollectionView · Swift · Alamofire
- 2015-09-07 

  #### [A Swift profile page with a simple integration](<https://allluckly.cn/en/journal/2015-09-07-a-swift-profile-page-with-a-simple-integration/>)

   

  Shows how to integrate the Swift version of a profile-page component. Importing LBSwift\_PersonalPage and inheriting from its controller reuses the interface, while the example code demonstrates the relationship between the wrapper and its callers.

   

  Bison Swift · LBSwift\_PersonalPage · profile screen
- 2015-08-31 

  #### [An iOS profile page in one minute](<https://allluckly.cn/en/journal/2015-08-31-an-ios-profile-page-in-one-minute/>)

   

  Introduces integration of the LBPersonalPage\_VC profile-page component. Importing its files, inheriting from the base controller and adding configuration lets a project reuse the page's visual behaviour; the example project provides the implementation details.

   

  Bison LBPersonalPage · profile screen · UITableView
- 2015-08-25 

  #### [Exploring Swift: building a tab bar entirely in code](<https://allluckly.cn/en/journal/2015-08-25-exploring-swift-building-a-tab-bar-entirely-in-code/>)

   

  Builds a Zhe800-inspired tab bar using early Swift syntax. It creates child view controllers, assigns titles and icons, and adds them to the system tab bar, illustrating how to organise a navigation structure programmatically.

   

  Bison Swift · UITabBarController · child view controllers
- 2015-08-17 

  #### [Disabling the system swipe-back gesture on iOS](<https://allluckly.cn/en/journal/2015-08-17-disabling-the-system-swipe-back-gesture-on-ios/>)

   

  Addresses an embedded game unexpectedly revealing navigation and tab bars during a swipe. The article shows where to control the navigation controller's built-in back gesture and records how that interaction was disabled for a particular screen.

   

  Bison UINavigationController · back gesture · interactivePopGestureRecognizer
- 2015-07-29 

  #### [Animating a view around another view on iOS](<https://allluckly.cn/en/journal/2015-07-29-animating-a-view-around-another-view-on-ios/>)

   

  Explains how to move a view around the centre of an image. Trigonometric functions calculate points on a circle, and updating the view coordinates produces an orbiting animation without a complex animation framework.

   

  Bison UIView · circular motion · trigonometry
- 2015-07-15 

  #### [Creating long-form Weibo images in an iOS app](<https://allluckly.cn/en/journal/2015-07-15-creating-long-form-weibo-images-in-an-ios-app/>)

   

  Turns a long passage of text into an image for a long-form Weibo post. The code works through text width, font size, required height and image drawing, demonstrating an early UIKit approach to generating a tall image at a fixed width.

   

  Bison tall images · text drawing · UIKit
- 2015-06-21 

  #### [Google Maps on iOS: markers and route playback](<https://allluckly.cn/en/journal/2015-06-21-google-maps-on-ios-markers-and-route-playback/>)

   

  Records a Google Maps integration intended to make map presentation consistent across iOS and Android. It includes the main code for map initialisation, markers and route lines, along with the setup entry point for obtaining a maps API key.

   

  Bison Google Maps · GMSMapView · map markers
- 2015-06-15 

  #### [A small iOS scrolling demo inspired by Zhe800](<https://allluckly.cn/en/journal/2015-06-15-a-small-ios-scrolling-demo-inspired-by-zhe800/>)

   

  Uses a Zhe800-style scrolling interaction to demonstrate recording contentOffset when dragging begins and comparing offsets in scroll callbacks to determine direction. An example project shows how the interface elements respond together.

   

  UIScrollView · contentOffset · scroll direction
- 2015-05-17 

  #### [Calculating label heights automatically in a table view](<https://allluckly.cn/en/journal/2015-05-17-calculating-label-heights-automatically-in-a-table-view/>)

   

  Calculates the height a label needs from its font, constrained width and measured text, then adds spacing in the UITableView row-height callback. The code illustrates manual sizing of multiline labels and table-view cells.

   

  UITableView · UILabel · text measurement

### Swift & runtime

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/swift-runtime/>)

- 2016-11-07 

  #### [Bitwise Operations in iOS](<https://allluckly.cn/en/journal/2016-11-07-bitwise-operations-in-ios/>)

   

  Introduces bitwise AND, OR, XOR, and NOT, using packed RGBA colors and state flags as examples. It then explains how enumerations and masks can store and query several states together.

   

  Sindri bitwise operations · bit masks · RGBA
- 2016-10-27 

  #### [Balancing Code Responsibilities in iOS](<https://allluckly.cn/en/journal/2016-10-27-balancing-code-responsibilities-in-ios/>)

   

  Uses an example project to examine oversized MVC controllers and the responsibilities of views, models, and controllers. It extracts repeated logic and reassigns functionality, emphasizing clear ownership of code before switching architecture labels.

   

  Sindri MVC · separation of responsibilities · refactoring
- 2016-10-13 

  #### [Swift 3.0 Design Patterns: Singleton](<https://allluckly.cn/en/journal/2016-10-13-swift-3-0-design-patterns-singleton/>)

   

  Introduces the uses and trade-offs of Swift singletons, creating shared instances with a static class constant or a global constant. It covers private initializers, access across modules, and the need to consider thread safety for shared mutable state.

   

  Sindri Swift 3.0 · singleton pattern · static let
- 2016-10-13 

  #### [Swift 3.0 Design Patterns: Flyweight](<https://allluckly.cn/en/journal/2016-10-13-swift-3-0-design-patterns-flyweight/>)

   

  Introduces the flyweight pattern through shared local-data managers. A dictionary reuses loaded data and tracks usage counts; unused data is saved and released. The example contrasts this lifecycle with a singleton that remains in memory.

   

  Sindri Swift 3.0 · flyweight pattern · object reuse
- 2016-09-01 

  #### [Protocols and Delegation in iOS](<https://allluckly.cn/en/journal/2016-09-01-protocols-and-delegation-in-ios/>)

   

  Uses UITableView and custom controls to distinguish protocols from delegation. It compares delegate and block callbacks, then discusses how data sources and protocol abstractions can reduce coupling between objects.

   

  Sindri protocol · delegate · block
- 2016-08-16 

  #### [Objective-C Runtime in Practice: Mapping Dictionaries to Models](<https://allluckly.cn/en/journal/2016-08-16-objective-c-runtime-in-practice-mapping-dictionaries-to-models/>)

   

  Moves from manual assignment, KVC, and third-party model libraries to an NSObject category that traverses runtime information and maps dictionaries to models. It also defines the example's support for two levels of nested data.

   

  Bison Objective-C Runtime · dictionary-to-model mapping · KVC
- 2016-07-28 

  #### [Decoupling iOS Views from Concrete Model Types](<https://allluckly.cn/en/journal/2016-07-28-decoupling-ios-views-from-concrete-model-types/>)

   

  Uses several types of ticket data with different fields but similar presentation needs to explore a dictionary-backed approach. A protocol exposes common display properties, reducing cells' and controllers' dependence on specific models and clarifying where data conversion belongs.

   

  Sindri protocols · model decoupling · MVC
- 2016-06-29 

  #### [Swift in practice: the template pattern](<https://allluckly.cn/en/journal/2016-06-29-swift-in-practice-the-template-pattern/>)

   

  Uses product data and calculations to examine code that depends on a tuple's structure. Types and protocols then organise reusable processing, showing how abstraction can reduce coupling between parameter formats and business methods.

   

  Sindri Swift · template pattern · protocols
- 2016-05-20 

  #### [Reading the Objective-C runtime source to understand messaging](<https://allluckly.cn/en/journal/2016-05-20-reading-the-objective-c-runtime-source-to-understand-messaging/>)

   

  Uses an unrecognized selector error to introduce Objective-C messaging, examining method lookup, caching and forwarding in the source. Runtime examples then explain how a method call is resolved during execution.

   

  Sindri Objective-C Runtime · message sending · method cache
- 2016-05-04 

  #### [Objective-C runtime in practice: changing fonts throughout an interface](<https://allluckly.cn/en/journal/2016-05-04-objective-c-runtime-in-practice-changing-fonts-throughout-an-interface/>)

   

  Starts with registering a custom font and finding its name, then uses Objective-C runtime techniques to replace interface fonts. It discusses the differences between controls created in code and those loaded from a storyboard when applying a common setting.

   

  HenryCheng Objective-C Runtime · custom fonts · UIFont
- 2016-04-06 

  #### [Understanding blocks in iOS development](<https://allluckly.cn/en/journal/2016-04-06-understanding-blocks-in-ios-development/>)

   

  Starts with block declarations and calls, then examines captured variables and callback wrappers. Examples modelled on Swift's higher-order functions demonstrate how blocks can be used to process data in Objective-C.

   

  Sindri block · variable capture · Objective-C
- 2016-03-01 

  #### [iOS refactoring notes: Extract Method](<https://allluckly.cn/en/journal/2016-03-01-ios-refactoring-notes-extract-method/>)

   

  Applies the Extract Method technique from Refactoring to split long stretches of code into functions organised by intent. Parameters, local variables and return values are handled step by step, with examples showing how to reduce repetition and improve readability.

   

  SindriLin refactoring · Extract Method · function extraction
- 2016-02-16 

  #### [Seven Swift pitfalls and how to avoid them](<https://allluckly.cn/en/journal/2016-02-16-seven-swift-pitfalls-and-how-to-avoid-them/>)

   

  Uses code examples to investigate surprising behaviour in protocol extensions, optional-chain assignment and functional processing. It compares dispatch for value and reference types and explains how code can compile successfully while producing an unexpected result.

   

  bestswifter Swift · protocol extensions · optional chaining
- 2016-01-16 

  #### [Inside KVO on iOS](<https://allluckly.cn/en/journal/2016-01-16-inside-kvo-on-ios/>)

   

  Starts with observing a list's scroll offset, then examines the dynamic subclass and isa-pointer changes caused by registering an observer. Runtime functions are used to attempt a similar mechanism, connecting practical KVO usage with its underlying behaviour.

   

  SindriLin KVO · isa · dynamic subclasses
- 2016-01-10 

  #### [Objective-C runtime fundamentals: properties and instance variables](<https://allluckly.cn/en/journal/2016-01-10-objective-c-runtime-fundamentals-properties-and-instance-variables/>)

   

  Distinguishes Objective-C properties from instance variables, examining runtime structures, memory offsets and synthesize to explain how properties are generated. Examples then show why dynamically inspecting and manipulating an object's structure can be useful.

   

  SindriLin Objective-C Runtime · property · ivar

### Concurrency & performance

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/concurrency-performance/>)

- 2017-03-27 

  #### [Detecting iOS Main-Thread Stalls](<https://allluckly.cn/en/journal/2017-03-27-detecting-ios-main-thread-stalls/>)

   

  Detects stalls by monitoring the main thread's RunLoop state and wait timeouts. It then introduces retrieving thread stack frames, walking call stacks, and symbolication to capture useful diagnostic context while an app is running.

   

  SindriLin RunLoop · stall detection · call stacks
- 2016-07-26 

  #### [RunLoop and Keeping iOS Threads Alive](<https://allluckly.cn/en/journal/2016-07-26-runloop-and-keeping-ios-threads-alive/>)

   

  Uses the networking thread in AFNetworking 2.x to examine RunLoop-based thread lifetimes. It explains how copied run-loop code can retain objects or prevent threads from exiting, then explores more controlled lifecycle handling through examples.

   

  bestswifter RunLoop · NSThread · AFNetworking
- 2016-04-25 

  #### [Optimising UITableViewCell height calculation in Swift](<https://allluckly.cn/en/journal/2016-04-25-optimising-uitableviewcell-height-calculation-in-swift/>)

   

  Addresses repeated cell-height calculation by drawing on FDTemplateLayoutCell's template measurement and height-caching approach. A Swift wrapper reduces repeated work during table-view scrolling.

   

  大石头布 UITableViewCell · row-height caching · FDTemplateLayoutCell
- 2016-03-02 

  #### [UIKit performance tuning in practice](<https://allluckly.cn/en/journal/2016-03-02-uikit-performance-tuning-in-practice/>)

   

  Uses a list interface as an experiment and Instruments' Core Animation tools to examine layer blending, image dimensions, colour formats and offscreen rendering. It connects common scrolling-performance problems with targeted adjustments.

   

  bestswifter Instruments · Core Animation · offscreen rendering
- 2016-02-29 

  #### [Bison's guide to iOS multithreading, part 3](<https://allluckly.cn/en/journal/2016-02-29-bison-s-guide-to-ios-multithreading-part-3/>)

   

  Explores GCD tasks and queues, comparing the main queue, global queues and custom serial and concurrent queues. Image downloads, repeated execution and one-time initialisation illustrate common ways to submit work.

   

  Bison GCD · dispatch\_async · dispatch\_sync
- 2016-01-18 

  #### [Bison's guide to iOS multithreading, part 2](<https://allluckly.cn/en/journal/2016-01-18-bison-s-guide-to-ios-multithreading-part-2/>)

   

  Examines shared data accessed by several threads, introducing synchronized blocks and NSLock locking and unlocking. NSCondition examples then use waiting, signalling and broadcasting to explain coordination between threads.

   

  Bison thread safety · synchronized · NSLock
- 2016-01-13 

  #### [Bison's guide to iOS multithreading, part 1](<https://allluckly.cn/en/journal/2016-01-13-bison-s-guide-to-ios-multithreading-part-1/>)

   

  Introduces multithreading by distinguishing processes from threads and comparing NSThread, NSOperationQueue and GCD. It then demonstrates thread creation, execution, termination and priorities, using logs to observe scheduling behaviour.

   

  Bison NSThread · multithreading · thread scheduling

### Data & networking

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/data-network/>)

- 2017-05-03 

  #### [DNS Hijacking and Request Handling in iOS](<https://allluckly.cn/en/journal/2017-05-03-dns-hijacking-and-request-handling-in-ios/>)

   

  Introduces DNS hijacking through unexpected name-resolution results, then describes using NSURLProtocol to adjust requests and resolution. It discusses compatibility boundaries involving IPv6, WebKit, and NSURLSession and retains the implementation examples and references.

   

  SindriLin DNS · NSURLProtocol · IPv6
- 2017-03-09 

  #### [Reading CocoaAsyncSocket: Completing the Connection](<https://allluckly.cn/en/journal/2017-03-09-reading-cocoaasyncsocket-completing-the-connection/>)

   

  Continues tracing the CocoaAsyncSocket connection process from local-address binding to connection establishment and callbacks. Low-level socket operations explain the order of asynchronous execution and the purpose of the relevant configuration.

   

  涂耀辉 CocoaAsyncSocket · GCDAsyncSocket · bind
- 2017-02-17 

  #### [Reading CocoaAsyncSocket: Connection Setup](<https://allluckly.cn/en/journal/2017-02-17-reading-cocoaasyncsocket-connection-setup/>)

   

  Follows GCDAsyncSocket initialization and connection entry points through the CocoaAsyncSocket source. It traces parameter checks, local and server address creation, and socket configuration before connecting, using annotated code to explain the call sequence.

   

  涂耀辉 CocoaAsyncSocket · GCDAsyncSocket · Socket
- 2016-10-12 

  #### [iOS 10 Notifications, Part 2: Service Extensions](<https://allluckly.cn/en/journal/2016-10-12-ios-10-notifications-part-2-service-extensions/>)

   

  Explains how a Notification Service Extension processes content before a notification appears. It covers creating an extension target, changing text, loading attachments, and falling back to the original notification when processing times out.

   

  徐不同 UNNotificationServiceExtension · notification attachments · remote notifications
- 2016-09-28 

  #### [iOS 10 Notifications, Part 1: Requests, Triggers, and Attachments](<https://allluckly.cn/en/journal/2016-09-28-ios-10-notifications-part-1-requests-triggers-and-attachments/>)

   

  Uses local notifications to explain the relationship between UNNotificationRequest, triggers, and the notification center. It manages additions, updates, and deletions through identifiers and introduces valid file paths and configuration for notification attachments.

   

  徐不同 UNNotificationRequest · UNUserNotificationCenter · local notifications
- 2016-09-27 

  #### [iOS 10 Push Notifications: The Basics](<https://allluckly.cn/en/journal/2016-09-27-ios-10-push-notifications-the-basics/>)

   

  Starts with enabling push capabilities and checking an existing project's configuration, then introduces iOS 10 notification registration, notification-center delegates, and callbacks. Third-party push integration illustrates the API changes involved in migrating older code.

   

  徐不同 iOS 10 · UserNotifications · push registration
- 2016-06-02 

  #### [Wrapping automatic object archiving and unarchiving on iOS](<https://allluckly.cn/en/journal/2016-06-02-wrapping-automatic-object-archiving-and-unarchiving-on-ios/>)

   

  Starts with NSCoding and uses the runtime to enumerate instance variables and organise encoding. The WZXArchiver wrapper develops step by step, with discussion of child objects and the limits of automated storage.

   

  WzxJiang NSCoding · WZXArchiver · object archiving
- 2016-05-09 

  #### [A first look at PhotoKit in Swift](<https://allluckly.cn/en/journal/2016-05-09-a-first-look-at-photokit-in-swift/>)

   

  Uses a multi-photo picker to introduce PhotoKit, including the maximum selection count, returning an array of PHAsset objects and invoking a closure. The album project and learning resources document an attempt to move from AssetsLibrary to PhotoKit.

   

  大石头布 PhotoKit · PHAsset · multiple-photo selection
- 2016-04-26 

  #### [MVVM and chained network-request architecture](<https://allluckly.cn/en/journal/2016-04-26-mvvm-and-chained-network-request-architecture/>)

   

  Begins with growing business logic in a view controller, using a sign-in decision to separate Model, ViewModel and ViewController responsibilities. It then introduces ReactiveCocoa and a chained network-request wrapper for organising business calls.

   

  WzxJiang MVVM · ReactiveCocoa · ViewModel
- 2016-03-30 

  #### [Combining AES encryption with Base64 encoding on iOS](<https://allluckly.cn/en/journal/2016-03-30-combining-aes-encryption-with-base64-encoding-on-ios/>)

   

  Defines categories for NSData and NSString to demonstrate a workflow combining AES encryption and decryption with Base64 encoding. It notes that the client and server must agree on the same key and provides a complete demonstration project.

   

  Bison AES · Base64 · CommonCrypto
- 2016-03-16 

  #### [Building a Swift local-cache library step by step](<https://allluckly.cn/en/journal/2016-03-16-building-a-swift-local-cache-library-step-by-step/>)

   

  First distinguishes Documents, Caches, Preferences and temporary directories, then wraps a local file cache for objects, images and audio. Offline-browsing scenarios explain directory management and the approach to reading and writing cached content.

   

  大石头布 Swift · file caching · app sandbox
- 2016-03-14 

  #### [Building a WeChat-style iOS app, part 6](<https://allluckly.cn/en/journal/2016-03-14-building-a-wechat-style-ios-app-part-6/>)

   

  Records three issues after integrating chat: matching keyboard animation parameters, managing observers as the app enters and leaves the background, and preserving sign-in state. It includes the handling code and explicitly limits the simplified automatic sign-in example.

   

  WzxJiang keyboard notifications · instant messaging · app lifecycle
- 2016-03-03 

  #### [Remote notifications with JPush: a detailed integration guide](<https://allluckly.cn/en/journal/2016-03-03-remote-notifications-with-jpush-a-detailed-integration-guide/>)

   

  Prepares remote notifications through App ID configuration, push capabilities and certificate requests, then integrates the JPush SDK. Development and production settings, certificate export and client callbacks document an early push-notification setup workflow.

   

  WzxJiang APNs · JPush · push certificates
- 2016-02-14 

  #### [Building a WeChat-style iOS app, part 5](<https://allluckly.cn/en/journal/2016-02-14-building-a-wechat-style-ios-app-part-5/>)

   

  Continues the profile and Moments screens, using AVUser for registration and sign-in and AVFile for avatar uploads. Image compression reduces transfer size, while notes document issues with a pull-down header image and refresh components.

   

  WzxJiang AVUser · AVFile · avatar uploads
- 2016-02-03 

  #### [Building a WeChat-style iOS app, part 4](<https://allluckly.cn/en/journal/2016-02-03-building-a-wechat-style-ios-app-part-4/>)

   

  Adds cloud-storage and instant-messaging dependencies, wraps sign-in and registration methods, and records troubleshooting while querying user data. An early experiment with a password field is included as part of this historical development account.

   

  WzxJiang WeChat-style app · cloud storage · user sign-in
- 2016-01-25 

  #### [Do you need Alamofire? Trying NSURLSession instead](<https://allluckly.cn/en/journal/2016-01-25-do-you-need-alamofire-trying-nsurlsession-instead/>)

   

  Introduces NSURLSession through a simple data request, distinguishes data, download and upload tasks, and compares default, ephemeral and background configurations. It connects those choices with caching, cookies and the organisation of network tasks.

   

  大石头布 NSURLSession · NSURLSessionConfiguration · download tasks
- 2016-01-20 

  #### [Integrating LianLian Pay into an iOS app](<https://allluckly.cn/en/journal/2016-01-20-integrating-lianlian-pay-into-an-ios-app/>)

   

  Organises the linker options, resource styles and business fields required by the LianLian Pay SDK. It explains user identifiers, card-binding agreements and server callbacks, with notes on signatures and UI customisation settings that are easy to confuse.

   

  Bison LianLian Pay · payment SDK · server-side signatures
- 2016-01-10 

  #### [Understanding and using Core Data for persistence](<https://allluckly.cn/en/journal/2016-01-10-understanding-and-using-core-data-for-persistence/>)

   

  Explains the relationship between managed objects, contexts and the persistent store coordinator, then sets up Core Data and an entity model manually. Examples of creating, fetching, updating and deleting objects illustrate the main persistence workflow.

   

  Bison Core Data · NSManagedObjectContext · entity models
- 2016-01-04 

  #### [GitHub source-code picks, January 4: Bluetooth, launch animations and a custom tab bar](<https://allluckly.cn/en/journal/2016-01-04-github-source-code-picks-january-4-bluetooth-launch-animations-and-a-custom-tab-bar/>)

   

  Selects the BabyBluetooth framework, CLClipImageView launch animation and CYLTabBarController tab bar. Project links and selected usage examples introduce the components, including the distinction between Bluetooth central and peripheral modes.

   

  Bison BabyBluetooth · CoreBluetooth · CLClipImageView
- 2015-12-07 

  #### [OCR for debit and credit cards in iOS development](<https://allluckly.cn/en/journal/2015-12-07-ocr-for-debit-and-credit-cards-in-ios-development/>)

   

  Introduces card.io SDK integration for scanning card numbers, including linker settings, delegates and recognition callbacks. Objective-C and Swift examples accompany the workflow; the article specifies that the selected implementation is for credit-card scanning.

   

  Bison card.io · OCR · credit-card recognition
- 2015-11-09 

  #### [Using Alamofire with Swift 2.0](<https://allluckly.cn/en/journal/2015-11-09-using-alamofire-with-swift-2-0/>)

   

  Shows how to import Alamofire manually, configure project dependencies and make network requests in a Swift 2.0 environment. Screenshots identify the project-linking settings, preserving an early framework integration and usage workflow.

   

  Bison Swift 2.0 · Alamofire · network requests
- 2015-10-21 

  #### [Integrating Alipay friend sharing in three minutes](<https://allluckly.cn/en/journal/2015-10-21-integrating-alipay-friend-sharing-in-three-minutes/>)

   

  Walks through app registration, SDK import, URL Scheme configuration and callbacks for sharing to Alipay friends. It distinguishes the data objects for text, image and web messages, and records checks for installation detection and authentication failures.

   

  Bison Alipay sharing · SocialSDK · URL Scheme
- 2015-09-23 

  #### [Getting started with XMPP, step by step](<https://allluckly.cn/en/journal/2015-09-23-getting-started-with-xmpp-step-by-step/>)

   

  Records the initial integration of XMPP chat: importing dependencies, connecting to Openfire with user information, handling registration and sign-in authentication, and processing message callbacks. Client-side code accompanies the connection and messaging workflow.

   

  Bison XMPP · Openfire · instant messaging
- 2015-06-16 

  #### [Reading iOS contacts and sending SMS invitations](<https://allluckly.cn/en/journal/2015-06-16-reading-ios-contacts-and-sending-sms-invitations/>)

   

  Introduces a small wrapper for a friend-invitation workflow: reading device contacts and opening the SMS composer. It lists the AddressBook, AddressBookUI and MessageUI dependencies and provides the LBContacts example project.

   

  Bison contacts · AddressBook · MessageUI

### Tools & releases

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/tooling-release/>)

- 2017-04-05 

  #### [Practical Automated Testing for iOS](<https://allluckly.cn/en/journal/2017-04-05-practical-automated-testing-for-ios/>)

   

  Compares unit tests with UI automation and introduces XCTest, Quick, Nimble, KIF, and Appium. It discusses waiting, stubs and mocks, command-line execution, and testable code structure as foundations for maintainable tests.

   

  黄文臣 XCTest · Quick · Nimble
- 2016-09-22 

  #### [Xcode 8 and iOS 10 Compatibility Notes](<https://allluckly.cn/en/journal/2016-09-22-xcode-8-and-ios-10-compatibility-notes/>)

   

  Collects migration notes on notifications, ATS, privacy permissions, and interface changes in Xcode 8 and iOS 10. It also records issues involving logging, fonts, list performance, plugins, and xib warnings, with links to official documentation.

   

  判若两人丶 iOS 10 · Xcode 8 · ATS
- 2016-09-21 

  #### [Adding iOS 10 Push Notification Extensions in Xcode 8](<https://allluckly.cn/en/journal/2016-09-21-adding-ios-10-push-notification-extensions-in-xcode-8/>)

   

  Records the process of adding iOS 10 notification extensions to an existing app in Xcode 8. It covers push capabilities, signing, Swift versions, architecture settings, and debugging and submission issues for Service and Content extensions.

   

  zhao0 iOS 10 · Xcode 8 · notification extensions
- 2016-06-19 

  #### [What's new in iOS 10: SiriKit](<https://allluckly.cn/en/journal/2016-06-19-what-s-new-in-ios-10-sirikit/>)

   

  Introduces SiriKit integration following WWDC 2016, from creating an Intents Extension to implementing intent handling and its interface. It explains how a spoken request is interpreted and passed to an app extension for the relevant response.

   

  Sindri SiriKit · Intents Extension · INExtension
- 2016-05-03 

  #### [Prompting users to review an iOS app](<https://allluckly.cn/en/journal/2016-05-03-prompting-users-to-review-an-ios-app/>)

   

  Introduces the LBToAppStore review-prompt wrapper, using the app version, elapsed days and the user's previous choice to decide when to show a dialog. The response either opens the store or postpones the reminder, illustrating an early review-request workflow.

   

  Bison LBToAppStore · App Store · UIAlertController
- 2016-04-15 

  #### [Apple's Xcode testing documentation in Chinese, part 2](<https://allluckly.cn/en/journal/2016-04-15-apple-s-xcode-testing-documentation-in-chinese-part-2/>)

   

  Continues the Chinese translation of Apple's testing documentation with code coverage, command-line testing, Xcode Server continuous integration and UI test recording. It also discusses structuring testable code and migrating from OCUnit to XCTest.

   

  许漠颜 code coverage · Xcode Server · continuous integration
- 2016-04-15 

  #### [Apple's Xcode testing documentation in Chinese, part 1](<https://allluckly.cn/en/journal/2016-04-15-apple-s-xcode-testing-documentation-in-chinese-part-1/>)

   

  A Chinese translation of earlier Apple testing documentation covering XCTest project setup, test classes and methods, the test lifecycle, performance tests and UI tests. The test navigator illustrates running cases and inspecting their results.

   

  许漠颜 XCTest · XCTestCase · unit testing
- 2016-04-04 

  #### [Publishing a library to CocoaPods](<https://allluckly.cn/en/journal/2016-04-04-publishing-a-library-to-cocoapods/>)

   

  Records the process of publishing an open-source library: preparing the GitHub project, registering with trunk, writing a podspec, checking versions and tags, validating and submitting. It also explains commonly used specification fields.

   

  WzxJiang CocoaPods · podspec · trunk
- 2016-02-26 

  #### [Xcode development tips from a SwiftGG discussion](<https://allluckly.cn/en/journal/2016-02-26-xcode-development-tips-from-a-swiftgg-discussion/>)

   

  Collects Xcode techniques from a SwiftGG discussion: exception, symbolic and test-failure breakpoints; inspecting and changing variables during debugging; Quick Look; and reusable code snippets.

   

  bestswifter Xcode · breakpoints · Quick Look
- 2016-02-19 

  #### [Restoring old Xcode plug-ins after a version update](<https://allluckly.cn/en/journal/2016-02-19-restoring-old-xcode-plug-ins-after-a-version-update/>)

   

  Documents historical fixes for plug-ins that stopped loading after an Xcode update or an accidental Skip Bundles selection. It checks compatibility UUIDs, edits plug-in Info.plist files and resets the loading choice.

   

  许漠颜 Xcode plug-ins · DVTPlugInCompatibilityUUIDs · Info.plist
- 2016-02-18 

  #### [Preparing an iOS app for Apple Pay](<https://allluckly.cn/en/journal/2016-02-18-preparing-an-ios-app-for-apple-pay/>)

   

  Records early Apple Pay project setup: enabling the capability, creating a Merchant ID and configuring payment-request properties. It also lists questions about country and currency codes; the demonstrated result comes from the simulator identified in the original article.

   

  Bison Apple Pay · Merchant ID · payment requests
- 2015-12-28 

  #### [Bison's collection of solutions to common Git errors](<https://allluckly.cn/en/journal/2015-12-28-bison-s-collection-of-solutions-to-common-git-errors/>)

   

  Collects index-lock errors and warnings about Git's default push behaviour, with error screenshots and the configuration commands used at the time. It supports reviewing troubleshooting by error type; inspect the current repository state before applying a command.

   

  Bison Git · index.lock · push.default
- 2015-12-26 

  #### [Integrating a Baidu Mobile SSP launch ad in one minute](<https://allluckly.cn/en/journal/2015-12-26-integrating-a-baidu-mobile-ssp-launch-ad-in-one-minute/>)

   

  Records the historical integration of Baidu Mobile SSP splash ads, from platform registration and SDK import to system dependencies, compiler options and launch-time delegate callbacks. It follows the main steps for loading an ad during app startup.

   

  Bison Baidu SSP · splash ads · BaiduMobAdSplash
- 2015-09-29 

  #### [Practical lessons from localising an iOS app](<https://allluckly.cn/en/journal/2015-09-29-practical-lessons-from-localising-an-ios-app/>)

   

  Reviews translation-file organisation, button-label length, language-region identifiers and localised image names. It focuses on how the language identifier changes in iOS 9 affected logic that detected Chinese in a multilingual project.

   

  Bison internationalisation · localisation · language-region identifiers
- 2015-07-31 

  #### [Detecting device locking in an iOS app](<https://allluckly.cn/en/journal/2015-07-31-detecting-device-locking-in-an-ios-app/>)

   

  Records SpringBoard lock-notification handling used to investigate a failure in an embedded game when the device locked. It preserves the troubleshooting approach and callback code; the conditions under which those interfaces may be used need separate verification.

   

  Bison lock notifications · SpringBoard · CFNotificationCenter
- 2015-06-10 

  #### [Packaging an iOS static library as an .a file](<https://allluckly.cn/en/journal/2015-06-10-packaging-an-ios-static-library-as-an-a-file/>)

   

  Records a workflow for building separate device and simulator static libraries in Xcode, inspecting their architectures with lipo and combining the .a files. It explains matching the target platform during testing and checking the resulting library.

   

  Bison static libraries · lipo · Xcode
- 2015-06-04 

  #### [An illustrated guide to implementing iOS in-app purchases](<https://allluckly.cn/en/journal/2015-06-04-an-illustrated-guide-to-implementing-ios-in-app-purchases/>)

   

  An early end-to-end integration guide covering agreements, in-app purchase products, sandbox accounts and client code. It follows StoreKit product requests, the payment queue, transaction-state handling and receipt validation through the setup process.

   

  Bison StoreKit · IAP · sandbox testing
- 2015-05-22 

  #### [iOS App Store rejection cases and solutions: an ongoing record](<https://allluckly.cn/en/journal/2015-05-22-ios-app-store-rejection-cases-and-solutions-an-ongoing-record/>)

   

  A collection of App Review issues involving crashes, background modes, third-party sign-in, in-app purchases and user content, with the responses used at the time. These historical rules and individual cases help identify categories of review problems.

   

  App Store · App Review · background modes
- 2015-05-20 

  #### [Installing and using CocoaPods for iOS development](<https://allluckly.cn/en/journal/2015-05-20-installing-and-using-cocoapods-for-ios-development/>)

   

  Starting with Ruby and CocoaPods installation, this article explains how to find dependencies, write a Podfile, install pods and open the generated workspace. It also records a fix for header completion, illustrating an early iOS dependency-management workflow.

   

  Bison CocoaPods · Podfile · Ruby
- 2015-05-18 

  #### [Disabling and dimming third-party sign-in buttons when the app is not installed](<https://allluckly.cn/en/journal/2015-05-18-disabling-and-dimming-third-party-sign-in-buttons-when-the-app-is-not-installed/>)

   

  Uses QQ and WeChat sign-in buttons to show how installation checks can determine whether a button is hidden, disabled or dimmed. It records the interface treatment used when the corresponding third-party app was unavailable.

   

  third-party sign-in · QQ · WeChat

### Audio & video development

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/audio-video/>)

- 2017-07-20 

  #### [Camera and Microphone Capture with FFmpeg-iOS](<https://allluckly.cn/en/journal/2017-07-20-camera-and-microphone-capture-with-ffmpeg-ios/>)

   

  First uses FFmpeg device input support to list cameras and microphones, then presents a native iOS camera-capture example. The two approaches illustrate media-device enumeration and the basic configuration of a system capture session.

   

  Bison FFmpeg · AVFoundation · camera
- 2017-07-12 

  #### [A Simple Streaming Wrapper for FFmpeg-iOS](<https://allluckly.cn/en/journal/2017-07-12-a-simple-streaming-wrapper-for-ffmpeg-ios/>)

   

  Builds on the preceding FFmpeg articles to set up a local nginx streaming test environment. Server configuration, a client-side streaming wrapper, and playback in VLC connect the process of sending encoded data with checking the resulting stream.

   

  Bison FFmpeg · nginx · RTMP
- 2017-07-11 

  #### [H.264 Decoding with FFmpeg-iOS](<https://allluckly.cn/en/journal/2017-07-11-h-264-decoding-with-ffmpeg-ios/>)

   

  Starts by importing FFmpeg-iOS and configuring header search paths, then traces opening media, finding a video stream, initializing the decoder, reading packets, and releasing resources. A wrapper example brings the H.264 decoding steps together.

   

  Bison FFmpeg · H.264 · avcodec
- 2017-07-11 

  #### [Building FFmpeg-iOS on a Mac](<https://allluckly.cn/en/journal/2017-07-11-building-ffmpeg-ios-on-a-mac/>)

   

  Records preparing gas-preprocessor and yasm on a Mac, then running the FFmpeg-iOS build script. It explains script locations, dependency installation, and output directories to prepare libraries for the later decoding examples.

   

  Bison FFmpeg · gas-preprocessor · yasm
- 2016-05-13 

  #### [Integrating ijkplayer for live video on iOS](<https://allluckly.cn/en/journal/2016-05-13-integrating-ijkplayer-for-live-video-on-ios/>)

   

  Records downloading the source, initialising dependencies, compiling FFmpeg, packaging IJKMediaFramework and adding it to an iOS project. The focus is on the role of each directory and build step in the ijkplayer integration.

   

  jianshu\_wl ijkplayer · FFmpeg · IJKMediaFramework

### Web & development notes

[Reading notes & full list](<https://allluckly.cn/en/journal/topics/web-notes/>)

- 2016-10-19 

  #### [WeChat Mini Programs from Scratch, Part 3](<https://allluckly.cn/en/journal/2016-10-19-wechat-mini-programs-from-scratch-part-3/>)

   

  Connects an article list to a network request, reads the response, updates the page with setData, and adjusts WXML field bindings. It also records the limitations encountered at the time with image URLs and HTML5 detail pages.

   

  Bison WeChat Mini Programs · wx.request · setData
- 2016-10-18 

  #### [WeChat Mini Programs from Scratch, Part 2](<https://allluckly.cn/en/journal/2016-10-18-wechat-mini-programs-from-scratch-part-2/>)

   

  Adds an article detail page to the existing list, using navigator for navigation and parameters. It then adjusts spacing, image placement, and text layout in WXSS to refine the list into the intended page design.

   

  Bison WeChat Mini Programs · navigator · WXSS
- 2016-10-17 

  #### [WeChat Mini Programs from Scratch, Part 1](<https://allluckly.cn/en/journal/2016-10-17-wechat-mini-programs-from-scratch-part-1/>)

   

  Builds an IT Blog mini program from an iOS developer's perspective. It explains the roles of app.json, app.js, WXML, and WXSS, configures a TabBar, and uses templates and list rendering to display article data.

   

  Bison WeChat Mini Programs · WXML · WXSS
- 2016-07-27 

  #### [Setting Up React Native for iOS Development on a Mac](<https://allluckly.cn/en/journal/2016-07-27-setting-up-react-native-for-ios-development-on-a-mac/>)

   

  Records a React Native setup on macOS: installing Homebrew, Node.js, watchman, and flow, creating a project, opening the iOS project, and refreshing code in the simulator.

   

  Bison React Native · Node.js · watchman
- 2016-07-05 

  #### [JavaScript and Native iOS Interaction with JavaScriptCore](<https://allluckly.cn/en/journal/2016-07-05-javascript-and-native-ios-interaction-with-javascriptcore/>)

   

  Compares early UIWebView URL interception with JavaScriptCore. Using JSContext, it introduces executing JavaScript from native code, registering native methods, and passing data between the two environments.

   

  Sindri JavaScriptCore · JSContext · UIWebView
- 2016-02-01 

  #### [A beginner developer's review of 2015](<https://allluckly.cn/en/journal/2016-02-01-a-beginner-developer-s-review-of-2015/>)

   

  Reflects on the author's job search, development projects and self-directed learning in 2015. Starting a technical blog, learning Swift, releasing open-source UI components and meeting other developers provide the personal context for this early stage of growth.

   

  Bison developer growth · technical blogging · Swift
- 2015-12-27 

  #### [Helping Baidu discover a GitHub Pages blog: a historical workflow](<https://allluckly.cn/en/journal/2015-12-27-helping-baidu-discover-a-github-pages-blog-a-historical-workflow/>)

   

  Records mirroring a GitHub Pages blog to GitCafe Pages, using SourceTree to clone and push branches, bind a domain and configure regional DNS. The workflow aimed to improve access and search indexing in mainland China at the time.

   

  Bison GitHub Pages · GitCafe · SourceTree
- 2015-11-28 

  #### [A technical blog can be more than a website](<https://allluckly.cn/en/journal/2015-11-28-a-technical-blog-can-be-more-than-a-website/>)

   

  Records an experiment in wrapping a personal technical blog as an iOS app. UIWebView displays the home and category pages and handles loading callbacks, while search and interaction-stutter issues remain documented as unresolved at the time.

   

  Bison personal blog · UIWebView · hybrid apps
- 2015-07-17 

  #### [Using UIWebView: techniques and notes](<https://allluckly.cn/en/journal/2015-07-17-using-uiwebview-techniques-and-notes/>)

   

  Collects common UIWebView settings for loading web pages inside a native interface, including transparent backgrounds, scaling, phone-number detection and JavaScript interaction. It also discusses the layout and communication costs of a cross-platform approach.

   

  Bison UIWebView · JavaScript · hybrid development

