|
maxuser
Newbie
Offline
Activity: 27
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 31, 2014, 10:05:24 PM |
|
It looks good. But I wonder why you are using Yahoo's YQL since you just need to add cors=true at the end of yours Blockchain.info's query? see: https://blockchain.info/api/blockchain_api CORS headers. The rawaddr, latestblock, unspent, and pushtx APIs are all supported by that.
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 31, 2014, 10:25:48 PM |
|
It looks good. But I wonder why you are using Yahoo's YQL since you just need to add cors=true at the end of yours Blockchain.info's query? see: https://blockchain.info/api/blockchain_api CORS headers. The rawaddr, latestblock, unspent, and pushtx APIs are all supported by that. Thanks! I tried using CORS (see here https://bitcointalk.org/index.php?topic=168010.msg5582563#msg5582563), but I couldn't get the response to include the CORS header back. For example, this should come back with a "Access-Control-Allow-Origin" header: curl -v -H "Origin: https://btc.coinpocketapp.com" \ -H "Access-Control-Request-Method: GET" \ -H "Access-Control-Request-Headers: X-Requested-With" \ -X GET \ "https://blockchain.info/rawaddr/1HeGkvDja9GYJcKFgTpNs4LALYFkRd4bWF?cors=true"
Either I'm doing something wrong, or their API doesn't actually support CORS for the endpoints that I need.
|
|
|
|
maxuser
Newbie
Offline
Activity: 27
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 01, 2014, 12:40:27 AM |
|
curl -v -H "Origin: https://btc.coinpocketapp.com" \ -H "Access-Control-Request-Method: GET" \ -H "Access-Control-Request-Headers: X-Requested-With" \ -X GET \ "https://blockchain.info/multiaddr?active=1HeGkvDja9GYJcKFgTpNs4LALYFkRd4bWF&cors=true"
Use multiaddr instead of rawaddr (it return additional data but all is there in the "wallet" hash).
|
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/exclamation.gif) |
April 05, 2014, 05:29:40 PM |
|
TL;DR Don't update iOS if you're using Coin Pocket from mobile safari. Wait until the next version of Coin Pocket.
After experimenting with localStorage I found an issue that leads to data loss on iOS.
If you update your iOS to a new version (for example, to the latest 7.1), then your Coin Pocket data in mobile safari will be deleted. If you use Coin Pocket from a web clip on the home screen, the data is safe after updating iOS.
I'm investigating ways to prevent data loss. I didn't want to expose the private key to the user because that adds another way for it to get it stolen, but I may add a backup/restore feature. I may also look into Javascript Database instead of localStorage to see if it is more persistent.
This IS pre-release software, so I don't expect that this has affected anyone, but I'm putting this message out there just in case.
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 06, 2014, 01:09:57 AM |
|
Re: Data loss on iOS You can restore from an iTunes or iCloud backup to get the data back. Restoring from backup: http://support.apple.com/kb/ht1766
|
|
|
|
christianlundkvist
Newbie
Offline
Activity: 13
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 01:50:33 PM |
|
Hi enriquez! Your app looks really slick, and I also like how it interacts with your QR code app. You say that the Scan Code app has the ability to interact with other apps through a URL scheme, and in your video it looks like when you scan the QR code it jumps directly to safari and your HTML5 app. I downloaded the app but I can't find anywhere to set up the URL scheme, not in the app itself and also not in the main iPhone Settings. How would I set it up? The reason I'm asking is I've created my own minimalist wallet Bitcoinista that can run inside a Python sandbox in iOS. The wallet can send coins based on a bitcoin URI copied from a QR code app, but it would be awesome if I can use your app to launch Bitcoinista directly after scanning the QR code! ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Cheers, Christian
|
|
|
|
BitCoinDream
Legendary
Offline
Activity: 2366
Merit: 1204
The revolution will be digital
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 02:17:48 PM |
|
Hey, Mike ...nice app. Can u plz tell me, how come one person get to know the private key of his wallet from this app ?
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 03:24:58 PM |
|
Hey, Mike ...nice app. Can u plz tell me, how come one person get to know the private key of his wallet from this app ?
Hi. Thanks. There's no interface for the user to get their private key. Backups are done by backing up the device. Moving to another wallet is done by sending the Bitcoin.
|
|
|
|
BitCoinDream
Legendary
Offline
Activity: 2366
Merit: 1204
The revolution will be digital
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 03:58:04 PM |
|
Hey, Mike ...nice app. Can u plz tell me, how come one person get to know the private key of his wallet from this app ?
Hi. Thanks. There's no interface for the user to get their private key. Backups are done by backing up the device. Moving to another wallet is done by sending the Bitcoin. I guess, u may re-think this part. In general a bitcoiner does not own his coins, unless he owns the private key. Your project seems promising ...So I'm suggesting.
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 04:40:35 PM |
|
I guess, u may re-think this part. In general a bitcoiner does not own his coins, unless he owns the private key. Your project seems promising ...So I'm suggesting.
Thanks for the suggestion. Not giving the user direct access to their private key was a conscious decision. I simply don't trust the user to be able to keep their private key safe outside of Coin Pocket and their device backups. They can do everything they need to do without seeing their private key. They can continue to use Coin Pocket and send transactions even if the server goes offline. Coin Pocket is meant to be easy to use, so there aren't a lot of advanced features.
|
|
|
|
christianlundkvist
Newbie
Offline
Activity: 13
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 05:34:46 PM |
|
Hi again, about the Scan Code app: From looking at the github code for coin pocket I was able to figure out that you're using an x-callback-url scheme, and I managed to use a URL like this 'scancode://scan?callback=myapp://' to go from MyApp to Scan Code and then back again to MyApp after it scans. It seems you also have a field scancode-callback-path. Is this to get back the results of the scan? Would I use a URL like 'scancode://scan?callback=myapp://arg=scancode-callback-path' or something like that to get the result of the scan into MyApp? Is there some documentation of the URL scheme somewhere? Thanks again, Christian
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 06:07:11 PM |
|
Hey Christian, There are no docs, and it isn't using x-callback-url. I didn't know about that spec when I did Scan Code. Maybe for a future update... You have the right URL to launch Scan Code. scancode://scan?callback=myapp://some.callback/url/path
Scan Code will open the callback url while appending a `code` param myapp://some.callback/url/path?code=urlEncodedQrCodeData
Your app can then parse the query string for the `code` param. I don't know how flexible Pythonista is, but you would need to hook into the AppDelegate's `application:openURL:sourceApplication:annotation`. Let me know how it works out for you!
|
|
|
|
christianlundkvist
Newbie
Offline
Activity: 13
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 07:17:00 PM |
|
Hi again,
Thanks for the info! It's clearer now what's going on. I guess I misunderstood what x-callback-url is, I thought it was what allows you to send these url callback type messages between apps in the first place, but apparently it's more of a standard for how to format these messages in a uniform way. I need to read up a bit on the Pythonista URL scheme to see if I can parse out the ?code=XXX in a good way.
Cheers, Christian
|
|
|
|
R2D221
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 10:23:02 PM |
|
Is this app iOS-specific? I tried using it on Windows Phone, but it gives me an error about a secure random number generator nor being present.
|
An economy based on endless growth is unsustainable.
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 04, 2014, 10:51:19 PM |
|
Is this app iOS-specific? I tried using it on Windows Phone, but it gives me an error about a secure random number generator nor being present.
Coin Pocket is not iOS specific, but it does have some browser requirements including a secure random number generator. The browser on a Windows Phone may have one that is compatible, but I'll have to research and test it out.
|
|
|
|
christianlundkvist
Newbie
Offline
Activity: 13
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2014, 05:01:46 AM |
|
I looked into the Pythonista URL scheme and it looks like the only supported use cases are things like pythonista://MyScript?action=run
and pythonista://MyScript?action=run&argv=myargs
so it doesn't really look like it can pick up the ?code=xxx flag. No big deal though, it's still my favorite scan app, the one-click copy to clipboard is great! ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
minimalB
Donator
Hero Member
Offline
Activity: 674
Merit: 522
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2014, 12:21:54 PM |
|
Is there a particular reason why your QR scanner works only with iOS7+?
|
|
|
|
enriquez (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2014, 08:54:07 PM |
|
Is there a particular reason why your QR scanner works only with iOS7+?
iOS 7 is the current version of iOS. Most users have it already, and it's a free update. I'd recommend updating iOS if you do anything with Bitcoin. There are known vulnerabilities in older versions.
|
|
|
|
|