Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore symlinks in FacebookSDK.Framework before build #1022

Merged
merged 1 commit into from
Aug 5, 2015
Merged

Restore symlinks in FacebookSDK.Framework before build #1022

merged 1 commit into from
Aug 5, 2015

Conversation

vladimir-kotikov
Copy link

This PR adds hooks for save/restore symlinks metadata. This fixes issue when iOS custom frameworks is being broken when plugin installed from CPR/NPM. See https://issues.apache.org/jira/browse/CB-6092 for details

Save is being performed each time, plugin is being packaged or published through NPM. Restore - each time when iOS project is being compiled.

Quirks:

  1. Since cordova doesn't respect existing package.json while publishing plugin to CPR and thus doesn't exec prepublish script, the generated symlinks metadata already included in this PR. It could be also generated manually by running npm run prepublish inside of plugin directory.
  2. before_compile hook is available in cordova@>=4.0.0 only so the symlinks won't be restored in earlier versions of cordova.

This fixes issue when iOS custom frameworks is being broken when plugin installed from CPR/NPM. See https://issues.apache.org/jira/browse/CB-6092
@jfaris
Copy link

jfaris commented May 28, 2015

Thanks @vladimir-kotikov for taking the time to fix this properly. This is much better than just copying the files and creating a huge tarball.

Unfortunately I don't think it will work for PhoneGap Build because they don't support hooks (phonegap/build#425) and phonegap is still at version 3.7 so won't have the before_compile hook. These are problems with PGB, not this PR.

Regarding Quirk 1 above: we could just maintain the metadata json file manually rather than running the script. The resulting JSON is so simple and the script isn't run automatically anyway. It would cut the size of this pull request in half. What do you think?

@vladimir-kotikov
Copy link
Author

Well, once Cordova plugin registry became read-only, the only way to publish plugin will be an NPM, so the prepackage hook still could be useful 😄

@aogilvie
Copy link
Collaborator

aogilvie commented Aug 5, 2015

NICE. Thanks Microsoft too.

aogilvie added a commit that referenced this pull request Aug 5, 2015
Restore symlinks in FacebookSDK.Framework before build
@aogilvie aogilvie merged commit 2220274 into Wizcorp:develop Aug 5, 2015
@vladimir-kotikov vladimir-kotikov deleted the symlinks_restore branch August 27, 2015 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants