Closed ilandbt closed 8 years ago
This is a regression, BTW. I just ran into this after updating the support file for the latest version from a version about three months ago.
@ahknight That's because it's a different technology now, snapshot
now uses UI Tests and not UI Testing anymore.
Having the same issue! Would appreciate a workaround!
What I wound up doing was Volkswagoning it and only asking for push permissions if I wasn't testing (I looked at the process arguments in my case).
Ok, good workarround. thanks @ahknight
I think it makes no sense to ask push notifications on simulator, you can use
That's probably a better idea, as long as you're not automating devices as well (that is, snapshot is outside your normal UI tests).
i agree with @makadaw that asking for push on the simulator is usually uncalled for. but if it is necessary, i would recommend using some sort of check to verify that you are not running a test before asking for push permissions.
@makadaw i added the code like you suggested but the alert is still popping.
#if !(TARGET_IPHONE_SIMULATOR)
let type: UIUserNotificationType = [UIUserNotificationType.Badge, UIUserNotificationType.Alert, UIUserNotificationType.Sound];
let setting = UIUserNotificationSettings(forTypes: type, categories: nil);
UIApplication.sharedApplication().registerUserNotificationSettings(setting);
UIApplication.sharedApplication().registerForRemoteNotifications();
#endif
@ilandbt Do you check it on simulator? Can you add breakpoint before this block and check is this code actual run?
This issue was migrated to https://github.com/fastlane/fastlane/issues/2499. Please post all further comments there.
fastlane
is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket:
Hi, My UITests are failing so i cant get any screenshots. Its failing because of the push notification popup.
I tried disabling the registration with the "FASTLANE_SNAPSHOT" flag but its not working (the popup is still popping).