BelledonneCommunications / linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)

Home Page:http://linphone.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

accountList count returns always 0 when restart the app

raccoondev85 opened this issue · comments

I tested linphone tutorial 1-LoginTutorial(),
login is fine but when i register an account and restart the app and check the length of accountlist right after init, it return always 0.

init()
{
	try? mCore = Factory.Instance.createCore(configPath: "", factoryConfigPath: "", systemContext: nil)
	try? mCore.start()
        NSLog("accountList \(mCore.accountList.count)\n")

However the app from the app store remains in the same state it was in before it closed, and re-register to defaultAccount automatically (which i expected in ios as well)
This tutorial uses version 5.2.109

Is there an option for maintaining user auth or account info?
or do i have to manage separately to store user's id and password and secretly re-register when the app is restarted so that the user doesn't bother to login again

resolved with add config file

    let config: Config! = try! Factory.Instance.createConfig(path: "\(Factory.Instance.getConfigDir(context: nil))/linphonerc")
    try! mCore = Factory.Instance.createCoreWithConfig(config: config, systemContext: nil)

then it will remain account and auth info