ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.
http://sabintsev.com/
MIT License
4.26k stars 407 forks source link

When set alertType to .none, some warning message will print in console. #152

Closed ufosky closed 7 years ago

ufosky commented 7 years ago

When set alertType to .none, will always get this message from console output:

Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UIAlertController: 0x14f26ca10>)

I think if not show a UIAlertController, should not construct an instance.

ArtSabintsev commented 7 years ago

I'll take a look later today Thanks.

ArtSabintsev commented 7 years ago

I can't reproduce this issue, which makes me think that this may be an issue in your app, and not the Siren pod.

Here's what I did to try to reproduce this issue.

The following error, or one similar to it, did not appear anywhere in the logs.

Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UIAlertController: 0x14f26ca10>)

I set alertType to .none in the sample project's AppDelegate file and commented out the other *alertType settings afterwards so they don't override the .none:

        // Optional - Defaults to .Option
        siren.alertType = .none

        // Optional - Can set differentiated Alerts for Major, Minor, Patch, and Revision Updates (Must be called AFTER siren.alertType, if you are using siren.alertType)
        // siren.majorUpdateAlertType = .option
        // siren.minorUpdateAlertType = .option
        // siren.patchUpdateAlertType = .option
        // siren.revisionUpdateAlertType = .option

Then, I logged the results:

sirenDidFailVersionCheck(error:) Error Domain=Siren Error Domain Code=1001 "Not checking the version, because it already checked recently." UserInfo={NSLocalizedDescription=Not checking the version, because it already checked recently.}
[Siren] Not checking the version, because it already checked recently.
[Siren] JSON results: ["results": <__NSSingleObjectArrayI 0x618000006230>(
{
    advisories =     (
    );
    appletvScreenshotUrls =     (
    );
    artistId = 284417353;
    artistName = Apple;
    artistViewUrl = "https://itunes.apple.com/us/developer/apple/id284417353?mt=12&uo=4";
    artworkUrl100 = "http://is1.mzstatic.com/image/thumb/Purple62/v4/7e/f9/58/7ef95817-2a2f-3b1a-f302-5b5a7cbd8ac2/source/100x100bb.jpg";
    artworkUrl512 = "http://is1.mzstatic.com/image/thumb/Purple62/v4/7e/f9/58/7ef95817-2a2f-3b1a-f302-5b5a7cbd8ac2/source/512x512bb.jpg";
    artworkUrl60 = "http://is1.mzstatic.com/image/thumb/Purple62/v4/7e/f9/58/7ef95817-2a2f-3b1a-f302-5b5a7cbd8ac2/source/60x60bb.jpg";
    averageUserRating = "2.5";
    averageUserRatingForCurrentVersion = 2;
    bundleId = "com.apple.itunesconnect.mobile";
    contentAdvisoryRating = "4+";
    currency = USD;
    currentVersionReleaseDate = "2016-10-31T18:14:17Z";
    description = "iTunes Connect allows providers to access the apps, music, movies, TV shows, and books they have made available for download from the App Store, iTunes Store, and iBooks Store. Providers can also use iTunes Connect to check the latest trends from their iPhone, iPad, and iPod touch.";
    features =     (
        iosUniversal
    );
    fileSizeBytes = 8176640;
    formattedPrice = Free;
    genreIds =     (
        6000,
        6015
    );
    genres =     (
        Business,
        Finance
    );
    ipadScreenshotUrls =     (
        "http://a1.mzstatic.com/us/r30/Purple62/v4/3d/63/92/3d6392aa-9fec-e9c5-570f-3c583453f14a/sc1024x768.jpeg",
        "http://a2.mzstatic.com/us/r30/Purple71/v4/00/67/7d/00677d36-6e6f-c290-f31e-7ed059336e5b/sc1024x768.jpeg",
        "http://a1.mzstatic.com/us/r30/Purple71/v4/f4/74/69/f4746960-46be-6373-d82b-8bd978ede85c/sc1024x768.jpeg",
        "http://a4.mzstatic.com/us/r30/Purple71/v4/f8/7f/fb/f87ffb02-cb47-42ea-d4ae-d674c407e179/sc1024x768.jpeg",
        "http://a5.mzstatic.com/us/r30/Purple71/v4/a5/8e/da/a58edaec-1deb-1912-45cc-ae322d589fda/sc1024x768.jpeg"
    );
    isGameCenterEnabled = 0;
    isVppDeviceBasedLicensingEnabled = 1;
    kind = software;
    languageCodesISO2A =     (
        EN
    );
    minimumOsVersion = "9.0";
    price = 0;
    primaryGenreId = 6000;
    primaryGenreName = Business;
    releaseDate = "2010-06-10T15:19:00Z";
    releaseNotes = "- Addresses a problem where iTunes Connect may unexpectedly quit when tapping on an app in Recent Activity.\n- Resolves an issue where the app status colors in Recent Activity may not update as expected.";
    screenshotUrls =     (
        "http://a5.mzstatic.com/us/r30/Purple71/v4/56/28/87/56288766-ebbc-2573-e79b-07ac96265a2e/screen696x696.jpeg",
        "http://a2.mzstatic.com/us/r30/Purple62/v4/f6/6e/a5/f66ea5eb-d10b-37ed-c6b9-2df3bb5c21c3/screen696x696.jpeg",
        "http://a3.mzstatic.com/us/r30/Purple62/v4/eb/c6/21/ebc621d5-6a28-4a17-422b-21e648c9f591/screen696x696.jpeg",
        "http://a3.mzstatic.com/us/r30/Purple62/v4/f1/3e/33/f13e33c7-6309-a738-1344-001f003dd9ee/screen696x696.jpeg",
        "http://a1.mzstatic.com/us/r30/Purple62/v4/1b/d6/dd/1bd6dd5e-7fb6-f892-c73d-dbba7bb6c5c8/screen696x696.jpeg"
    );
    sellerName = "Apple Inc.";
    sellerUrl = "https://itunesconnect.apple.com";
    supportedDevices =     (
        "iPad2Wifi-iPad2Wifi",
        "iPad23G-iPad23G",
        "iPhone4S-iPhone4S",
        "iPadThirdGen-iPadThirdGen",
        "iPadThirdGen4G-iPadThirdGen4G",
        "iPhone5-iPhone5",
        "iPodTouchFifthGen-iPodTouchFifthGen",
        "iPadFourthGen-iPadFourthGen",
        "iPadFourthGen4G-iPadFourthGen4G",
        "iPadMini-iPadMini",
        "iPadMini4G-iPadMini4G",
        "iPhone5c-iPhone5c",
        "iPhone5s-iPhone5s",
        "iPadAir-iPadAir",
        "iPadAirCellular-iPadAirCellular",
        "iPadMiniRetina-iPadMiniRetina",
        "iPadMiniRetinaCellular-iPadMiniRetinaCellular",
        "iPhone6-iPhone6",
        "iPhone6Plus-iPhone6Plus",
        "iPadAir2-iPadAir2",
        "iPadAir2Cellular-iPadAir2Cellular",
        "iPadMini3-iPadMini3",
        "iPadMini3Cellular-iPadMini3Cellular",
        "iPodTouchSixthGen-iPodTouchSixthGen",
        "iPhone6s-iPhone6s",
        "iPhone6sPlus-iPhone6sPlus",
        "iPadMini4-iPadMini4",
        "iPadMini4Cellular-iPadMini4Cellular",
        "iPadPro-iPadPro",
        "iPadProCellular-iPadProCellular",
        "iPadPro97-iPadPro97",
        "iPadPro97Cellular-iPadPro97Cellular",
        "iPhoneSE-iPhoneSE",
        "iPhone7-iPhone7",
        "iPhone7Plus-iPhone7Plus",
        "iPad611-iPad611",
        "iPad612-iPad612",
        "iPad71-iPad71",
        "iPad72-iPad72",
        "iPad73-iPad73",
        "iPad74-iPad74"
    );
    trackCensoredName = "iTunes Connect";
    trackContentRating = "4+";
    trackId = 376771144;
    trackName = "iTunes Connect";
    trackViewUrl = "https://itunes.apple.com/us/app/itunes-connect/id376771144?mt=8&uo=4";
    userRatingCount = 1698;
    userRatingCountForCurrentVersion = 137;
    version = "3.2.3";
    wrapperType = software;
}
)
, "resultCount": 1]
sirenDidDetectNewVersionWithoutAlert(message:) A new version of SirenExample is available. Please update to version 3.2.3 now.
ufosky commented 7 years ago

Maybe this is an issue on iOS 9, I have tested on iOS 10 and did not see this message.

ArtSabintsev commented 7 years ago

iOS 9 is 115 of the global marketshare (https://developer.apple.com/support/app-store/). Not even going to worry about it.

Closing the issue.