1

I have two free and paid apps which use same one Facebook app.

  • The free app has package: com.company.app

  • The paid app has package: com.company.app.free

The facebook app has id is 123456 and the iOS platform section in Facebook app:

  • "Bundle ID": com.company.app.free, com.company.app

  • "URL Scheme Suffix": free, paid

I can't logon the facebook in freeApp because the facebook always redirects to the paidApp.

After spend time, I found the Two iOS apps using the same Facebook app ID - is it possible? and https://developers.facebook.com/docs/ios/troubleshooting#sharedappid and try:

  • Add the ios.FacebookUrlSchemeSuffix="free" for freeApp and ios.FacebookUrlSchemeSuffix="paid" for paidApp but the problem is still same.

  • Then remove the ios.FacebookUrlSchemeSuffix build hint above, add the ios.plistInject=< key>FacebookUrlSchemeSuffix< /key>< string>free < /string> for freeApp and test it. The app is terminated immediately when start logon the facebook.

  • Then add the ios.urlScheme=fb123456 to the freeApp but the build is failed at server with error "...Info.plist': The data couldn’t be read because it isn’t in the correct format."

What are correct setting for ios.urlScheme and ios.plistInject build hints (include the FacebookUrlSchemeSuffix) in order for both freeApp and paidApp can work correctly in Codename One?

Community
  • 1
  • 1
William
  • 281
  • 3
  • 9

1 Answers1

0

ios.urlScheme

Allows intercepting a URL call using the syntax urlPrefix

From: https://www.codenameone.com/manual/advanced-topics.html

Notice that by default defining Facebook support includes the main URL scheme so the plistInject will conflict with that.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • Shai, do you have any advice in order to make both my free and paid apps can work? – William May 14 '16 at 05:49
  • I have no experience with that so I don't know specifically my answer is about the URL scheme portion of the question. – Shai Almog May 15 '16 at 03:50
  • My both free and paid apps can work correctly by setting the ios.urlScheme=free and ios.urlScheme=paid – William May 15 '16 at 04:39
  • So does that work or do I need to look further into this? Looking a bit into it I don't see why you would need this. If you set the facebook appid to be the same for both apps it should "just work". – Shai Almog May 15 '16 at 06:59
  • Apps currently work now. Don't need to look into it. Thanks. when I set FacebookUrlSchemeSuffix=free and ios.urlScheme=free the plist file is generated CFBundleURLSchemes - fb534305660081488 fb534305660081488free and it works. – William May 15 '16 at 08:13