Simon Willison’s Weblog

Subscribe
Atom feed for ios

21 items tagged “ios”

2024

What’s New In Python 3.13. It's Python 3.13 release day today. The big signature features are a better REPL with improved error messages, an option to run Python without the GIL and the beginnings of the new JIT. Here are some of the smaller highlights I spotted while perusing the release notes.

iOS and Android are both now Tier 3 supported platforms, thanks to the efforts of Russell Keith-Magee and the Beeware project. Tier 3 means "must have a reliable buildbot" but "failures on these platforms do not block a release". This is still a really big deal for Python as a mobile development platform.

There's a whole bunch of smaller stuff relevant to SQLite.

Python's dbm module has long provided a disk-backed key-value store against multiple different backends. 3.13 introduces a new backend based on SQLite, and makes it the default.

>>> import dbm
>>> db = dbm.open("/tmp/hi", "c")
>>> db["hi"] = 1

The "c" option means "Open database for reading and writing, creating it if it doesn’t exist".

After running the above, /tmp/hi was a SQLite database containing the following data:

sqlite3 /tmp/hi .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE Dict (
    key BLOB UNIQUE NOT NULL,
    value BLOB NOT NULL
  );
INSERT INTO Dict VALUES(X'6869',X'31');
COMMIT;

The dbm.open() function can detect which type of storage is being referenced. I found the implementation for that in the whichdb(filename) function.

I was hopeful that this change would mean Python 3.13 deployments would be guaranteed to ship with a more recent SQLite... but it turns out 3.15.2 is from November 2016 so still quite old:

SQLite 3.15.2 or newer is required to build the sqlite3 extension module. (Contributed by Erlend Aasland in gh-105875.)

The conn.iterdump() SQLite method now accepts an optional filter= keyword argument taking a LIKE pattern for the tables that you want to dump. I found the implementation for that here.

And one last change which caught my eye because I could imagine having code that might need to be updated to reflect the new behaviour:

pathlib.Path.glob() and rglob() now return both files and directories if a pattern that ends with "**" is given, rather than directories only. Add a trailing slash to keep the previous behavior and only match directories.

With the release of Python 3.13, Python 3.8 is officially end-of-life. Łukasz Langa:

If you're still a user of Python 3.8, I don't blame you, it's a lovely version. But it's time to move on to newer, greater things. Whether it's typing generics in built-in collections, pattern matching, except*, low-impact monitoring, or a new pink REPL, I'm sure you'll find your favorite new feature in one of the versions we still support. So upgrade today!

# 7th October 2024, 7:36 pm / android, mobile, python, russell-keith-magee, sqlite, ios, lukasz-langa, beeware

A look at Apple’s new Transformer-powered predictive text model. Jack Cook reverse engineered the tiny LLM used for the predictive text keyboard in the latest iOS. It appears to be a GPT-2 style custom model with 34M parameters and a 15,000 token vocabulary.

# 3rd June 2024, 12:23 pm / apple, ios, ai, generative-ai, llms

PEP 738 – Adding Android as a supported platform (via) The BeeWare project got PEP 730—Adding iOS as a supported platform—accepted by the Python Steering Council in December, now it’s Android’s turn. Both iOS and Android will be supported platforms for CPython 3.13.

It’s been possible to run custom compiled Python builds on those platforms for years, but official support means that they’ll be included in Python’s own CI and release process.

# 1st April 2024, 11:57 pm / android, python, ios, beeware

iOS 17.4 Introduces Alternative App Marketplaces With No Commission in EU. The most exciting detail tucked away in this story about new EU policies from iOS 17.4 onwards: “Apple is giving app developers in the EU access to NFC and allowing for alternative browser engines, so WebKit will not be required for third-party browser apps.”

Finally, browser engine competition on iOS! I really hope this results in a future worldwide policy allowing such engines.

# 25th January 2024, 8:19 pm / apple, browsers, eu, ios

2023

iSH: The Linux shell for iOS (via) Installing this iOS app gives you a full Linux shell environment running on your phone, using a “usermode x86 emulator”. You can even install packages: “apk add python3” gave me a working Python 3.9 interpreter, installed from the apk.ish.app repository.

I didn’t think this kind of thing was allowed by the App Store, but that’s not been the case for a few years now: Section 4.5.2 of the App Store guidelines clarifies that “Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes.”

# 31st December 2023, 4:20 am / appstore, emulator, linux, python, ios

Web Push for Web Apps on iOS and iPadOS. iOS and iPadOS 16.4 beta 1 finally brings web push notifications to iOS. User’s need to add an app to their home screen and then approve notification access to get this functionality, which also includes the ability for apps to update a badge on their icon. Thankfully you don’t need paid membership of the Apple Developer Program ($99/year) in order to send notifications.

# 17th February 2023, 12:28 am / safari, ios

2022

Supporting logical properties. A frustrating reminder from Jeremy Keith that Safari is not an evergreen browser: older iOS devices (1st gen iPad Air for example) get stuck on the last iOS version that supports them, which also sticks them with an old version of Safari, which means they will never get support for newer CSS properties such as inline-start and block-end. Jeremy shows how to use the @supports rule to hide this new syntax from those older browsers.

# 1st October 2022, 1:03 am / css, jeremy-keith, safari, web-standards, ios

WebAIM guide to using iOS VoiceOver to evaluate web accessibility (via) I asked for pointers on learning to use VoiceOver on my iPhone for accessibility testing today and Matt Hobbs pointed me to this tutorial from the WebAIM group at Utah State University.

# 24th April 2022, 7:35 pm / accessibility, screenreaders, ios

2018

Charles Proxy now available on iOS (via) I didn’t think this was possible, but the Charles debugging proxy is now available for iOS. It works by setting itself up as a VPN such that all app traffic runs through it. You can also optionally turn on SSL decryption for specific hosts by installing a special certificate (which involves jumping through several hoops). It won’t work for apps that implement SSL certificate pinning but from playing with it for a few minutes it looks like most apps haven’t done that, even apps from Google. Well worth $8.99.

# 28th March 2018, 3:57 pm / charles, proxy, ios

Real-time photogrammetry with #ARKit. Astonishing photogrammetry demo by Tim Field using ARKit in iOS 11.3.

# 10th March 2018, 10:32 am / augmentedreality, ios

2013

I’m a developer, I’ve an idea, how to look for funding?

If you only need $10,000-$15,000 you should be looking at funding it yourself—professional investors very rarely get involved for that size of raise, and you probably wouldn’t want them to—giving up equity in exchange for so little money is usually a bad idea.

[... 90 words]

How can I produce an animated prototype out of designs for an iOS app?

Keynote is a surprisingly good tool for this kind of things, especially since they added path based animations to it a few years ago.

[... 55 words]

Are there any websites, forums, or blogposts that discuss startups’ technology stacks or IT infrastructure?

The website www.highscalability.com has a good collection of articles on this topic (case studies about specific startup’s technology stacks) stretching back several years.

[... 45 words]

Does the Quora iOS app allow one to give “Thanks?”

I’d really like to be able to do this—could there be room for it in the little cog menu, next to “promote”?

[... 40 words]

2012

I’m a young contract/indie iOS Dev being pitched full time positions, what should I watch out for?

A great rule of thumb for deciding where to work is that you should aim to maximise the amount you are learning. If you’re the smartest person in the room, find another room. It sounds like you’re making decent money, but it might be that you’re hitting the limits of what you can teach yourself working on client projects. If that’s the case, find a company with people so smart it makes you feel like in idiot and try to get a job there.

[... 107 words]

What is the optimal description length in the Apple App Store?

Have you ever come across one if those ugly, long pages advertising an ebook—the ones that bang on for dozens of paragraphs with bullet points, pictures, testimonials, headings, more testimonials, more bullet points and so on?

[... 106 words]

Does Facebook’s iPhone app use a proprietary web rendering engine instead of UIWebView?

I did my first bit of iPhone development recently (building the first version of the Lanyrd iPhone app) and there was one thing that came as a huge surprise: the principle reason that people think native apps are “snappier” or “more responsive” than native ones has nothing to do with the rendering performance of a webview vs a native view (especially on the iPhone 4S which is extremely fast).

[... 274 words]

2011

Are there any Meta APIs?

Embed.ly is a good example of this kind of API—it gives you one endpoint which wraps oembed APIs on dozens of other services (plus a bunch of custom scraping code). We use it as part of our video/slide embedding feature on http://lanyrd.com/

Visualizing WebKit’s hardware acceleration. Command line flags for launching Safari (and the iOS simulator) in a way that highlights areas of the screen that are being hardware accelerated—particularly useful if you are using the “-webkit-transform: translate3d(0,0,0)” trick.

# 27th June 2011, 10:31 am / css, safari, webkit, ios, recovered

2010

Did Apple always plan the (native) App Store, or was it released in response to developer demand?

Personally I’ve always assumed that native apps / the App Store was planned from the start, and the “build apps with HTML” thing Steve Jobs originally promoted was intended as a stop-gap measure (and also to mislead the competition). It’s hard for me to believe that a multi-billion dollar marketplace was accidentally created because developers demanded the ability to create native apps. Also, the quality of the APIs discovered by people who jail broke the iPhone suggests to me that a public API was planned from the start.

[... 111 words]

Audio Sprites (and fixes for iOS). Remy Sharp on the limitations of HTML5 audio support in iOS.

# 23rd December 2010, 8:04 pm / audio, html5, ios, recovered, remysharp