Check for appId in iOS 

When an external app (other than Facebook) starts the app, appId has not yet been initialized and this breaks the app initialization process. Checking for appId to handle this case and prevent crash.