[TIMOB-26697] Hyperloop: iOS - Cannot find classes from Swift frameworks
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-23T17:09:35.000+0000 |
Affected Version/s | Hyperloop 3.1.3 |
Fix Version/s | Hyperloop 4.0.1 |
Components | Hyperloop, iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2019-01-07T18:54:44.000+0000 |
Updated | 2019-01-23T17:09:35.000+0000 |
Description
*Steps to reproduce the behavior*
Use the following pod to install
Use the following pod to install MTCircularSlider
install! 'cocoapods',
:integrate_targets => false
use_frameworks!
platform :ios, '10.0'
target 'Hyperloop_Sample' do
pod 'MTCircularSlider'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['MTCircularSlider'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end
Use the slider view with Hyperloop
const MTCircularSlider = require('MTCircularSlider/MTCircularSlider');
const slider = new MTCircularSlider();
*Actual behavior*
The app throws an error: Cannot find class with name: MTCircularSlider
*Expected behavior*
The app runs without errors.
Note: MTCircularSlider
is not ObjC compatible so any further usage of it is not possible.
PR: https://github.com/appcelerator/hyperloop.next/pull/314
Please notice that in my case, I experience the same issue with an Obj C compatible framework (GiphyCoreSDK)
Hi Jan, is it possible to get a hyperloop build with this commit?
You can check https://github.com/appcelerator-modules/hyperloop-builds/releases for the 4.0.1 release which includes this fix. However, on iOS Hyperloop 4.0.0 and above require SDK 8 so you have to test with a pre-release version. If you want to patch your local Hyperloop install, you can do that with a simple one liner. Assuming you are using Hyperloop 3.1.4 just replace line 91 in
~/Library/Application\ Support/Titanium/modules/iphone/hyperloop/3.1.4/hooks/generate/class.js
withVerified the fix with Hyperloop 4.0.1. Followed the steps mentioned above & no error
Cannot find class with name: MTCircularSlider
is seen. Studio Ver: 5.1.2.201812191831 SDK Ver: 8.0.0.v20190117115226 OS Ver: 10.14 Xcode Ver: Xcode 10.1 Appc NPM: 4.2.13 Appc CLI: 7.0.10-master.5 Daemon Ver: 1.1.3 Ti CLI Ver: 5.1.1 Alloy Ver: 1.13.7 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 10.0.2 IOS Simulator: ⇨ iPhone XS (iOS 12.1)(y) :)