Mudkip is a Pokémon enthusiast, a web and iOS developer, a geek and an otaku who never grows up.

Everything that went wrong while building the Tumblr iOS share extension ∞


Tumblr share extension icon featured in a banner at Apple’s WWDC 2014 event

iOS app extensions – launching this Wednesday, as part of iOS 8 – provide an exciting opportunity for developers of all types of apps to integrate with their customers’ devices like never before. Here at Tumblr, we’re thrilled to pull the curtain off of our share extension, which we’ve…

There is still a long way to get extensions work properly.

Sep 17, 2014

A Pokédex App

I was thinking about creating a Pokédex app back in May. As time goes by, I have a growing desire to try new things like Swift, Storyboard & UI Design and create an iOS app myself. For a variety of reasons, a Pokédex app is the best fit.

There have been a dozen Pokédex apps in App Store, one is officially made by The Pokémon Company, which is gorgeous but lack of Generation VI update and not available in App Stores of Greater China. Some are pulled because of copyright complaints from Nintendo or TPC. My current favorite one is Oak, its design is beautiful and minimal.

I have several original consideration about making this app:

  • This app must be totally legitimate. It won’t contain any copyrighted material of Pokémon, such as images and cries. I’ll draw vector icons representing Poké Ball and other Pokémon concepts, but I’ll try my best to avoid trademark infringement. Even so I can’t prevent the app get rejected or pulled if Nintendo, TPC or Apple is unhappy with it.
  • This app will be iPhone (or iPod touch) and iOS 7+ only. It’s not enjoyable to support older system and I think reading articles on a Pokémon wiki is a better experience for iPad. I don’t know how to write Android apps (yet) and there are many more Android Pokédex apps.
  • It will use data and content from veekun’s database and 52Poké Wiki under the corresponding licenses. But the app is not affiliated with 52Poké, and of course Nintendo/Game Freak/TPC. I’m solely responsible for it.
  • It’s a non-commercial app, and under 52Poké Wiki’s content license it must be. It’s free, no in-app purchase and no ads.
  • This app is written in Swift and will use Storyboard. I’ll also try many iOS 7-inspired ideas in it to make the adventure pleasant.
  • It will contain an Individual Value calculator, but it might not be shipped with 1.0.
  • The app’s interface and most description will be Simplified and Traditional Chinese, and terminology like Pokémon names could be chosen from Chinese, Japanese and English.
  • It can be used offline, and it can update translations or external links when online.
  • There’s no ETA for this app. I would put a bit work on it every weekend or every several weekends.

I’ve already start prototyping it today with Xcode 6 beta 4. So far I feel good. There should be some entries about this journey in the coming months.

Jul 27, 2014

TJ Holowaychuk: Farewell Node.js ∞

Moral of the story, don’t get stuck in your own bubble! See what else is out there, you just might enjoy programming again. There are a lot of awesome solutions out there, my mistake was waiting to long to play around with them!☺.

I wrote a lot Node.js code for 52Poké Paradise last year. The journey was enjoyable at first, but I suffered from multiple frustrations as time going on. It’s really hard to design basic stuff like asynchronous constructors, especially in an environment where async codes are essential. Async and Q are good, but not enough. In the end, I’m hard to find a momentum to fix bugs and write new features for that program.

Today I sneaked a peek at Go and Revel. They smell really great. There’s no callback hell. Error handling and debugging is easier. I even found some similarities between Go and Swift. After all, I enjoy learning new programming languages.

But will I give up Node.js for Go? Will I use Go to rewrite 52Poké Paradise?

The answer might be no. I still love JavaScript. New features from ECMAScript Harmony and Node.js 0.11 are promising. Sharing same data logic, templates, i18n texts between the server and browser is important for the single page applications I want to build. I’m also familiar with and trust the libraries from Node.js community.

So I yield (pun intended). For now I think I’m going with Koa and refactor my old Express code. While I still keep eyes on new things.

Jul 5, 2014

Zero Escape: Virtue’s Last Reword

一周多前终于完成了3DS上的「Zero Escape: Virtue’s Last Reword」(極限脱出ADV 善人シボウデス)这部作品。40小时的游戏时间过后,虽然很多谜题和真相解开了,但是留下的困惑和谜题更多了,希望续作(如果有的话)能够一一释疑吧。


故事发生在2028年12月25日,前作的一年后,主角和其余8人被绑架到神秘的设施中,被迫参与密室逃脱以及囚徒困境的AB(Ally or Betray)游戏。9个人在游戏开始被佩戴了计数为3的腕表,当在进行几轮AB游戏后计数达到9时就可以脱出游戏,而计数小于等于0时则会遭到「处罚」。和前作一样,这场脱出游戏只是精心设计的密谋,并不是故事的真相。

以下内容涉及剧透,没有玩过本作品的同学请直接前往任天堂3DS eShop商店购买(或PSN购买Vita版),在完成全部结局后再回来看吧。这里推荐下载版是因为传说3DS版有在某个密室(PEC)存档可能损坏存档的Bug(其实我觉得也可能是Feature),下载版可以随时备份存档避免悲剧发生时的损失。


其实一开始对极限脱出系列有兴趣有制作商Spike Chunsoft的原因,某种程度上「9小时9个人9之门」能找到「神奇宝贝不可思议的迷宫 时/暗之探险队」的影子,剧情中贯穿着隐藏的线索,时间和空间的融合,以及真相结局中包含着的「希望」。





在最终章「Another Time」中玩家的视角变成了K,但K却知道很多他「不该知道的事情」,茜最后表示「你不是K,你不需要遵守我们的规则,你是我们的系统里一个独特的变量」的时候,瞬间想到了打越钢太郎另一部作品「Ever17」中的设定,然后看到Wiki中讲PSV版中完成最终章的成就叫做「A Certain Point Of View」证实了我的猜测。

「我」就是「视点」,四次元生物「Blick Winkel」,在Sigma博士的影像中其实也暗示了更高次元智慧的存在;但是无论如何套用Ever17中Blick Winkel的所作所为,并不能拯救VLR中的世界,比起挽救两个人的生命,改变整个45年的历史对「视点」来说要难得多。


Reality is shaped by what we believe reality should be.



Bluebird是Sigma送给Luna的音乐盒,来源于「メーテルリンクの青い鳥 チルチルミチルの冒険旅行」,包含了笼子里的鸟、幸福得而复失的寓意。

2028年12月31日究竟发生了什么,E路线的世界是否可以存在,Santa在做什么,Phi的真实身份等等谜题都需要在下一作中揭示。但由于日本销量不佳的原因,Spike Chunsoft暂停了极限脱出第三作开发。玩家为了表示对系列的支持发起了Operation Bluebird行动,很短的时间内就得到了上万支持;打越钢太郎目前正在进行其他作品的工作,如果顺利的话,之后极限脱出第三作恢复开发并不是不可能。

所以相信VLR续作一定会登场,比起整个AB计划,Operation Bluebird的成功要容易得多呢。

Jun 22, 2014

Set the delegate of UIKit to nil in dealloc

This is my first post about iOS development since I became a iOS developer last quarter. I expect to write more about my new journey.

Recently we discovered a significant non-reproducible crash log in our apps related to the animation of UIScrollView or UITableView, as well as shouldStartLoadWithRequest of UIWebViewDelegate. It’s because of an invalid virtual memory reference to the delegate of the certain view.

Usually we assign the delegate to a UIViewController. After the view controller is deallocated, there’s a possibility that the UIScrollView or UIWebView is still retained, and the delegate property refer to a bad memory address.

I think it’s a better practice to use (weak) instead of the unsafe (assign) for delegates, since it can be set to nil automatically. But Apple use (assign) in UIKit delegates for backward compatibility, since iOS before 5 doesn’t have ARC.

The solution is simple, when setting the delegate of a UIKit object, make sure to set the delegate to nil in dealloc.

Jun 17, 2014

andreyvit/find-fsevents-bugs ∞

There is a long-standing bug in OS X prevent monitoring of certain folders. I found some of my projects in Sublime Text and Codekit can’t be monitored well.

This is a command line tool to check and report buggy directories. Once detected, you can rename or copy the affected folders and reset the apps monitoring it, like re-create the Sublime Text or Codekit projects specifically.

Jun 11, 2014

Copyright © 2014 mudkip.me