Description
Step to reproduce:
- Download SDK package from https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_1.1.0.zip
- Clone this repository.
- Open Unity project from repository /quickstart-unity/messaging/testapp.
- Download google-services-json and GoogleService-Info.plist to project.
- Import package FirebaseMessaging.unitypackage into project.
- Change bundle identifier in Project Settings.
- Open Build Settings, change platform to iOS with Symlinks Unity libraries checked, then click Build.
- Open Xcode project -> Capabilities, turn on Push Notifications.
- Also turn on Background modes with Remote notifications checked , then build and run.
- Once application is opened, it will ask for notification permission. Either click 'Allow' or 'Don't allow', everything on the screen don't respond anymore.
- But if I kill application and reopen, it works perfectly fine.
Xcode console message:
2017-01-12 10:26:09.899093 myapp[2318:621207] [DYMTLInitPlatform] platform initialization successful
2017-01-12 10:26:10.256185 myapp[2318:621002] Firebase automatic screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO in the Info.plist
2017-01-12 10:26:10.313326 myapp[2318:621002] -> registered mono modules 0x100a3f090
2017-01-12 10:26:11.018892 myapp[2318:621002] [Accessibility] ****************** Loading GAX Client Bundle ****************
2560-01-12 10:26:11.571: <FIRMessaging/INFO> FIRMessaging library version 1.2.0
-> applicationDidFinishLaunching()
2017-01-12 10:26:11.800370 myapp[2318:621002] Metal GPU Frame Capture Enabled
2017-01-12 10:26:11.800910 myapp[2318:621002] Metal API Validation Disabled
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Init: screen size 750x1334
Initializing Metal device caps: Apple A8 GPU
Initialize engine version: 5.5.0p3 (84ad46be53aa)
UnloadTime: 3.073375 ms
2017-01-12 10:26:15.863482 myapp[2318:621172] [Firebase/Core][I-COR000001] Configuring the default app.
2017-01-12 10:26:15.864 myapp[2318] [Firebase/Core][I-COR000001] Configuring the default app.
2017-01-12 10:26:15.948726 myapp[2318:621172] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-01-12 10:26:15.949 myapp[2318:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-01-12 10:26:15.950075 myapp[2318:621172] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-01-12 10:26:15.950 myapp[2318:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2560-01-12 10:26:15.979: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2560-01-12 10:26:15.987: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2560-01-12 10:26:15.998: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-01-12 10:26:16.005290 myapp[2318:621002] FCM: Subscribe to topic TestTopic
, normalized /topics/TestTopic
FCM: Subscribe to topic TestTopic
, normalized /topics/TestTopic
Firebase.Messaging.FirebaseMessaging:Subscribe(String)
UIHandler:InitializeFirebase()
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
2560-01-12 10:26:16.009: <FIRMessaging/WARNING> Cannot subscribe to topic: /topics/TestTopic with token: (null)
Firebase Messaging Initialized
UIHandler:DebugLog(String)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
2017-01-12 10:26:16.105735 myapp[2318:621398] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-01-12 10:26:16.105 myapp[2318:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-01-12 10:26:16.493633 myapp[2318:621398] [Firebase/Core][I-COR000019] Clearcut post completed.
2017-01-12 10:26:16.493 myapp[2318] [Firebase/Core][I-COR000019] Clearcut post completed.
-> applicationWillResignActive()
2017-01-12 10:26:17.245458 myapp[2318:621226] <FIRAnalytics/WARNING> The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at http://goo.gl/9vSsPb
2017-01-12 10:26:17.245 myapp[2318:] <FIRAnalytics/WARNING> The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at http://goo.gl/9vSsPb
2017-01-12 10:26:17.413960 myapp[2318:621226] <FIRAnalytics/INFO> Firebase Analytics enabled
2017-01-12 10:26:17.414 myapp[2318:] <FIRAnalytics/INFO> Firebase Analytics enabled
2560-01-12 10:26:18.539: <FIRInstanceID/WARNING> APNS Environment in profile: development
After allow notification:
2017-01-12 09:53:37.933 myapp[226:9309] FCM: Connected to FCM
FCM: Connected to FCM
PS. Unity version: 5.5.0p3