Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow (optional) bundleID instead of (required) AppID #54

Merged

Conversation

irlabs
Copy link
Contributor

@irlabs irlabs commented Apr 22, 2016

An app's bundleID can be used, just as the appID to get App Store information about it.

It is useful to also have this feature in Siren, because it will be easier for the developer to get the bundleIdentifier instead of the appID (especially when the app hasn't been approved and released yet).

One more thing to mention: I chose for the bundleID to be a variable which needs to be set before a version check is performed. Alternatively, we could get the bundleID automatically from the mainBundle, just as is done with the appName. However I like to have more control over which bundleID is used, as it might differ between AppStore version and debug version.

(Also I added a specialized error for when it won't check the version, because the last version check was too recent)

irlabs and others added 3 commits April 22, 2016 16:02
because it already recently performed a check.
Also fixed a minor typo (verson instead of version)
Also bundleID (next to, or instead of appID) can now be used to get the info from the App Store. If the bundleID is given and an appID is not supplied, the appID will be read from the App Store json, since it is later needed when attempting to open the App Store link after "Upgrade"
@ArtSabintsev
Copy link
Owner

The bundle ID can be directly pulled out from info.plist, so I could (technically) remove the publicly exposed variable all-together, no?

Also, nice trick with default implementations of extensions leading to optionality.

@irlabs
Copy link
Contributor Author

irlabs commented Apr 22, 2016

Sure, in theory you don't need both the public properties appID nor bundleID. But like I described, sometimes you might want control over which bundle ID to use. (Like when e.g. the development version has a different bundle ID, but still want to link to the App Store version.)

@ArtSabintsev
Copy link
Owner

Seems like a pretty small edge case (IMHO). I'll take a look at this after work and cherry-pick the changes I like.

I'm leaning towards the removal of the exposed appID all together.

@ArtSabintsev
Copy link
Owner

Unfortunately, this isn't a complete solution. The appID, also known as the trackId in the JSON that is returned needs to now be extracted so that when the user launches the app in the app store, it knows which app to launch.

I'll take care of that change soon - probably not tonight.

@ArtSabintsev
Copy link
Owner

Will merge for credit and overwrite with #56 after #56 is reviewed by @irlabs

@ArtSabintsev ArtSabintsev merged commit f339141 into ArtSabintsev:master Apr 27, 2016
ArtSabintsev added a commit that referenced this pull request Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants