[TIMOB-24109] Not able to use Kinvey SDK as third party pod/framework
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-04-25T12:05:35.000+0000 |
Affected Version/s | hyperloop 1.2.8 |
Fix Version/s | n/a |
Components | Hyperloop |
Labels | n/a |
Reporter | Shuo Liang |
Assignee | Eric Merriman |
Created | 2016-11-07T06:06:25.000+0000 |
Updated | 2017-04-25T12:05:35.000+0000 |
Description
Customer is facing following problem, not able to use "Kinvey" as third party pod/framework.
Reproduce
1. Create a default app. 2. Add Podfile into project like following:
install! 'cocoapods', :integrate_targets => false
platform :ios, '10.0'
use_frameworks!
target 'AlloyHyperloop' do
pod 'Kinvey'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
3. Add following code into app.js file
var APPKEY = 'kid_r1ME5mgA';
var APPSECRET = '9bef50c0843d4860984b543ea2fde4ff';
// ** This is regularly the username and password that is also used to log in to the app ** //
var USERNAME = 'cenciso';
var PASSWORD = 'cenciso';
try {
var Kin = require('Kinvey/Kinvey');
var Kinvey = new Kin();
console.log('Kinvey: ' + JSON.stringify(Kinvey));
Kinvey.sharedClient.initialize({
appKey: APPKEY,
appSecret: APPSECRET
});
} catch (_error) {
console.warn('- Error Loading Kinvey Module: ' + _error);
}
4. Run the app on simulator or device (iOS 10)
Problem.
App will crash.Note
Customer confirmed with Kinvey's development team, they are able to using it in native code, and which is working well.Attachments
File | Date | Size |
---|---|---|
AlloyHyperloop_2016-11-07-132627_Appc-MBP.crash | 2016-11-11T00:59:41.000+0000 | 3573 |
I see a few issues with the example code, let me check the SDK and provide a full sample code that works. Please also attach full crash log, full environment e.g. Hyperloop version and SDK version.
Any update?
Looking at the crash file, it seems to imply that KeychainAccess.framework is missing (which i assume is a 3rd party framework that came with the pod). So one possibility is to add this into appc.js. (assuming the framework is in a 'src' folder in project root)
However, this is guesswork. Would prefer to have more information please.
Any update?
[~sliang], the Kinvey SDK is written in Swift and therefore requires
use_framework!
directive. However, this is not supported by Hyperloop yet. The first iteration of this feature is planned for Hyperloop 2.1.0. Unfortunately i can't give an estimated release date for this at the moment, but they have several other options: * Kinvey has a SDK for Titanium at https://github.com/Kinvey/titanium-sdk which means it's not necessarily required to use Hyperloop to work with Kinvey * They can try using the 1.x version of the SDK, which is written in Objective-C, withpod 'KinveyKit'
. Let me know if they have any other questions. If not i'll close this as a duplicate of TIMOB-23570.Thanks a lot. Will inform customer. Will notice you once get reply.
[~sliang], just in case you want an update for the customer: The fix for this is currently under review and set to be included in Hyperloop 2.2.0, not in 2.1.0 as i mentioned in my previous comment. For further updates please check TIMOB-23570 for which I'll close this as a duplicate of.