iOS-Universal-Framework icon indicating copy to clipboard operation
iOS-Universal-Framework copied to clipboard

resources load in iOS 7 but not iOS 6

Open mickmgit opened this issue 12 years ago • 8 comments

When running in the simulator, I'm adding the embedded framework to a test app. When run under 7.0.3, it runs with no issues. When run under 6.1 or less, it's crashing with the following:

'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/mmestel/Library/Application Support/iPhone Simulator/6.0/Applications/A1E6BDD8-9819-4594-AA6E-EB10804EC722/apptest.app> (loaded)' with name 'RequestViewController''

What would cause it to load under one and not the other? Have verified the bundle and all the resources are in the app bundle.

mickmgit avatar Oct 25 '13 00:10 mickmgit

If you touched the NIBs, then they may have been converted to the new Xcode 5 format. You need to change them back to be Xcode 4 and iOS6 compatible. The new Xcode 5 format is not backwards compatible.

Regards,

Dean Pulsifer

Believe in yourself, say what you mean, do what you say

On Thu, Oct 24, 2013 at 8:44 PM, Mickey Mestel [email protected]:

When running in the simulator, I'm adding the embedded framework to a test app. When run under 7.0.3, it runs with no issues. When run under 6.1 or less, it's crashing with the following:

'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'RequestViewController''

What would cause it to load under one and not the other? Have verified the bundle and all the resources are in the app bundle.

— Reply to this email directly or view it on GitHubhttps://github.com/kstenerud/iOS-Universal-Framework/issues/152 .

pulsifer-work avatar Oct 26 '13 21:10 pulsifer-work

So I have a project where I'm building my framework. In that project is another target which is an app, and has the library as a dependency as well as included in the link phase. This way I can develop without having to continually copy the compiled framework to another project and then compile that.

Has worked well since the beginning of my developement, and I go back and forth between 6.0-6.1 and 7 all the time.

Have also in the past had a separate project where the embedded framework is included, to test the whole procedure. Haven't done this for a while, but just tried, and now this problem comes up. Resources are all there, copied into the app bundle, but it can't find them. Bundle path looks good, can't seem to figure out what is happening here...

And again, 7.0 works fine, the problem is with 6.0

And if I create a very simple framework, one nib with one image, and then bring that into a newly created project, it works fine in both 7.0 and 6.0.

mickmgit avatar Oct 28 '13 19:10 mickmgit

Turns out it is the deployment target of the created framework. If it is anything less than 7.0, it is not loading the resources when run on the simulator for previous versions. 6 seems to be ok, but getting a different error in 5.0. Time to investigate that.

mickmgit avatar Oct 28 '13 23:10 mickmgit

Thank you, mickmgit! Your last comment solved the problem for me. I had a project with several xib files that I was migrating from Xcode 4.6.3 to 5.0. After making some changes to the xib files, it was crashing when running on iOS6 (and earlier) devices. So, I changed the deployment target for the framework to 7.0, and then it worked without crashing. I could then change the deployment target back to 4.3 and it still worked.

robr2112 avatar Nov 01 '13 23:11 robr2112

glad i could help!

Thank you, mickmgit! Your last comment solved the problem for me. I had a project with several xib files that I was migrating from Xcode 4.6.3 to 5.0. After making some changes to the xib files, it was crashing when running on iOS6 (and earlier) devices. So, I changed the deployment target for the framework to 7.0, and then it worked without crashing. I could then change the deployment target back to 4.3 and it still worked.

— Reply to this email directly or view it on GitHub.

mickmgit avatar Nov 02 '13 00:11 mickmgit

The easier way to do the same is just convert your xib files back to Xcode 4.6 compatibility again. Just select the .xib file, open the Inspector and in "Interface Builder Document" change "Opens in" to Xcode 4.6.

hendibr avatar Nov 06 '13 16:11 hendibr

Didn’t know that, will have to check that one out.

Thanks!

The easier way to do the same is just convert your xib files back to Xcode 4.6 compatibility again. Just select the .xib file, open the Inspector and in "Interface Builder Document" change "Opens in" to Xcode 4.6.

— Reply to this email directly or view it on GitHub.

mickmgit avatar Nov 06 '13 17:11 mickmgit

https://github.com/hendibr is right. changing "Opens in" to Xcode 4.6. solved my problem.

Sophia09 avatar May 05 '14 08:05 Sophia09