Resources not copied to device on build?

I have text files used by an iOS app that I edit in an external editor.
The directory containing them is copied over to the device in a "Copy Bundle Resources" build phase.

If I run->debug the app, edit the files, then run->debug again the newly edited files aren't copied to the device - the app still has the old ones.
They are copied over if I Run->Clean and let AppCode rebuild the whole project.

On XCode the updated resources are copied every time I run the application (it doesn't affect build time either).

Is there a way to help AppCode detect the updated resources? I tried adding a 'touch <text_file_dir>' build step but that didn't do it.

I'll report it on YouTrack if I think it's a bug, but I'm not sure yet - could be a misconfiguration on my part.

Thanks!

0
12 comments
Avatar
Permanently deleted user

Hi!
Please check the product App bundle built by xcodebuild itself if it is actually changed. If it differs from the previous build but the old one is deployed to the device then it's a really problem on our side.
Please let me know about your investigation.
Thanks.

0
Avatar
Permanently deleted user

I've done some testing and it seems that the bundle created by xcodebuild contains the updated resources a few seconds after I've changed them.

If I run xcodebuild immediately after saving the change, the bundle contains the old version.
If I run xcodebuild 2 times consecutively (6 seconds total runtime), the bundle contains the new version.
If I wait 10 seconds and run xcodebuild, the bundle contains the new version.

When building with AppCode, the resources would update after multiple builds and a very long period.

Should I open an issue?

0

Sounds like a File System's latency issue.
Does the same apply when you build from Xcode?

0
Avatar
Permanently deleted user

Not that I've noticed.

In any case in AppCode the resources are never refreshed.

0
Avatar
Permanently deleted user

I haven't noticed this issue on XCode at all. Maybe I've always waited enough from edit to build.

In any case in AppCode the resources are never refreshed, so it makes AppCode unusable for me when I edit these resources (usually in conjunction with Objective-C code). In these cases I have to open XCode.

In case it's relevant, this is a local drive, not NFS. I guess I'll open a bug.

0

Please create a bug report and describe the problem there.
A sample project would be great.

Thanks,
Anton Makeev

0
Avatar
Permanently deleted user

Sample project with such problem is REALLY apreciated. Thanks.

0
Avatar
Permanently deleted user

is this the bug tracker for this issue? http://youtrack.jetbrains.com/issue/OC-2690
Any ideas when this will be resolved?
We have a medium size project with alot of config files. Every time i change one line in any config file i have to run clean and then build / run. Solving this issue would be extremly helpful!

0

We couldn't reproduce the problem.
Are these files located under a folder reference? There is a similar issue: http://youtrack.jetbrains.com/issue/OC-2964

0
Avatar
Permanently deleted user

no, they are not.
But they are also not under the project tree structure, like so:

~/workspace/project/x/y/z/project.xcodeproj
~/workspace/project/resources/..
~/workspace/project/core/c++code/..

not sure if that matters..

0

Could you please try isolating the problem into a simple project and attach it to http://youtrack.jetbrains.com/issue/OC-2964 ?

0
Avatar
Permanently deleted user

DONE!
Sorry for delay.
I was able to recreat ethis issue, and additional two, small, problems.
Have fun... ping me on my e-mail if you need further help..

0

Please sign in to leave a comment.