These are chat archives for nightscout/ios

10th
Dec 2017
Cathje
@Cathje
Dec 10 2017 00:00
HI all, I'm trying to develop a react-native app that works on ios and reads blucon (freestyle libre) data and uploads it to the nightscout site. I'm already able to read previously inputted entries (with an android app) from the NS API. However, posting entries gives me a network failed due to 'unauthorized' and no 'Access-Control-Allow-Origin'-error. I created a device-upload role. I added the same permissions as the rig and used the generated accesstoken from the admin page in the network call (https://mysite.herokuapp.com/api/v1/entries.json?token=iosupload-123456789012. I also added cors to the enable config variable of heroku and cors_allow_origin to *. Am I still missing something ? Or does anyone has an example on how to do a fetch to an authorize-protected call?
Miguel Kennedy
@miguelkennedy
Dec 10 2017 00:06
@Cathje don't know if you're aware but there's already an app for iOS that reads blucon and uploads to nightscout https://github.com/JohanDegraeve/iosxdripreader
Cathje
@Cathje
Dec 10 2017 10:47
Thank you very much for the quick answer. I tried that one 2 days ago and although I have a developers account in ios and I could upload the ipa file to my phone, It gave a general error message that the app could not be installed. Since the error message is so general, I had no idea where to look. I tried a different developer account, different certificate, ... but no luck. So , since I'm a developer myself , I had hoped to write the app in a technology I know and add features along the way. If I could just get already the values in the nightscout site.. then I'm up and running for the first part of the loop.
Miguel Kennedy
@miguelkennedy
Dec 10 2017 11:01
@Cathje that's a problem with the signing of the ipa... you can join https://gitter.im/nightscout/iosxdripreader and I'm sure someone will help you out with the signing
Cathje
@Cathje
Dec 10 2017 12:21
@miguelkennedy : Thanks. I'll try that.