Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

On demand Resources & Testflight
Started by mfr Dec 02 2016 02:20 PM

13 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

I'm trying to include some on demand resources. But it doesn't work. In iTunes Connect I can't see that any resources has been uploaded. When I tried for a couple of weeks there was a problem with the plugin but iTunes Connect Testflight reported 3 resources. Now the plugin seems to be ok but nothing is uploaded. 

 

Is it a bug or am I doing something wrong?

 

See build settings from my project.

 

settings = 
{
 
        plugins =
        {
            ["plugin.onDemandResources"] =
            {
                publisherId = "com.coronalabs",
                supportedPlatforms = { appletvos=true }
               
            },
        },
 
 
 
tvos =
{
                          
                onDemandResources =
                {
                    
                    { tag="TwilightPartB", resource="video/02.mp4" },
                    { tag="MidnightPartA", resource="video/03.mp4" },
                    { tag="MidnightPartB", resource="video/04.mp4" },
                },
                          
                
-- tvOS app icons require multiple layers, and you must provide both a small and a large size
icon =
{
-- A collection of 400x240 pngs, in order of top to bottom
small =
{
"Icon-tvOS-Small-LogoA.png",
"Icon-tvOS-Small-LogoB.png",
"Icon-tvOS-Small-Background.png",
},
-- A collection of 1280x768 pngs, in order of top to bottom
large =
{
"Icon-tvOS-Large-LogoA.png",
"Icon-tvOS-Large-LogoB.png",
"Icon-tvOS-Large-Background.png",
}
},
 
-- A 1920x720 image file, displayed when your app is on the "top shelf"
                topShelfImage = "Icon-tvOS-TopShelf.png",
 
                -- A 2320x720 image file, displayed when your app is on the "top shelf" of a widescreen TV
                topShelfImageWide = "Icon-tvOS-TopShelfWide.png",
 
                -- A 1920x1080 png file, displayed briefly as your app loads
                launchImage = "Icon-tvOS-Launch.png",
                
                
 
        
},
        
        android =
{
usesFeatures =
{
{ name="android.hardware.gamepad", required=false },
},
supportsTV = true,
isGame = true,
mainIntentFilter =
{
categories =
{
"tv.ouya.intent.category.GAME",
},
}
},
 
iphone =
{
plist =
{
CFBundleIconFiles =
{
"Icon.png", 
"Icon@2x.png", 
"Icon-60.png",
"Icon-60@2x.png",
"Icon-60@3x.png",
"Icon-72.png", 
"Icon-72@2x.png",
"Icon-76.png",
"Icon-76@2x.png",
"Icon-167.png",
"Icon-Small.png", 
"Icon-Small@2x.png",
"Icon-Small@3x.png",
"Icon-Small-40.png",
"Icon-Small-40@2x.png",
"Icon-Small-50.png", 
"Icon-Small-50@2x.png",
},
},
},
 
 
excludeFiles =
{
-- Exclude all Android icon files and .ogg files
iphone = { "Icon-*dpi.png", "*.ogg" },
 
-- Exclude iOS "retina" image files and .aac files
android = { "Icon.png", "*@2x.png", "*.aac" },
 
-- Exclude unnecessary assets from OS X desktop apps
osx = { "Default*.png", "Icon*.png", "Icon*.ico", "Icon*.icns", "*.aac" },
 
-- Exclude unnecessary assets from Win32 desktop apps
win32 = { "Default*.png", "Icon*.png", "Icon*.ico", "Icon*.icns", "*.aac" },
 
-- Exclude all Android icon files and .ogg files
tvos = { "Icon-*.png", "*.ogg" },
},
 
orientation =
{
default = "landscapeLeft",
supported = { "landscapeLeft", "landscapeRight" },
},
 
window =
{
suspendWhenMinimized = true,
defaultViewWidth = 960,
defaultViewHeight = 640,
titleText =
{
default = "Pew Pew!",
},
},
}


[TOPIC: post.html]
#2

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

I also noticed these warnings in the simulator log.

WARNING: issue found in /Users/magnus/Projekts/Appar tvOS/Deep Ocean Aquarium/build.settings: 
WARNING: unrecognized key: settings.tvos.onDemandResources.1.resource (string)
WARNING: unrecognized key: settings.tvos.onDemandResources.1.tag (string)
WARNING: unrecognized key: settings.tvos.topShelfImageWide (string)


[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,790 posts
  • Enterprise

Hi @mfr, the warnings you are seeing are probably just false-positives from where we are scanning build.settings and we just need to add support for those keys to our master list of what's acceptable. 

 

As for it not working, I'll see if I can get an Engineer to look into this.

 

Rob



[TOPIC: post.html]
#4

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 717 posts
  • Corona Staff

Hello, mfr!

You seem to be doing everything OK. Warnings you see in the console are false positives, we will fix it sometime next week. Your build.settings seems fine. To check if your application contain resources, locate bundle you're about to upload to iTunesConnect, rename it to zip and upzip it. Verify that package would contain not only .app, but also your resource bundles.



[TOPIC: post.html]
#5

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

I unzipped the bundle and I can see the resources and they are uploaded to iTunesConnect but not as on demand resources. They looks like ordinary resources.



[TOPIC: post.html]
#6

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 717 posts
  • Corona Staff

So, you do have .assetpack folders for each of your tags?



[TOPIC: post.html]
#7

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

nope, I don't have any .assetpack folders. Just these files:

 

_CodeSignature

Assets.car
audio
Base.lproj
control_presets_android.json
control_presets_ios.json
control_presets_osx.json
control_presets_tvos.json
control_presets_windows.json
Deep Ocean Aquarium
embedded.mobileprovision
Frameworks
GliderProperties.proj
headers.lua
icon.png
Icon@2x.png
images
Info.plist
launchpad.lua
mbox.lua
odr
PkgInfo
resource.corona-archive
video
 
 
odr is the folder where I put the videofiles.


[TOPIC: post.html]
#8

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 717 posts
  • Corona Staff

It is possible that onDemandResource packaging got broken in 2993. Please, try using 2992.

[TOPIC: post.html]
#9

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

OK. I have tried with 2992 and it seems that all On demand resources are generated. 

 

com.filmicart.deepocean.MidnightPartA.assetpack
com.filmicart.deepocean.MidnightPartB.assetpack
com.filmicart.deepocean.TwilightPartB.assetpack
 
Hopefully it will also work on the ATV. :) Thanks for the help!


[TOPIC: post.html]
#10

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

Now I can see iTunes Conncet have three ODR files but the App crashes. I think it's the same problem as before, can't find "plugin.onDemandResources". 

 

The app just load a background image and four buttons. When one click on the button the app check if the ODR file is available otherwise it will be downloaded. But the menu never shows up. 



[TOPIC: post.html]
#11

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 717 posts
  • Corona Staff

This is quite unusual... May I ask to check if you have "MyApp.app/Frameworks/Corona_plugin_onDemandResources.framework" folder in place inside your bundle?



[TOPIC: post.html]
#12

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

Yes. I have that folder in the bundle.



[TOPIC: post.html]
#13

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 717 posts
  • Corona Staff

Hello! Sorry for a long delay. Build 2016.3005 contains a fix for On-Demand resource packaging. I tested it with modified Corona Cannon project, works OK for me.



[TOPIC: post.html]
#14

mfr

[GLOBAL: userInfoPane.html]
mfr
  • Enthusiast

  • 56 posts
  • Corona SDK

I also made a test and it seems to work fine now. Thanks. 




[topic_controls]
 
[/topic_controls]