realm-swift: Core occasionally cannot be downloaded from China
We’ve had several reports from users in China who sometimes cannot download Realm’s core.
Realm hosts its core binaries in an AWS S3 bucket, available through Cloudflare via our static.realm.io domain. You’re affected by this issue if those services are operational, you have a good internet connection, you’re in mainland China and you’re still getting the following error: Downloading core failed. Please try again once you have an Internet connection..
We’re working with Cloudflare to improve our availability in China and will update this issue when we have more to announce.
In the meantime, please use a VPN or a prebuilt version of Realm available through our GitHub releases: https://github.com/realm/realm-cocoa/releases.
Thanks for your patience.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (5 by maintainers)
After Realm 2.0.x you’d want to download
realm-sync-cocoa-${REALM_SYNC_VERSION}.tar.xzfromhttps://static.realm.io/downloads/sync/realm-sync-cocoa-${REALM_SYNC_VERSION}.tar.xzinto${TMPDIR}/sync_bin, whereREALM_SYNC_VERSIONcan be found at https://github.com/realm/realm-cocoa/blob/master/dependencies.list#L3 (currently1.0.0-BETA-3.3), andTMPDIRshould hopefully already be set in your shell environment (usegetconf DARWIN_USER_TEMP_DIRif it’s not).Whenever the first download via CocoaPods has failed, the cache could be in a corrupt state. It might help in such cases to remove Realm from the CocoaPods cache, what can be achieved by running the following command:
In addition, the integration in the project should be reset.
After that and ensuring that you’ve a working internet connection without restrictions, you can run the following:
@madawei2699 says the correct answer. I am also a developer in China.The solution is download
realm-core-XXX.tar.bz2and copy it into/tmp/ dir. So I suggested the maintainer to list the download url of each realm version.I am in china and has the same problem when I use VPN. The core realm package is 63MB, that is so big and the VPN is hard to download it. By looking the build.sh of realm, it use
getconf DARWIN_USER_TEMP_DIR1to get the tmp direction and check the$TMPDIR, if it has thecore-${REALM_CORE_VERSION}.tar.bz2. So I download thehttps://static.realm.io/downloads/core/realm-core-0.97.1.tar.bz2by VPN and move it to$TMPDIR, then you canpod install.Wish you fix this issue ASAP. Too many developer in China work without VPN.
I have the same problem even I use VPN and I solved it by downloading the dependence manually. In conclusion, you should download realm-core-XXX.tar.xz and realm-sync-cocoa-${REALM_SYNC_VERSION}.tar.xz, then put them into $TMPDIR/core/ and $TMPDIR/sync respectively.
I am not in China, and I am having lots of trouble installing realm. Here is the relevant bit from the “pod install verbose” output: -> Installing Realm (2.1.1)
wtf is going on??
This is ridiculous, if the developers from China needs to download the zipped file to local temp directory to let cocoapods to detect it, why not just download the dylib/static framework and add the dependency to project manually directly?
All the pods just pass except the realm-cocoa for command
pod install, cocoapods brings the conveniences for developers to manage the 3rd-party packages and easy integration way. If the realm team won’t support it, the China developer should switch to manual way w/o any hesitation to use it.BTW, that would be so nice to write a note/tips in README.md file in github and realm.io/docs, since this issue has blocked so many developers. @realm-admin
BTW, I’m a developer from China. Many thanks for your great job!
@Onetaway You can find the download url in https://github.com/realm/realm-cocoa/blob/master/build.sh#L289 which is the value of
CORE_URL