I have a successfully released app with some Facebook integration like login, share etc. After release I need to have two separate apps: the first one works with production server and another one works with testing server. I made four Xcode configurations: debug for testing, release for testing, debug for prod and release for prod. In Build Settings I change their bundle ids and everything works great. Except Facebook login.
I have created another FB app with new FBAppID, new Bundle ID. In Run Script I set the correct FBAppID in Info.plist depending on testing or production environment. But logInWithReadPermissions:fromViewController:handler: returns an error:
remote_app_id does not match stored id.
What do I do wrong? Is it possible to make facebook work in both configurations?