Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

clear NSMainNibFile entry in Info.plist #442

Closed
wants to merge 2 commits into from
Closed

clear NSMainNibFile entry in Info.plist #442

wants to merge 2 commits into from

Conversation

funkybaboon
Copy link
Contributor

@funkybaboon funkybaboon commented Oct 24, 2016

This fixes an invalid entry in the Info.plist (https://forum.ionicframework.com/t/xcode-main-interface-nsmainnibfile-ipad/66942).
NSMainNibFiles define which orientation the App is allowed to run. Nowadays this is set in the UISupportedInterfaceOrientations entry in the Info.plist. The App crashes if you have both in your Info.plist:

    NSMainNibFile = NSMainNibFile~ipad
    UISupportedInterfaceOrientations~ipad = Array {
        UIInterfaceOrientationLandscapeLeft
        UIInterfaceOrientationLandscapeRight
        UIInterfaceOrientationPortrait
        UIInterfaceOrientationPortraitUpsideDown
    }

The hook removes both NSMainNibFile entries completely.

@coveralls
Copy link

coveralls commented Oct 24, 2016

Coverage Status

Coverage remained the same at 97.959% when pulling 8663cf1 on funkybaboon:fix_hook into 23570b4 on mwaylabs:master.

@gruppjo
Copy link
Contributor

gruppjo commented Oct 25, 2016

Hi @funkybaboon, thanks for submitting this PR.

Could you please specify in more detail under which circumstances this fix is necessary. I'm currently not aware of any problems with the hook.

@MathiasTim @lordgreg @DrMabuse23 what do you think?

@coveralls
Copy link

coveralls commented Oct 25, 2016

Coverage Status

Coverage remained the same at 97.959% when pulling b7c4250 on funkybaboon:fix_hook into 23570b4 on mwaylabs:master.

@MathiasTim
Copy link
Contributor

@gruppjo Yes, this is required. @funkybaboon is on our team ;)
It seems the problem is in the plist package. Maybe @lordgreg can provide details.

@lordgreg
Copy link
Contributor

lordgreg commented Oct 25, 2016

I should add this is, from my side, a hotfix which could be removed as soon as @TooTallNate (https://github.com/TooTallNate) fixes or PR's into master. This is actually the plist node module issue and has already be found and reported there: TooTallNate/plist.js#79 and TooTallNate/plist.js#75

The module doesn't properly parse nullified values of keys. This has been found only with NSMainNibFile entries. If there would be other keys with nullified values, I assume that the app will fail to compile.

Copy link
Contributor

@DrMabuse23 DrMabuse23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice if this fix / workaround would be a single file its more easy to maintain and it looks like the standard ionic update_platform.js, maybe on the next update we loose the changes.

@lordgreg
Copy link
Contributor

Hear ye, hear ye!

The whole 'update of hook js file' can be avoided if we take the updated/fixed version of plist, which was already made as Pull Request by @akofman (PR can be seen here: TooTallNate/plist.js#81).

Until @TooTallNate merges his updates to master, I suggest using exactly this commit in package.json:

"plist": "git://github.com/akofman/plist.js.git#3f256fd21ab3ad3ada0f491cfc905098a2631342",

@DrMabuse23
Copy link
Contributor

+1

@funkybaboon
Copy link
Contributor Author

Will open a new PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants