Exponent SDK v13.0.0 is now available
Exponent SDK 13.0.0 is based on the recently released React Native
0.40.0 (“December”). This is a jump of 3 versions of React Native; Exponent
SDK 12.0.0 was based off of 0.37.0. See the release notes for 0.38.0, 0.39.0, and 0.40.0 for a comprehensive list of changes in React Native. 0.40.0 was a painful update for people who use React Native without Exponent because of a bunch of breaking changes on the native side, but with Exponent it’s easy because we took care of all of that for you :)
This release doesn’t include as many new APIs as usual, you can kind of think of it like the macOS 10.6 “Snow Leopard” update — it has a lot of under the hood changes that will make your experience subtly better and pave the way for other more visible features.
New user account system
We managed to get by for over a year on a simple user account system that was written by Charlie in a couple of hours, almost without touching it at all. With some exciting new projects coming up, it will be important for us to have an identity system that allows us to link your account to XDE, our mobile app, our web app, and other services. From your point of view right now, the only real change is that you will be prompted for your e-mail address, and the XDE UI will look a bit different — we finally have a ‘forgot password’ form and authentication via Github. But within the coming months you’ll start to see more and more integration of your account into our existing and new services to make your life within the Exponent ecosystem that much easier.
ExponentKit is ready for public alpha
After months of hard work, ExponentKit is now ready for alpha testing. ExponentKit is a library that lets you include your Exponent project as part of a larger standard native project, one that you would create using Xcode or Android Studio. One way to use ExponentKit is with exp detach
— when you run it on your existing Exponent project, it generates iOS and Android project files with ExponentKit installed, so you can add Objective-C / Swift or Java code (for example, native modules with react-native link
) and change any native configuration directly, rather than through exp.json
. Be sure to heed the following warning from the documentation!
Warning: We discourage most of our developers from taking this route [using detach], as we believe almost everything you need to do is better accomplished in a cross-platform way with JS.
Writing in JS enables you to best take advantage of over-the-air code deployment and benefit from ongoing updates and support from Exponent. You should only do this [use detach] if you have a particular demand from native code which Exponent won’t do a good job supporting, such as (for example) specialized CPU-intensive video processing that must happen locally on the device.
Give the documentation a read, try it out if it interests you, and let us know what you think on Slack.
Exponent SDK
Fix a bug with local notifications on Android
dismissAllNotifications
was not working as expected, this has been resolved.
Once again improved error message for Font loading
We found that developers frequently had a hard time using Font.loadAsync
, and the main reason was that they would not wait for the promise that Font.loadAsync
returns to be resolved before trying to use the fontFamily
on a Text
component. So we added a specific error to explain the situation.
Add QR Code Support
Love them or hate them, QR codes exist and can sometimes even be useful. You can start your app with exp start --qr
and scan it with the Exponent client to open your apps.
ExponentUtil.reload() will now update JS bundle if necessary
You can build your own API on top of this to handle updating your app for users while they are using it.
Change image URL properties to support local assets in exp.json
You no longer need to upload the images to a server of your own, instead you can specify the path within your project for loading.icon
, loading.backgroundImage
, notification.icon
, and just icon
, and Exponent will upload the images to a CDN for you. (exp.json API docs)
Add privacy property exp.json
The privacy
property can be either "public"
or "unlisted"
— currently this has no impact on your app, it is groundwork for some upcoming Exponent features. The default value if not specified is "unlisted"
. (API docs)
Assorted bug fixes on iOS: fonts and location
- Fix issue with fonts not updating if you change the file but keep the same file name. (Commit)
- Fix first location update not firing after location permission granted. (Commit)
EXGL is now compatible with gl-react
- Implement
gl.copyTexImage2D
and several other functions, now it is possible to usegl-react
withEXGL
thanks to some hard work by Gaëtan 👏
Updated react-native-svg and react-native-maps to latest
- No breaking changes.
Breaking changes in SDK v13.0.0
- No breaking changes the
exponent
package. - In
exp.json
:
-iconUrl
is nowicon
. - Several breaking changes in
react-native:
-keyboardShouldPersistTaps={true}
is nowkeyboardShouldPersistTaps="always"
(see API docs for the prop).
Upgrading your app to Exponent SDK v13.0.0 from v12.0.0
- Close XDE or your
exp
CLI server - In
exp.json
, changesdkVersion
to"13.0.0"
- In
package.json
:
- changereact-native
version to"https://github.com/exponent/react-native/archive/sdk-13.0.3.tar.gz"
- changereact
version to"~15.4.0"
- changeexponent
version to"^13.1.0"
- delete your project’snode_modules
directory and runnpm install
again. - Re-open XDE or
exp
and start your project oncenpm install
from the previous step has completed. - Update the Exponent app on your phones from the App Store / Play Store. XDE and
exp
will automatically update your apps in simulators. - Pass over the list of Breaking changes above to see if your app is impacted, and fix them if so.