tvOS Top Shelf #242

Merged
merged 6 commits into from Jan 11, 2016

Conversation

Projects
None yet
10 participants
@davidmuzi
Contributor

davidmuzi commented Dec 17, 2015

Fix: #145

What this does

This PR introduces the Top Shelf feature to the tvOS target by showing the recently played games, and deep-linking to them.

simulator screen shot dec 16 2015 8 53 23 pm

Implementation

  • Introduces the top shelf app extension
  • Moves the Realm DB to a shared app group so the main app and the top shelf target can access it
  • refactors a bunch of defines and duplicate logic into shared classes/categories
  • add URLScheme to tvOS target

To Test

  1. Enable App Groups on the TopShelf target, and specify an App Group ID
    Provenance Project -> TopShelf Target -> Capabilities Section -> App Groups
  2. Enable App Groups on the Provenance TV target, using the same App Group ID
  3. Define the value for PVAppGroupId in PVAppConstants.m to that App Group ID
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 20, 2015

Why hasn't this been merged yet?

ghost commented Dec 20, 2015

Why hasn't this been merged yet?

@jasarien

This comment has been minimized.

Show comment
Hide comment
@jasarien

jasarien Dec 20, 2015

Collaborator

Because it's Christmas. I'm with family and I'm not working. Stop being so entitled, it'll get merged when it has time to be tested and reviewed ;)

Collaborator

jasarien commented Dec 20, 2015

Because it's Christmas. I'm with family and I'm not working. Stop being so entitled, it'll get merged when it has time to be tested and reviewed ;)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 20, 2015

I wasn't trying to be overbearing I was just asking why it hadn't been done. I was starting to think there was an issue with its code or something.🙄😊

ghost commented Dec 20, 2015

I wasn't trying to be overbearing I was just asking why it hadn't been done. I was starting to think there was an issue with its code or something.🙄😊

@jasarien

This comment has been minimized.

Show comment
Hide comment
@jasarien

jasarien Dec 20, 2015

Collaborator

there'll be a discussion here if there are code issues, and the author can fix them and add new commits to the pull request. Sit tight, it won't be in limbo too long.

Collaborator

jasarien commented Dec 20, 2015

there'll be a discussion here if there are code issues, and the author can fix them and add new commits to the pull request. Sit tight, it won't be in limbo too long.

@ghost ghost referenced this pull request Dec 26, 2015

Closed

Official Top Shelf Icon tvOS #255

@jasarien

This comment has been minimized.

Show comment
Hide comment
@jasarien

jasarien Jan 11, 2016

Collaborator

Tested this today, seems to work pretty well. Just a bit of a shame that it has the required step of having to setup the app groups. Unavoidable, I know, but still a shame. Will need to explain it in the installation instructions to make to clear (screenshots will be very helpful and very clear language/terminology that anyone could follow will also help).

Collaborator

jasarien commented Jan 11, 2016

Tested this today, seems to work pretty well. Just a bit of a shame that it has the required step of having to setup the app groups. Unavoidable, I know, but still a shame. Will need to explain it in the installation instructions to make to clear (screenshots will be very helpful and very clear language/terminology that anyone could follow will also help).

jasarien added a commit that referenced this pull request Jan 11, 2016

@jasarien jasarien merged commit 1995a44 into Provenance-Emu:master Jan 11, 2016

@gymnastboatman

This comment has been minimized.

Show comment
Hide comment
@gymnastboatman

gymnastboatman Jan 11, 2016

I set up the app groups the way it says to, in Topshelf, ProvenanceTV and the file. Not sure what I'm doing wrong.... I put the app group inside the "", so it looks like @"appgroup" .

I set up the app groups the way it says to, in Topshelf, ProvenanceTV and the file. Not sure what I'm doing wrong.... I put the app group inside the "", so it looks like @"appgroup" .

@appletv4

This comment has been minimized.

Show comment
Hide comment
@appletv4

appletv4 Jan 12, 2016

@gymnastboatman I think you need to leave the word "group." And type your group id after that for example
If your your group Id is sega

Make lt look like this "group.sega"
That's how I was able to build the app

Right now I'm waiting for all my roms to import to see if it works , I never seen this before after updating provenance the roms are importing and because I have a lot is taking a while

This was very difficult to do for someone like me who doesn't know anything about Xcode

@gymnastboatman I think you need to leave the word "group." And type your group id after that for example
If your your group Id is sega

Make lt look like this "group.sega"
That's how I was able to build the app

Right now I'm waiting for all my roms to import to see if it works , I never seen this before after updating provenance the roms are importing and because I have a lot is taking a while

This was very difficult to do for someone like me who doesn't know anything about Xcode

@gymnastboatman

This comment has been minimized.

Show comment
Hide comment
@gymnastboatman

gymnastboatman Jan 12, 2016

That is what I did, actually. @"group.appgroupname" still doesn't show up on the top row.

That is what I did, actually. @"group.appgroupname" still doesn't show up on the top row.

@appletv4

This comment has been minimized.

Show comment
Hide comment
@appletv4

appletv4 Jan 12, 2016

After 30 minutes of importing roms everything is working great
Thanks @jasarien & @davidmuzi

Even after removing the app from background the covers stay in the top shelf

After 30 minutes of importing roms everything is working great
Thanks @jasarien & @davidmuzi

Even after removing the app from background the covers stay in the top shelf

@gymnastboatman

This comment has been minimized.

Show comment
Hide comment
@gymnastboatman

gymnastboatman Jan 12, 2016

Do the Roma need to be imported AFTER building for this to work? Cause I just updated mine.

Do the Roma need to be imported AFTER building for this to work? Cause I just updated mine.

@jasarien

This comment has been minimized.

Show comment
Hide comment
@jasarien

jasarien Jan 12, 2016

Collaborator

The Realm DB needs to rebuild, beside it was moved to a shared app group - so roms will automatically re-fetch meta data like artwork and titles, etc. This can be be quite slow if you have a huge amount of roms or if most of the roms default to a text based DB search because their hashes aren't found in the DB.

Collaborator

jasarien commented Jan 12, 2016

The Realm DB needs to rebuild, beside it was moved to a shared app group - so roms will automatically re-fetch meta data like artwork and titles, etc. This can be be quite slow if you have a huge amount of roms or if most of the roms default to a text based DB search because their hashes aren't found in the DB.

@gymnastboatman

This comment has been minimized.

Show comment
Hide comment
@gymnastboatman

gymnastboatman Jan 12, 2016

So: Refresh game library, or delete the app and rebuild?

So: Refresh game library, or delete the app and rebuild?

@appletv4

This comment has been minimized.

Show comment
Hide comment
@appletv4

appletv4 Jan 12, 2016

You don't do either

After adding the group id and building the app
If successful

When I opened provenance on the Apple TV it started importing the roms again , it was done automatically without me doing anything

That's what I was referring to in my previous post
You seem to have a build app problem or something else

Edit: if you had roms in the app before ,they will be there after updating

You don't do either

After adding the group id and building the app
If successful

When I opened provenance on the Apple TV it started importing the roms again , it was done automatically without me doing anything

That's what I was referring to in my previous post
You seem to have a build app problem or something else

Edit: if you had roms in the app before ,they will be there after updating

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jan 12, 2016

Would it be possible to make the project have all the groups set up and only have the user change the bundle identifier

ghost commented Jan 12, 2016

Would it be possible to make the project have all the groups set up and only have the user change the bundle identifier

@davidmuzi

This comment has been minimized.

Show comment
Hide comment
@davidmuzi

davidmuzi Jan 12, 2016

Contributor

The groups IDs are unique and must be registered with your developer
account. This is why the feature is off by default.
On Mon, Jan 11, 2016 at 8:44 PM Darby Martínez notifications@github.com
wrote:

Would it be possible to make the project have all the groups set up and
only have the user change the bundle identifier


Reply to this email directly or view it on GitHub
#242 (comment).

Contributor

davidmuzi commented Jan 12, 2016

The groups IDs are unique and must be registered with your developer
account. This is why the feature is off by default.
On Mon, Jan 11, 2016 at 8:44 PM Darby Martínez notifications@github.com
wrote:

Would it be possible to make the project have all the groups set up and
only have the user change the bundle identifier


Reply to this email directly or view it on GitHub
#242 (comment).

@ajmi982

This comment has been minimized.

Show comment
Hide comment
@ajmi982

ajmi982 Jan 17, 2016

what do i put for the groupID? anything i want? i followed the directions that have been provided but nothing shows up in the Top Shelf. Do i make multiple groupIDs? group.sega, group.nes, group.snes?

ajmi982 commented Jan 17, 2016

what do i put for the groupID? anything i want? i followed the directions that have been provided but nothing shows up in the Top Shelf. Do i make multiple groupIDs? group.sega, group.nes, group.snes?

@ajmi982

This comment has been minimized.

Show comment
Hide comment
@ajmi982

ajmi982 Jan 17, 2016

just doesnt seem to work for me. I feel like im doing everything exactly as it tells me to above.

ajmi982 commented Jan 17, 2016

just doesnt seem to work for me. I feel like im doing everything exactly as it tells me to above.

@appletv4

This comment has been minimized.

Show comment
Hide comment
@appletv4

appletv4 Jan 17, 2016

just put your name after group.

just put your name after group.

@ajmi982

This comment has been minimized.

Show comment
Hide comment
@ajmi982

ajmi982 Jan 17, 2016

I got it all figured out :). Now wish I could edit the boxart. Have a few games that have the wrong art or no art at all.

Sent from my iPhone

On Jan 17, 2016, at 4:25 PM, appletv4 notifications@github.com wrote:

just put your name after group.


Reply to this email directly or view it on GitHub.

ajmi982 commented Jan 17, 2016

I got it all figured out :). Now wish I could edit the boxart. Have a few games that have the wrong art or no art at all.

Sent from my iPhone

On Jan 17, 2016, at 4:25 PM, appletv4 notifications@github.com wrote:

just put your name after group.


Reply to this email directly or view it on GitHub.

@serjrodin

This comment has been minimized.

Show comment
Hide comment
@serjrodin

serjrodin Jan 18, 2016

Hi! I have an error and I don't know what to do! Help!
Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.jamsoftonline.ProvenanceTV.TopShelf” were found.

Hi! I have an error and I don't know what to do! Help!
Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.jamsoftonline.ProvenanceTV.TopShelf” were found.

@serjrodin

This comment has been minimized.

Show comment
Hide comment
@ajmi982

This comment has been minimized.

Show comment
Hide comment
@ajmi982

ajmi982 Jan 18, 2016

You need to change the identifier to match the custom one you have set up for provenanceTV

So if it was com.CUSTOM.ProvenanceTV then you have to replace jamsoftonline with CUSTOM

Sent from my iPhone

On Jan 18, 2016, at 12:18 PM, serjrodin notifications@github.com wrote:

Hi! I have an error and I don't know what to do! Help!
Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.jamsoftonline.ProvenanceTV.TopShelf” were found.


Reply to this email directly or view it on GitHub.

ajmi982 commented Jan 18, 2016

You need to change the identifier to match the custom one you have set up for provenanceTV

So if it was com.CUSTOM.ProvenanceTV then you have to replace jamsoftonline with CUSTOM

Sent from my iPhone

On Jan 18, 2016, at 12:18 PM, serjrodin notifications@github.com wrote:

Hi! I have an error and I don't know what to do! Help!
Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.jamsoftonline.ProvenanceTV.TopShelf” were found.


Reply to this email directly or view it on GitHub.

@jasarien jasarien referenced this pull request Feb 15, 2016

Closed

Top shelf #287

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 13, 2016

I don't understand the third step. How to I define them?

ghost commented Apr 13, 2016

I don't understand the third step. How to I define them?

@appletv4

This comment has been minimized.

Show comment
Hide comment
@appletv4

appletv4 Jun 26, 2016

i can't get this working anymore with the latest Xcode 7.3.1 and provenance

I'm getting this error in capabilities /app groups

" add the app groups container entitlement to your app id"
communication with apple failed

how do i fix this?

i can't get this working anymore with the latest Xcode 7.3.1 and provenance

I'm getting this error in capabilities /app groups

" add the app groups container entitlement to your app id"
communication with apple failed

how do i fix this?

@lolkthxbai

This comment has been minimized.

Show comment
Hide comment
@lolkthxbai

lolkthxbai Jun 26, 2016

I am running into the same issue as above where I get an error that says "Add the App Groups containers entitlement to your App ID" and if I try to build it fails and asks if I want Xcode to fix the issue automatically. When I let Xcode fix it for me, it says i don't have sufficient privileges. I found this online on the Apple Developer website: https://developer.apple.com/programs/whats-included/ and according to this, free accounts do not have access to App Groups. Sorry if it as mentioned before but I didn't see it, is a paid account required then in order to use App Groups...?

I am running into the same issue as above where I get an error that says "Add the App Groups containers entitlement to your App ID" and if I try to build it fails and asks if I want Xcode to fix the issue automatically. When I let Xcode fix it for me, it says i don't have sufficient privileges. I found this online on the Apple Developer website: https://developer.apple.com/programs/whats-included/ and according to this, free accounts do not have access to App Groups. Sorry if it as mentioned before but I didn't see it, is a paid account required then in order to use App Groups...?

@apexad

This comment has been minimized.

Show comment
Hide comment
@apexad

apexad Jun 27, 2016

Contributor

Yes, a paid developer account is required to do App Groups.

Contributor

apexad commented Jun 27, 2016

Yes, a paid developer account is required to do App Groups.

@QuarterSwede

This comment has been minimized.

Show comment
Hide comment
@QuarterSwede

QuarterSwede Dec 11, 2016

apexad, thanks for pointing that out. I would've wasted a considerable amount of time for nothing. Not yet willing to pay for the dev account yet.

apexad, thanks for pointing that out. I would've wasted a considerable amount of time for nothing. Not yet willing to pay for the dev account yet.

@carloperez

This comment has been minimized.

Show comment
Hide comment
@carloperez

carloperez Jan 3, 2017

Contributor

@appletv4 - do you see this feature working in tvOS 10.1?

Contributor

carloperez commented Jan 3, 2017

@appletv4 - do you see this feature working in tvOS 10.1?

@appletv4

This comment has been minimized.

Show comment
Hide comment
@appletv4

appletv4 Jan 3, 2017

No you need a Paid developer account

appletv4 commented Jan 3, 2017

No you need a Paid developer account

@carloperez

This comment has been minimized.

Show comment
Hide comment
@carloperez

carloperez Jan 3, 2017

Contributor

Check - I have one of those! Just wanted to be sure this was not broken in the code but rather something I'm doing wrong.

Contributor

carloperez commented Jan 3, 2017

Check - I have one of those! Just wanted to be sure this was not broken in the code but rather something I'm doing wrong.

@jasarien

This comment has been minimized.

Show comment
Hide comment
@jasarien

jasarien Jan 5, 2017

Collaborator

I was trying to test TopShelf functionality again today and after setting up the App Groups etc, it appears to crash when TopShelf is activated.

Realm throws an exception:

Warning: Exception caught during invocation of received message, dropping incoming message and invalidating the connection.
Exception: Provided schema version 1 is less than last set version 0.
Provided schema version 1 is less than last set version 0.

I'm not really sure what this means, but a quick google suggests it might be that the Realm is being loaded before any potential migration happens? I'd appreciated it if you could check this out @davidmuzi

Collaborator

jasarien commented Jan 5, 2017

I was trying to test TopShelf functionality again today and after setting up the App Groups etc, it appears to crash when TopShelf is activated.

Realm throws an exception:

Warning: Exception caught during invocation of received message, dropping incoming message and invalidating the connection.
Exception: Provided schema version 1 is less than last set version 0.
Provided schema version 1 is less than last set version 0.

I'm not really sure what this means, but a quick google suggests it might be that the Realm is being loaded before any potential migration happens? I'd appreciated it if you could check this out @davidmuzi

@davidmuzi

This comment has been minimized.

Show comment
Hide comment
@davidmuzi

davidmuzi Jan 6, 2017

Contributor

Seems like the realm config was bumped to version 1 in the app, and not the extension. I have a branch which extracts the config into a single place so this won't happen again.

#508

Contributor

davidmuzi commented Jan 6, 2017

Seems like the realm config was bumped to version 1 in the app, and not the extension. I have a branch which extracts the config into a single place so this won't happen again.

#508

@orenwolf orenwolf referenced this pull request Jan 15, 2017

Closed

ERROR! What is it? #509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment