Xcode automatic version

Make sure developers have had such trouble:Version submitted wrong!

Version of the compiler and testing more,When the inevitable submitted only to find the wrong version number。Or is the background version number is correct,Reception forget to change the version number。In fact,Allows reception automatically obtain the version number of the background data,For example, this:

But

Background version still have to manually write ah! It fills the major version number,Different programs have their own different style,This is not a number and some even skipped,Then structure[……]

Click link to continue reading...

A stack automatically sorted Swift

a year ago,I'm here git onReleased aSwift used to achieve stack,There are two versions。Because Swift itself does not achieve this thing - even though the official part of the tutorial is to use genericsThe StackExamples cited。

Perhaps people think this is too simple, right

In short,This time I play this thing,Because the HMM Viterbi algorithm needs to be done to trim,Otherwise, the path too much unnecessarily increase the amount of calculation - after all,,We are concerned first,Who would pay attention to second it?

so,This stack is based on native Arr[……]

Click link to continue reading...

I pocketed the input method users add automatic reply robot

If that FIG.,I pocketed the input method of the user group broke a Robot,As the user off the grid input method more and more,Some admiring novice more。Many common problems repeated questions,Made people battered,If you can have a robot,Like Siri as,It automatically captures those keywords and then respond to these users,Not Miya? So that users can get answers carefully edited,And I can free up more time for you to write code on behalf wan xi。

of course,Such a robot I've ever seen,So I think there must be something ready-made,Obviously,Under the first search I found this[……]

Click link to continue reading...

Swift is determined whether there is a string expression Emoji

Update:The network spread emoji Code pointNot complete,I follow Wikipedia-refresh a bit,The paper version of the code was updated Swift。

Many times we need to determine a character、Or that there is not a word that contains the emoji,Use Swift language development app is no exception,For example, you can use a regular expression - but unfortunately,It seems different language support for regular expressions distinction, \in [……]

Click link to continue reading...

Pocketed input method is how to achieve app settings without the need for full access?

All to known,On iOS since 8.0 Start version,Keyboard can be developed for iOS third-party input method,These keyboards can be sold on the AppStore,but,But also has a very strict access rules。

This,Apple's third-party keyboard design of the two permissions,A minimum of,Permissions Only the most basic functions of the keyboard、Another relatively more,Get the keyboard "Full Access"Basically after permission and android Almost on the keyboard,You can access contacts、It can be networked, etc.。

but[……]

Click link to continue reading...

Could not load the “” image referenced from a nib in the bundle with identifier “com.xxx.xxx”

Today, I encountered a strange problem,Program runs no problem at all but the terminal given as follows

In fact, it is wrong on the subject,This question seems quite simple - not that the pictures referenced lost it ......

actually not,Since the name is "" So you can not find what exactly is the picture lost - a fact not lost。

After all, the program does not have a resource inside[……]

Click link to continue reading...

Write off the grid a little life experience of the past six months input obtained

He says you may not believe,Pocketed input method originally I practiced hand of a project,It's calledBoats

But in the hands to write it before,In fact, I had complained many times,They say they want to write a useful input method,Because I used Larry,The existing input method,Larry did not pay attention to how this group,The same time,Speaking on spelling,Various advertising pop red dot also put their own utility functions ah ah sentence input to these advantages buried。

until 2015 year 11 moon 7 day,The first time I had to write a small input of ideas:

Now most of the input method on iOS bloated[……]

Click link to continue reading...

CloudKit Optimization Guide

Recently added to the input method pocketed called "Logarithmic Cloud"s things,It is not difficult,Simpler than using iCloud Document,But not too much information online,You started by those tutorials to real life should not be a problem,But want to enhance the user experience,It is not so easy。Here we take a look at,How to get CloudKit run more fun。

CKDatabaseOperation

In General,You get a data might look like this:
[crayon-6900e0f91093[……]

Click link to continue reading...

Let iTrem 2 + zsh startup no longer wait!

iTerm as a built-in terminal mac alternatives really handy,Multi-function、Interface is also nice。Skin with zsh +,Since then, the terminal also beautiful (thematic map)。

but,zsh is always very slow start,Although the content before each start input is still not lost,But always waiting is not a thing (to tell the truth,I have endured so many years ......)

In short,In fact, this problem can be solved:

Enter iTerm2 preferences in,Edit your configuration in the Profiles,In the configuration on the right side of the Ge[……]

Click link to continue reading...

Swift in the use cmph

cmph It stands for C Minimal Perfect Hashing Library ,It is a very well-known, written in C minimal perfect hash library,What is a perfect hash?

Perfect hashing

Here we do not speak principle,You just need to know that the traditional hash conflict,We need to rely on a variety of algorithms to deal with conflict can be,For hash,Always need a table,This table reserved many locations,Then the calculated value is the coordinates of these locations,You can put data into the corresponding coordinate in。

But this time there is a problem,in case[……]

Click link to continue reading...

A quick look at the string

Most of the time,We need to look at many strings,To determine the specific content filtering out。For example, through the input method which pocketed,We need to use auxiliary code word to filter out candidates need。

In General,Find and Compare certainly figures to fastest,However, in the lexicon we can not put all the words are converted to digital (although theoretically feasible ......) search on the string,We realize there are many ways to,Here, I say my own ideas:

Set<String>

Since my thesaurus secondary screening is effective only for code words or word vocabulary,Then I consider[……]

Click link to continue reading...

Based on Dynamic Programming sentence input method

In General,We will not call it on the issue of dynamic programming algorithm is "Dynamic Programming”,But called "Hidden Markov Models”,but,If we simply use the dynamic programming algorithm to solve a common directed acyclic graph,Then it can only be said to be dynamic planning ......

This time we want for the,It is based on the sentence input method thesaurus。The hidden Markov model is not based on the state transition Solution。

Thesaurus

Since no model,Our sentence input is based on words,We need a thesaurus。The thesaurus should record the most ordinary common vocabulary,And there is a[……]

Click link to continue reading...

ios VoiceOver support for visually impaired users

In fact, few users know,ios system is actually a complete set of easy access mechanism,Many blind or visually impaired users prefer to useiphone

So,As a developer,I think both in terms of product sales or as a side responsibility,We should do well to easily access support。

Fortunately, however,,Thanks to Apple's strict development standards,It is generally as long as your app can be added to already approved,So basically VoiceOver It has been able to identify most of your app in the,More generic,For example tabV[……]

Click link to continue reading...

iOS platform SQLite Performance Optimization

Start

In the ios platform,Permanent storage of data so few,比如说 coredata,For example realm,There are several options of nosql,But unfortunately,Several programs to support functions are still too few nosql,So let their selection is very sad - after all,,If it is a simple application of the words,It is not as good as other programs to facilitate quick - although the trend is nosql。

This time we talk about another common storage solutions --sqlite,This is very powerful stuff,It is a realization by c[……]

Click link to continue reading...

How to customize pocketed input method?

How to customize pocketed input method?

In pocketed input method,I provides powerful customization features for you。Whether it is simply one kind of new programs Shuangpin,Or import a five-stroke input method code table,It can be completed。

First of all,We start with the concept

Key mapping scheme

Pocketed input method to use it to generate the corresponding mapping scheme,Such as smart abc、For example, the natural code, etc.。Button mapping program has two files,Such as "smart ABC.plist" then we would have a corresponding "intelligent ABC_rev.plist",The latter is not necessary,But if you want to open "button[……]

Click link to continue reading...

Being Chinese Wikipedia corpus

Recently doing input method thesaurus,Implement new sentence input model,(Based on input model sentence the word I would talk back before),The new model is based on the input sentence HMM (I.e.Hidden Markov Models) To do,Of course,Due to limited funds, I personally equipment,Only the second order matrix。But even so,Model still need training。

of course,Not to say that with the novels and to train bad,Just difficult to find businesses related fiction,after all,Area they cover too single,This is not really a high quality corpus。Speaking of high-quality,It is naturally non-Wiki[……]

Click link to continue reading...

Memory Problems swift hurricane

Swift language development in the use of time,Many of my friends will be baffling problem encountered memory full,Obviously there ARC ,Obviously the release of memory,But still let the program memory footprint with circulation soared。

There is not really a memory leak occurs,This is actually ARC A mechanism:In each of the main Runloop At the end of the clean-up。That is,It has a caching mechanism necessary - after all,,Who can guarantee real-time release, then you do not want to stay local variables to subsequent code to use it?

But apparently,This will[……]

Click link to continue reading...

SourceKitService take up a lot of memory and CPU solutions

Swift performed using Xcode development software language when,Many people in the latter part of the project will encounter such a problem,If that diagram as:SourceKitService Take up a lot of CPU and memory,Or even directly cause the system stuck。

Then,This in the end is how it all about? StuckOverflow of the vote on the answer is to say:

Find SourceKitService double-click it in the Activity Monitor,It opens the directory to see which,To delete the cache and strong[……]

Click link to continue reading...

How to learn the natural code secondary code?

Natural Code is a relatively old program of Larry,How old? Old now many users do not know that it is a set of secondary code scheme。

Natural code secondary code can not be called barcode,It is called the secondary code,Because this program is designed as an auxiliary or,So it can not be done as a very low rate of weight like calf auxiliary code - but with the sound of words,It is still very efficient use。

Why even so it also said it entered efficient? Because it is the beginning of the design to assist,This directly determines that this program is very easy to accept and learn! How easy is it? just the side[……]

Click link to continue reading...