Fatal error building moodle app on iOS. File not found push plugin error.

Fatal error building moodle app on iOS. File not found push plugin error.

by Kene lope -
Number of replies: 7

The new version of moodle cordova push plugin doesn't include this file

File EncriptionHandler ---> #import "Moodle-Swift.h". not found --->

Repo plugin affected --> https://github.com/moodlemobile/phonegap-plugin-push

Tested on master moodle app repository.  Imposible to build.  in the version of the plugin 4.0.0-3  4.0.0-4 and 4.0.0-5 are affected

Version 4.0.0-2 compile OK due no EncriptionHandler file.

I opened an issue --> https://tracker.moodle.org/projects/MOBILE/issues/MOBILE-4347 but closed with no reason. It's impossible to compile the moodle app  --> https://github.com/moodlehq/moodleapp with that the lastest version of push plugin. And is necessary  to use that version due new methods added.



Average of ratings: -
In reply to Kene lope

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi,

that issue was closed because this is not a bug in the app, the app compiles fine. This is only a problem when creating custom apps, and we're currently looking for a way to improve this.

As a workaround, you can either edit the Encryption Handler file and change the word "Moodle" by your project's name (e.g. #import "MyProject-Swift.h"), or you can go to Xcode build settings and change the value of "Objective - Generated Interface Header Name" to "Moodle-Swift.h".

Cheers,
Dani
Average of ratings: Useful (1)
In reply to Dani Palou

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by Kene lope -
Thanks for the information Dani.
In reply to Dani Palou

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by Aldo Fernando Saia -
Hey Dani, any news about a improvement for this issue?

Thanks!
In reply to Aldo Fernando Saia

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi Aldo,

sorry for the delay in answering, I was on annual leave.

The fact that there is a workaround decreased the priority of this issue, so we are not working on it right now since we have other issues with higher priority. For the record, in our process of creating BMAs we fixed it by adding the following value in platforms/ios/cordova/build-debug.xcconfig and platforms/ios/cordova/build-release.xcconfig:

SWIFT_OBJC_INTERFACE_HEADER_NAME = Moodle-Swift.h

This will automatically set the XCode variable to Moodle-Swift and the app should compile fine.

Cheers,
Dani
In reply to Dani Palou

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by Aldo Fernando Saia -
Hi Dani!

No problem with the delay, and thanks for the answer. In the meantime, we solved this problem as you said in the previous post.

Thanks!
In reply to Dani Palou

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by zeyad ahmed -
this issue is solved but display another issue 

ld: 185 duplicate symbols for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


can u help me 
In reply to zeyad ahmed

Re: Fatal error building moodle app on iOS. File not found push plugin error.

by zeyad ahmed -
this duplications happened in derived data most of them in status bar and http