我第一次尝试开发iOS应用
My first attempt at iOS app development

原始链接: https://mgx.me/my-first-attempt-at-ios-app-development

由于对现有照片管理应用的失望,我,一个产品和市场营销专业人士,在AI(Cursor和Gemini)的帮助下,开始了为期三天的iOS开发速成课程。三天内,我开发了一个用于照片去重和管理的功能性应用。这个过程包括在AI生成的代码片段和Xcode之间进行迭代式编码,从错误信息中加速学习,以及令人惊讶的易于使用的原生iOS环境。 挑战包括平台特定的配置,例如代码签名,以及CLGeocoder在中国古怪的行为,这需要一个备用的地理编码系统。观察到类似应用中过高的订阅模式,启发我创建一个简单的、一次性购买的应用(2.99美元),专注于公平的价值。我还注意到其他照片管理应用采用了一些可疑的营销策略,这些应用的循环订阅与提供的有限功能脱节。我仍在完善UI,但核心功能已经完成,这证明了对于非iOS开发者来说,借助AI辅助,构建一个基本的iOS应用是可行的。

这篇 Hacker News 帖子讨论了 iOS 应用开发的挑战和回报,起因是一位开发者第一次尝试开发应用的经历。经验丰富的开发者分享了他们的见解,强调了 Xcode 与嵌入式开发工具相比最初的吸引力,但也提到了代码签名、Apple 开发者计划费用以及不断更新应用以避免弃用并保持与较新 iOS 版本和设备兼容性的种种挫败感。盈利也是一个关键点,许多评论者指出付费应用很少奏效,转向免费下载并找到一个合适的营销策略更为成功。其他人则强调了仅仅依靠 iOS 应用谋生的难度。虚拟机和侧载被讨论为绕过 Apple 生态系统的一种可能途径。文中提到了一个与作者应用类似的示例应用,以及迎合不同用户偏好的挑战。最近的 Expo SDK 53 更新也被提及,促使人们考虑转向原生开发。
相关文章

原文

A week ago, I knew nothing about Swift. Today, I have a working iOS app sitting on my Mac and my test device. I'm still a bit surprised by how it all came together.

I'm more of a product and GTM guy, often dabbling in code for specific problems or client projects. I have Xcode installed, sure, but mainly because I need it to test stuff. Most of my time is spent in other languages and ecosystems. But last week, something shifted. Maybe it was frustration with the photo management apps, or maybe it was just curiosity, but I found myself thinking: "How hard could it be to build a simple iOS app?" Turns out, the answer is both "harder than I thought" and "easier than I expected.

What started as a casual exploration turned into an intense three-day journey. My goal was modest: to build something that could help manage photos, find duplicates, and allow for swiping and deleting pictures. The process became an interesting dance between Cursor, me, and Xcode. I'd start with Cursor, bouncing ideas back and forth, getting boilerplate code and structure suggestions. Then I'd take those code snippets into Xcode, and extend. This became my rhythm: AI and I would collaborate, then I'll validate, debug, and research. It's slower than just "vibe-coding" but faster than learning Swift from scratch in the traditional way. Each error message became a mini-lesson. Each successful compilation felt like a small victory.

One thing that struck me immediately was how much iOS offers out of the box. The native libraries, the APIs -- there's so much functionality just waiting to be plugged in. Coming from other platforms, this felt almost too easy. However, I'd then encounter something iOS-specific -- like code signing, target management, or deployment configurations -- and be reminded that every platform has its learning curve. These weren't coding problems; they were ecosystem challenges. Honestly, AI (Gemini) proved invaluable here too, guiding me through setup steps that would have taken hours to decipher from documentation alone.

Not everything went smoothly. Two days into the project, I discovered an interesting quirk with Apple's CLGeocoder, which I was using for a "places" feature in my photo manager. If a device or network is detected as China-based, it switches to using Autonavi and will only reverse geocode locations within China. This presented a problem for me (and will also affect users in China). The solution required building a fallback system: catching the specific error code and then switching to another reverse geocoding service for international locations. These kinds of edge cases made the whole process more enjoyable.

While building, I kept thinking about the existing apps in this space. Most photo management utilities (similar to what I'm building) charge weekly or monthly subscriptions for what are essentially straightforward operations. I've seen apps charging $5-10 per month for bulk deletion and duplicate detection -- something that, once you understand the APIs, isn't particularly complex to implement. This bothered me, not because these developers don't deserve to make money, but because the pricing models feel disconnected from the actual value delivered. Why should de-cluttering Photos cost $59 to $99 per year? I'm planning to charge once, maybe $2.99, and call it done. No subscriptions, no freemium tricks, no dark patterns. Just a tool that does what it says, priced fairly.

The more I researched this space, the more I noticed the marketing patterns. There's a whole ecosystem of companies (many of them China-based, from what I could tell based on my experience working with Chinese teams) that seem to follow the same playbook: develop a bunch of new utility apps each year, create flashy ads with foreign actors, spend heavily on Meta advertising, and charge subscription fees that seem designed more for recurring revenue than fair pricing. I've seen these ads -- they're often borderline ridiculous, but they work. They grab attention, create curiosity, and drive downloads. As someone with a marketing background, I can appreciate the strategy even if I don't love the execution. However, I don't have a marketing budget, and I'm not interested in that approach anyway. My app will have to succeed on its own merits.

Using AI for coding has offered significant insights. It's not that AI always writes perfect code -- it doesn't. What it does is help you iterate faster and learn from your mistakes more quickly. When I get stuck on a concept, I can explain what I'm trying to accomplish and receive three different approaches to consider. When I encounter an error, I can paste it in and gain context about what might be going wrong. When I want to understand iOS design patterns, I can have a conversation rather than reading through dense documentation. However, there are limits. For anything involving user authentication or sensitive data, I won't use agentic AI. I know enough to understand the limitations of AI when it comes to coding, and AI-generated security code feels risky if you're not experienced enough to audit it properly.

One pleasant surprise has been the app's performance. The WIP app doesn't use a lot of RAM during normal operation. CPU usage spikes only when scanning for duplicates -- which makes sense since it's processing potentially thousands of images -- but even then, it's manageable. I've been monitoring these metrics and threads obsessively, partly because I can (Xcode makes it easy) and partly because I want to understand the impact of my code choices.

I'm about 90% done, I think. The core functionality works, but I want to polish the user experience. I haven't paid for the Apple Developer Program yet. The whole experience has made me wonder why I waited so long to try iOS development. Sure, there's a learning curve, but it's not insurmountable, especially with AI as a learning partner.

This project started as a matter of curiosity and turned into something that might actually help people. A few years ago, building an iOS app as a non-iOS developer would have meant weeks of setup, configuration, and concept learning. Today, with the right tools and a willingness to iterate, you can have something working in days.

联系我们 contact @ memedata.com