matchstic / infostats2 Goto Github PK
View Code? Open in Web Editor NEWAn API for JavaScript, and Objective-C
License: BSD 2-Clause "Simplified" License
An API for JavaScript, and Objective-C
License: BSD 2-Clause "Simplified" License
The updating of widgets for the elapsed time still isn't right. The hook utilised doesn't seem to fire as expected, and instead is only called when an app starts playing media for the first time.
It may be better to simply move to a small timer in IS2Media internally that will trigger needed callbacks every half-second or so when media is playing.
test iphone6 ios9.3.3
iOS8 [[SBClockDataProvider sharedInstance] _scheduledNotifications]
iOS9 [[SBClockNotificationManager sharedInstance] scheduledLocalNotifications]
Possible different formats
Day, Time, Ante Meridiem/Post Meridiem (if 12hr):
Tue 9:30PM
Day, Time:
Tue 9:30
Time:
9:30
Time, Ante Meridiem/Post Meridiem (if 12hr):
9:30PM
Some users are reporting that Weather and Calendar data are not loading correctly on iOS 10:
I propose to move away from WebCycript being utilised as an underlying dependancy for access to InfoStats 2 in widgets. This will remove the wait for fixes to WebCycript (if required) between iOS versions, and will serve to consolidate InfoStats 2 into a self-contained package.
To achieve this:
Other benefits include code usually accessed via Cycript now runs outside JavaScript's environment, meaning speed improvements, and significant reliability/stability improvements.
For (1) I propose a simple extension to JavaScript, which will simply expose global variables with the namespace of the class names within InfoStats 2, such as IS2Weather.(method), IS2Location.(method) and so forth. Existing classes within SpringBoard can be accessed via another global variable with the namespace of SpringBoard.(class).(method).
This can be achieved in a similar manner to XWebView, which may be used as a basis.
For (2) I propose "compiling" from Cycript code into this new "IS2Script", using the form:
var thing = [IS2Weather doThing]; // existing
var thing = IS2Weather.doThing(); // new
var anotherThing = [[SBExampleClass sharedInstance] anotherThing]; // existing
var anotherThing = SpringBoard.SBExampleClass.sharedInstance().anotherThing(); // new
var object = [SBExampleClass sharedInstance]; // existing
var object = SpringBoard.SBExampleClass.sharedInstance(); // new
var thingWithObject = [object anotherThing]; // existing
var thingWithObject = object.anotherThing(); // new
This will utilise at minimum a deterministic finite automata, and will interpose the loading of web pages into both UIWebView and WKWebView. I also propose the addition of pre-processor flags to this compiler, which will be in the form of a comment within a <script> tag or a .js file, like so:
//@IS2: (flag here)
e.g.
//@IS2: no-compile
The handling of callback blocks will be an interesting conundrum, which some research required to best handle them. My current approach is to give them the form of:
IS2Weather.registerForWeatherUpdatesWithIdentifier:andCallback("identifier", function() {
// Callback block.
});
As you can see above, the handling of parameters not at the end of the method will also change. To compare, here is the current version of the above function:
[IS2Weather registerForWeatherUpdatesWithIdentifier:"identifier" andCallback: ^ (void) {
// Callback block.
}];
Please feel free to comment on this summary with suggestions and improvements.
I am using a widget that does not use weather, however infostats2 drains the majority of my battery. 8% infostats2d and 6% for itβs weather tracker.
Wish the dev was able to fix this issue.
Due to the way Yalu is implemented for 10.1.1. users, IS2's daemon doesn't load correctly after a boot. For now, an alert to the user when this occurs will have to suffice as a "fix".
Code:
try{
storage.phoneSignalBars = [IS2Telephony phoneSignalBars];
}catch(err) {
alert(err);
}
Resulting error message: 'this call must be made on the main thread'
Device: iPhone 6 jailbroken on 9.3.3
Stock apps such as [IS2Notifications notificationsJSONForApplication:@"" + "com.apple.mobilemail"] works fine but when using "com.facebook.Facebook" or other 3rd party bundleID's the array fails to populate.
Allow the user to both retrieve a list of calendars available to the device, and specify which ones to pull data from, rather than all at once.
I notice many blocks being called multiple times in the same widget. This cause a big performance hit when the block calls an outside function. I dunno why, but if I call a function outside of the callback block, from the block and it is intensive, (such as a forecast loop) it could cause a safemode. For this i've been staying away from registering identifiers.
That being said It would be nice to see which identifiers are registered. Also a log when an identifier is registered/unregistered would be great to see. I've found through testing that body onunload is not very reliable, it would be good to see if things are working properly through the console.
Initial reports show that IS2 on iOS 10 is leading to significant battery drainage.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.