Foren

iOS Error configuring project and using screenlets

Álvaro Cid Rodríguez, geändert vor 7 Jahren.

iOS Error configuring project and using screenlets

New Member Beiträge: 2 Beitrittsdatum: 07.06.16 Neueste Beiträge
Hi,

Im getting too many problems running a very simple iOS app using Swift. According to this manual:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/preparing-ios-projects-for-liferay-screens

I have used CocoaPods to configure imports, with this Podfile:
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
use_frameworks!

target "LiferayPOCSwift" do
    pod 'LiferayScreens'
end


'pod install' command appears to run ok and Workspace project file is generated. When I open that file and try to build project, I came across this error in yap-vfs-shim.h file from YapDatabase Framework:
Could not build module 'SQLCipher' In file included from......../YapDatabase/YapDatabase/Internal/yap_vfs_shim.c:1


So, after having a look at yap_vfs_shim.h headers file, I have changed line 8 from #include "sqlite3.h" to #include <sqlite3.h>. Now project Builds OK.

After this, I moved to next tutorial:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/using-screenlets-in-ios-apps

Apart from some tutorial missing info like target version mismatching, if I add UIView to storyboard and I set Class to LoginScreenlet, there is no preview like in tutorial, but a simply empty white square View. If I add some constraints to make LoginScreenlet fitting the whole parent View, I get the same error twice:
file:///Users/cidstar/Desarrollo/Liferay+/ios/LiferayPOCSwift/LiferayPOCSwift/Base.lproj/Main.storyboard: error: IB Designables: Failed to update auto layout status: dlopen(LiferayScreens.framework, 1): Library not loaded: @rpath/AFNetworking.framework/AFNetworking
  Referenced from: LiferayScreens.framework
  Reason: image not found


I have tried tons of solutions provided by StackOVerflow community, but no one worked for me. I am using xCode 7.3 and have tried target versions 8.0 and 9.3 without success.

Thanks in advice.
thumbnail
Jose M. Navarro, geändert vor 7 Jahren.

RE: iOS Error configuring project and using screenlets

Regular Member Beiträge: 138 Beitrittsdatum: 24.01.14 Neueste Beiträge
Apart from the problem with Cocoapods you already solved, the preview error is usual with xcode.
Try to run the app and the
Screenlet should appear, even thought it isn't shown in the preview
Álvaro Cid Rodríguez, geändert vor 7 Jahren.

RE: iOS Error configuring project and using screenlets

New Member Beiträge: 2 Beitrittsdatum: 07.06.16 Neueste Beiträge
Jose M. Navarro:
Apart from the problem with Cocoapods you already solved, the preview error is usual with xcode.
Try to run the app and the
Screenlet should appear, even thought it isn't shown in the preview

Thanks, but as constraints cannot be updated, screenlet is shown in a wrong place (where has been manually placed).
thumbnail
Jose M. Navarro, geändert vor 7 Jahren.

RE: iOS Error configuring project and using screenlets

Regular Member Beiträge: 138 Beitrittsdatum: 24.01.14 Neueste Beiträge
Álvaro Cid Rodríguez:
Jose M. Navarro:
Apart from the problem with Cocoapods you already solved, the preview error is usual with xcode.
Try to run the app and the
Screenlet should appear, even thought it isn't shown in the preview

Thanks, but as constraints cannot be updated, screenlet is shown in a wrong place (where has been manually placed).


Can you share your project?

If you want to force the preview, you have a workaround: set as custom class the view class. For instance: for LoginScreenlet, use LoginView_default as custom class in Interface Builder. Then Xcode will compile everything, and you can change back the custom class to LoginScreenlet. This usually fixes the IB problem
Navdeep Singh, geändert vor 6 Jahren.

RE: iOS Error configuring project and using screenlets

New Member Beitrag: 1 Beitrittsdatum: 09.05.17 Neueste Beiträge
I tried changing to LoginScreenlet to LoginView_default but still not working.