It looks like you're new here. If you want to get involved, click one of these buttons!
Hello, hello!
I'm trying to send my codea game to the app store, through xcode 7.1 (beta) connected to an iOS9.1 (beta as well), and I get this error:
Unexpected asset pack at /AssetPacks/Dropbox.assetpack. Asset packs must be in /OnDemandResources.
This refers to the new app thining thing from Apple...
https://developer.apple.com/library/prerelease/ios/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/
Has anyone had this problem yet? Is there a way around it?
I cross-posted to Stack Overflow: http://stackoverflow.com/questions/32572065/ios9s-asset-packs-must-be-in-ondemandresources-error I'll put a bounty tomorrow if none of us knows how to fix this...
Thanks!
Comments
I know it's not a solution but...
Given that iOS9 / XCode 7.1 isn't the required baseline for now - can't you submit using an earlier version?
@Rodolphe I received these days this e-mail from Apple:
To prepare, build your apps using Xcode 7 GM seed, and test with the GM seeds of iOS 9, OS X El Capitan, and watchOS 2. Read the App Review Guidelines and use TestFlight to get feedback before submitting to the App Store.
Try using Xcode 7 GM seed
Hey!
I'll try! I need to downgrade first, this may take forever...
thanks!
Ok... same thing with iOS 9GM and Xcode 7GM
Has anyone tried to send a build to itunes connect yet?
I'll do this tonight
Cool, thanks!
it's so strange, it looks like I'm the only one in the whole wide world with this problem: https://www.google.ca/search?client=safari&rls=en&q="Asset+packs+must+be+in+OnDemandResources"&ie=UTF-8&oe=UTF-8&gfe_rd=cr&ei=Z0j7VcetDeqV8QeFwI3wBg
I'm still unable to send my update to itunes connect...
Am I the only one here?
Here's what I get when I try and send my app from Xcode:
Ooooooh, so apparently, when I move my Codea-made "AssetPacks" folder and its content to "Images.xcassets", and then delete the old "AssetPacks" folder, the error is gone.
Although, now, obviously, none of my images are found in game...
I used to access my image like this (for a file called im4.png in a Dropbox sub-folder of the AssetPacks folder):
Any idea what's the new address location of the files in "images.xcassets"? Or, rather, how to find this address?
Thanks! (I think I'm getting a little closer)
@Rodolphe you can use
os.getenv("HOME")
to find the path of itemsoutside the standard folderswith file extensions not recognised byreadText
. You could tryos.getenv("HOME").."Images.xcassets/"
os.getenv("HOME").."/Images.xcassets/"
(just a guess). I've done this to open text files withio.open
. I'm not sure how you open an image with theio
library though.This is the path to the Dropbox:
os.getenv("HOME").."/Documents/Dropbox.assetpack/"
. So perhaps also tryos.getenv("HOME").."/Documents/Images.xcassets/"
Thanks @yojimbo2000!!!
I still can't access the files for now, but I'm a little more optimistic
Here's where the image files are:
And here's how I try accessing them
Which doesn't work, as
returns nil.
According to the documentation, readImage only works for official asset packs (a bit annoying).
First though, you should check whether you have the path correct. Here's an example using Dropbox (obviously change the file name to an image in your Dropbox). If the path is correct, it returns the length of the file in bytes (don't forget to add the file extension to the path string):
Then, once you're certain you have the right path, we need to work out a way to read the image.
Tbh though, I have no idea how to actually convert the data into a usable image. I've only used this method for text-based files. I'm not sure whether it's possible. Hopefully the geniuses of the list might be able to come up with something.
Have you checked whether you have this issue for assets in locations other than Dropbox (Documents: or Project:)? Although moving all your assets would be a massive pain at first, it might be easier in the long run? But maybe just do a small text export first, ie a tiny program that loads an image from each location Dropbox: Documents: & Project: and see whether all of them throw up this issue.
In the path you posted, the colon should be a /
I just noticed that my Xcode had updated to v7.0 (I really should turn off background-updating).
And I can confirm that for the first time, you don't need a paid dev account to install your apps on your other devices!
I just tried building a Codea project with lots of Dropbox image and text assets, and loading it onto my iPhone 4S (iOS 9), and it worked great. First time I've seen my app on a phone (apart from the simulator on the Mac, which doesn't count). Man, it is such a great feeling seeing your Codea app on an iPhone.
My assets are in
/AssetPacks/Dropbox.assetpack/
I did get that bitcode error that you discussed here http://codea.io/talk/discussion/6874/solved-problems-with-xcode#latest
@Rodolphe your fix worked, thanks for that.
The target was iOS 7.0 (I didn't try 9.0).
I've not been able to replicate the issue you've been having, I'm afraid.
I'm still pretty new to XCode and don't really know much about it, @Rodolphe is there a particular reason why you need to make the build target 9.0? Do you still have the issue with the target at 7.0?
EDIT:
I'm not sure thatImages.xcassets
is really where you should be putting your Codea assets though. It's for things like the app icon and launch images.If I were you I'd re-export from Codea and start over.Wow, thanks for trying all that @yojimbo2000!
Loading to a local machine works great indeed (I had that moment too the first time I tried
)!
The issue comes up when you archive your project (Product -> Archive), then select Validate. Have you tried that?
@Rodolphe and @yojimbo2000 , the
Deployment Target
is the the minimum system requirement.If you put 9.0, just iPhone/iPod touch/iPad with iOS 9.0 or later can install the app on device
@erickyamato thanks for explaining that. If either of you can recommend an Xcode for dummies blog/resource I should read, I'd be grateful.
@Rodolphe I can archive the app, but the validate button is greyed out. Below it it says "Distribution requires enrolment in the Apple developer program". I guess that's the limit of the free account then.
@yojimbo2000 I'm a dummie too! hahaha
But, I'll try to create something to help with Codea -> Xcode
(I'll looking for on Stack Over Flow)
To archive an app, you need a developer profile installed on your device!
Oh ok... We need somebody with a developer account to check this then...
Anyone?
What do you need me to check?
Probably a stupid question, but how come you want your app to be iOS 9 only?
You could open a codea-based project with image assets, plug in you ios device, go to "product", "archive", then "validation"
Does it come up with any error?
Thanks!
Dangit, was right on the edge of getting my app published, hope ios 9 doesn't add too many problems. Also, if you choose upload to iTunes within the archive section, does that just upload it to iTunes connect from which you can use test flight etc? Was nervous about clicking that for fear of accidental publishing, and was just wondering for verification.
@yojimbo2000, I don't need my app to be iOS 9 only (I set the target to iOS 7), but to be compatible with iOS 9.
Oh ok, apologies, i thought you had the target set to iOS9.
@Mr_Ninja, you can't just upload, no, the error comes up. So I get it that you are having this issue too?
No worries @yojimbo2000, my English isn't the best
I've never tried uploading yet. All uploading does is move the app to iTunes connect, not to the store, correct?
If anything, I can't open xcode 7, gets stuck on installing components
EDIT: Nevermind
@Mr_Ninja, you don't need to upload, but simply "validate". Your build isn't sent anywhere! If you want to upload, it goes to itunes connect, where you can decide, later, to send it for app store approval.
Ok, thanks. I'll try it out tomorrow. I'll let you know how it goes.
Just tried validating, got the same on demand assets error. Looks like its an issue with the code runtime to me, though I might be wrong. @Simeon ???
I think it's how the new app thinning thingy works on Xcode 7, which might be incompatible with the way Codea exports projects
Thanks a lot for trying, I feel a little less alone 
What happens when you put the asset pack in /OnDemandResources (the path that the error message says the asset pack should be in)?
Although, reading Apple's documentation, /OnDemandResources (as the name perhaps implies) seems to be for resources on a remote server that are dynamically loaded on demand. So that's not where the dropbox assets should be placed either.
I just noticed there's a ticket for this issue, with a reply from @Simeon on the issue tracker:
https://bitbucket.org/TwoLivesLeft/core/issues/366/trying-to-export-xcode-file-so-i-can
I upvoted the ticket, @Rodolphe @Mr_Ninja you two should too.
According to @Simeon 's reply, the problem is specifically with the .assetpack extension, rather than the location of the files as such.
@Rodolphe try removing the .assetpack extension and see if you can validate (the images won't show up of course). But, if you can validate, that's at least a start. You'd at least be able to access the files as data (though not yet as images) at
os.getenv("HOME").."/Documents/Dropbox/"
Oh that's kind of a good news! I don't know why I couldn't find this ticket on my (many) google searches. Nice find @yojimbo2000!
I tried removing the .assetpack extension, but Xcode automatically adds:
@yojimbo2000, I don't have any /OnDemandResources... Couldn't find one anyway.
@Rodolphe and @yojimbo2000 I don't know if this can help you
I've added my name to the list of people having issues with this. No Dropbox or other external assets, just assets that are part of the Project (for things specific to this project) or Documents (for things that are used across several projects) folders within Codea.
/OnDemandResources is a red herring. It's just an unfortunate coincidence that it uses the .assetpack suffix that Codea Xcode export used until now. As far as I can tell, it's for loading resources as they are needed from a remote server, which is not, as far as I can see, what any of us are trying to do.
Yes, it looks like one of the strategies they're using to reduce the base size of apps. I can certainly change the name of the assetpack, but... it's another thing trying to change it in the runtime.
@Rodolphe ok, instead of removing the extension altogether, what happens if you just change it to something like
.assets
?There is a further problem with this approach. Even if this folder extension passes the validation process, and even if we're able to read files at this new extension (which I believe we can do) using
os.getenv
,io.open
andfile.read
, there seems to be no way to actually turn the raw data read byfile.read
into a usable image.readImage
seems to only accept files in the asset packs. Maybe I'll start a new thread on this specific issue, as it's somewhat separate from the main problem.Indeed, @yojimbo2000, this would only help passing the validation test...
Eck, this is really gonna screw up my project, gonna have to copy over alot of resources and launch screens etc to a new export by the looks of things
Hi everyone, I'm currently working this issue through by submitting some dummy apps to the App Store to find where the error is. Once it's resolved I'll try have an updated project template you can download until the next release of Codea is available.
So it does appear to be an issue with the term "assetpack" appearing in folder names anywhere within the app package.
I will be uploading a new runtime that enables bitcode and also looks for the term "assets."