artsabintsev / siren Goto Github PK
View Code? Open in Web Editor NEWNotify users when a new version of your app is available and prompt them to upgrade.
Home Page: http://sabintsev.com/
License: MIT License
Notify users when a new version of your app is available and prompt them to upgrade.
Home Page: http://sabintsev.com/
License: MIT License
Compiler error on Xcode 6.1.1 in Siren.swift line 319
Subject says it all.
Just discover that Siren 1.0.0 doesn't support iOS8.0 anymore, is there a technical reason for that?
I know Apple suggests to support only the last two major version, but it would be great to have at least one release supporting Swift 3 and iOS8 for all the developers that can't drop that version yet ๐ผ
Hi,
when I try to use Siren in my app, I get SSL errors on startup:
CFNetwork SSLHandshake failed (-9801)
CFNetwork SSLHandshake failed (-9801)
CFNetwork SSLHandshake failed (-9801)
CFNetwork SSLHandshake failed (-9801)
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)
Do I have to add a URL to my App Transport Security exceptions for Siren to work?
let siren = Siren.sharedInstance
siren.appID = 12345
The latter does not work as the compiler cannot find appID:
AppDelegate.swift:32:9: 'Siren' does not have a member named 'appID'
Already posted the issue here CocoaPods/CocoaPods#3056
Will close once I can push.
I've got logic that sets Siren.sharedInstance.alertType
several times, and its causing Siren to pop-up multiple alerts on top of each other. Any way to only allow 1 alert at a time?
Thanks!
I am using Siren 0.3.5 via CocoaPods 0.37.2 and am getting the error
"Please make sure that you have set 'presentingViewController' before calling checkVersion."
Have tried running from AppDelegate and from a UIViewController. I've tried setting the following in the UIViewController code:
siren.sharedInstance().presentingViewController = self
but getting nil when unwrapping Optional in
func sirenBundlePath() -> String {
return NSBundle.mainBundle().pathForResource("Siren", ofType: "bundle") as String!
}
I want to test on Siren however I do not currently have a version live in the app store so I can't "Temporarily change the version string in Xcode to an older version than the one that's currently available in the App Store" as is specified in the ReadMe.
Here are the results from turning on debug:
[Siren] iTunes Lookup URL: https://itunes.apple.com/lookup?id=XXXXXXXXX (I'm obscuring my app id)
[Siren] JSON results: [resultCount: 0, results: (
)]
[Siren] Error retrieving App Store verson number as results returns an empty array
Currently I'm just finding a random app on the app store and using their app id for testing.
let siren = Siren.sharedInstance
siren.appID = "[APP_ID]"
siren.alertType = .Force
siren.checkVersion(.Immediately)
This brings up an alert with "Next time" and "Update" as options, which is the default alert type.
Am I doing something wrong?
Pods/Siren/Siren/Siren.swift:534:15: Initializer for conditional binding must have Optional type, not 'String'
?
// Siren is a singleton
let siren = Siren.SharedInstance
I think this should be Sired.sharedInstance?
Change processVersionCheckResults() to this to fix the issue (first check if app is available)
private func processVersionCheckResults(results: [String : AnyObject]) {
if results["results"]?.count > 0 {
self.currentAppStoreVersion = results["results"]?[0]["version"] as? String
if let currentAppStoreVersion = self.currentAppStoreVersion {
if self.isAppStoreVersionNewer() {
self.showAlertIfCurrentAppStoreVersionNotSkipped()
}
} else {
if self.debugEnabled {
println("[Siren] Error retrieving App Store version number")
}
}
}
else {
if self.debugEnabled {
println("[Siren] App not found")
}
}
}
hello
i can update app version whiteout appstor Apple
Anyway to override the title in the default alert controller?
NSUserDefaults.standardUserDefaults().setObject(currentAppStoreVersion!, forKey:sirenDefaultSkippedVersion) NSUserDefaults.standardUserDefaults().synchronize()
Did not perform this code
There is no proper folder to be manually added into my own project. Need to open the Sample App and pull the Siren.framework into my own project.
I'm getting this error when I run the app.
[Siren] JSON results: ["resultCount": 0, "results": <__NSArray0 0x15de15b60>()]
[Siren] Error retrieving App Store data as an error was returned.
I don't know where to specify my App Id now when that property is private. My app is active on the app store so this don't happen because of it doesn't exist there.
What am I missing?
I'm getting an error (EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode 0x0)) on the return on this:
func sirenBundlePath() -> String {
return NSBundle.mainBundle().pathForResource("Siren", ofType: "bundle") as String!
}
Thread 1 says:
0 function signature specialization <Arg[1] = Owned to Guaranteed> of ext.MYAPP.ObjectiveC.NSBundle.(sirenForcedBundlePath in _......."
Any ideas? It seems to only crash when I try to make the app fail (by pointing towards the iTunes Connect appID, since my app isn't in the store yet to test against.
Thanks!
When the alert pops up and user presses home button and go back app again. Tap "Next Time" or "Update" will cause a bug.
I found the hideWindow() cause this issue. you need to check the updateWindow if nil before hide it.
Please fix this, thanks.
Is it fine to have siren.checkVersion(.Immediately)
in didFinishLaunchingWithOptions
and Siren.sharedInstance.checkVersion(.Daily)
in applicationDidBecomeActive
? I saw in the obj-c project you advice to just use one, but I think it's useful to do a immediate check when the app launch for the first time as well as daily.
This issue simply shouldn't be happening.
There needs to be another way to compare version numbers, 16.0 is certainly the same as 16 and shouldn't be treated as requiring a new version! :O I was shocked when I saw this..
Did some debugging and found the problem area...
Today our app was accepted only for siren to cause our users to go into a never ending loop of installs..
I think the currentInstalledVersion should check for CFBundleVersion instead of CFBundleShortVersionString
daily , weekly parameters not working properly , it is always using immediately parameter .
There is erorr in checking of date in the daysSinceLastVersionCheckDate method. Please accept my pull request.
Running sample app in iOS 9.3 produces the following warnings in the console:
2016-05-04 14:53:59.978 Sample App[13254:43700378] _BSMachError: (os/kern) invalid capability (20)
2016-05-04 14:53:59.979 Sample App[13254:43700738] _BSMachError: (os/kern) invalid name (15)
Stackoverflow suggests using dispatch_async to fix this:
let action = UIAlertAction(title: title, style: .Default) { (alert: UIAlertAction) in
self.hideWindow()
dispatch_async(dispatch_get_main_queue(), {
self.launchAppStore()
})
self.delegate?.sirenUserDidLaunchAppStore()
return
}
Hey @getaaron,
Feel free to take a look and modify https://github.com/ArtSabintsev/Siren/tree/swift2 as you see fit.
The changes I made were the automatic conversion plus my a bunch of custom changes.
README still says:
Support for UIAlertController (iOS 8+) and UIAlertView (iOS 7)
but iOS7 support was dropped 4 months ago.
Hello and thanks for this framework,
Is there a Swift 3 branch on its way?
I can't use it with Xcode 8 and Swift 3 beta and Cocoapods... Or couldn't find how to.
Thanks!
How is the Swift 2.0 support? Is anyone working on it?
It would be great to have Carthage support. If I create a PR, would you accept it?
(Not that I'm a Carthage creation expert, but it would give me extra incentive to try if I know it will be accepted and updated ongoing, thanks!)
The alert shows english text even after setting to other SirenLanguageType (I'm using PortugueseBrazil).
It would be great to have only one library to handle all the platforms ๐
Not sure how hard it would be to port to Siren to macOS, probably just be the interface part which has to be platform related.
How can I set the appID for testing ? My app is not in app store yet and I need to set the AppID
but as instruction says, the AppID
is now fetched from the API.
Any solution for how to test with other AppID's
Latvian translation is wrong. Need to update from official term guidelines: http://termini.lza.lv/
I am trying to perform a check immediately when the app open, so I call check immediately from didFinishLaunchingWithOptions
. I keep getting the following error:
Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior
I also tried calling it from the View Controller in didAppear
and get the same error.
If an app has only been made available to a certain region, then the iTunes look up returns an empty array.
If I add a country parameter to the iTunes lookup url, then it returns the correct response. (e.g https://itunes.apple.com/lookup?id=xxxxxxxx&country=xx)
Just thought it'd be a good thing to have. :)
I have implemented the 'SirenDelegate' within my ViewController, and the dialog appears properly, however the 'sirenDidShowUpdateDialog' is not getting called. I have the following in my code:
func sirenDidShowUpdateDialog() {
print("did show dialog")
}
func sirenUserDidLaunchAppStore() {
print("did launch app store")
}
func sirenUserDidCancel() {
print("did cancel")
}
The 'sirenUserDidLaunchAppStore' and 'sirenUserDidCancel' 'print' statements are called properly, but the 'sirenDidShowUpdateDialog' 'print' statement is not called when the dialog appears.
Hi,
Would it be possible to have a public API to be able to close the alert with a method?
Also, we rolled our own forced update alert with our API. I would love to be able to use the same method you use to check if the current app version is older than X version. Would it makes sense to open it up as well?
I had an error but i don't know what exaclty it is
Can anyone help me to find out
Here is the log from console tab
sirenDidFailVersionCheck Error Domain=Siren Error Domain Code=1001 "No new update available." UserInfo={NSLocalizedDescription=No new update available.}
[Siren] No new update available.
Many Thanks
Hello,
First of all -- great project.
I noticed that the UIAlertController only appears if the window's rootViewController is visible when you open the app. It's not a bug with UIAlertController, but it has to do with UIAlertController being a UIViewController instead of a UIView (like UIAlertView).
Have you figured out how to show the update alert when the app resumes on a view controller that's not the rootViewController?
I've tried using a second UIWindow and then presenting the UIAlertController on that, but I ran into some odd issues.
Thanks in advance!
Dylan
Can we updated the podspec to support iOS 7?
Siren crashes the app when no internet/service.
HockeyApp Log:
MyApp.Siren.((performVersionCheck in _5FA0E00E9C2A892EB4899D0EF44B562B) (MyApp.Siren) -> () -> ()).(closure #1) (Siren.swift:273)
partial apply forwarder for reabstraction thunk helper from @callee_owned (@in (Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSData>, Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSURLResponse>, Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>)) -> (@out ()) to @callee_owned (@owned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSData>, @owned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSURLResponse>, @owned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>) -> (@unowned ()) with unmangled suffix "25" (Siren.swift:0)
Hi,
If your component is SwiftPM compatible it's will be great you add
add on top of your README.md
and add section for the installation with SwiftPM.
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.