Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Is possible to switch server on today extension? #21

Closed
zttt opened this issue Jan 16, 2015 · 6 comments
Closed

Is possible to switch server on today extension? #21

zttt opened this issue Jan 16, 2015 · 6 comments
Milestone

Comments

@zttt
Copy link

zttt commented Jan 16, 2015

I tried to access the vpn array from today extension,
var vpns = VPNDataManager.sharedManager.allVPN()

It crashed at first, then I check the TodayWidget target, it stopped crashing, instead, it gave me an empty array.

Is there any way we can access those data and set the active server from Today Extension?

@lexrus
Copy link
Owner

lexrus commented Jan 17, 2015

The CoreData is stored in the container App, it's not directly available in the extension App.
It's a little complicated to share the CoreData, I gonna implement it sooner or later.

@lexrus lexrus added this to the 0.3 milestone Jan 17, 2015
@lexrus lexrus added ui and removed help wanted labels Jan 17, 2015
@lexrus
Copy link
Owner

lexrus commented Jan 19, 2015

@zttt Please checkout the latest source code. I've migrated the CoreData into shared container so that allVPN() is now functional in widget.

@lexrus lexrus modified the milestones: 0.4, 0.3 Jan 19, 2015
@lexrus
Copy link
Owner

lexrus commented Jan 19, 2015

In order to display a list or whatever which presents the VPNs, the UI should be carefully designed to match the consistency style of Notification Center. I'd prefer to draw a prototype before coding. Do you have any idea about the UI?

@zttt
Copy link
Author

zttt commented Jan 20, 2015

Thanks for the update. It works perfect now.

About the UI, I think a collection view is better than a list. Maybe use flags of different country(base on the server IP) to represent VPNs?

@lexrus
Copy link
Owner

lexrus commented Jan 20, 2015

Yes, that's what I expected. Furthermore, there should be title labels above or behind each flag in order to indicate different servers in the same country.
First of all, #9 must be done.

@lexrus lexrus modified the milestones: 0.5, 0.4 Jan 29, 2015
@lexrus lexrus modified the milestones: 0.6, 0.5 Feb 11, 2015
@lexrus
Copy link
Owner

lexrus commented Mar 8, 2015

img_1219

Done.

@lexrus lexrus closed this as completed Mar 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants