Login to Spotify fails when using ad-hoc distribution - ios

I'm using the Spotify SDK in an iOS app and login is working when running in the simulator or running on a device when I've installed the app directly from Xcode. When I distribute an Ad-Hoc build of the app (using Fabric) the method call
[self.player loginWithAccessToken:self.auth.session.accessToken];
fails to complete and the user is never logged in. If following Spotify's own tutorial this method gets called on the main thread and so blocks it, if I wrap it in a dispatch_async call onto a background thread then the UI is not blocked but the user is still not logged in.
I have tried with both a wildcard provisioning profile and an app specific one but that didn't make a difference.
The demo project included with the iOS-beta 25 SDK does work (can login) when distributing an Ad-Hoc build. That is using Spotify's example app, callback and client ID and similar but not identical code.
My question is then what I am not doing for a distributed build that I should be?

For anyone else that has the same problem I have found a solution. It seems the problem was due to not using refresh tokens or at least adding refresh tokens got things working.
I managed to get my app working by following this YouTube tutorial and referring to the code in the demo project found with the Spotify SDK . The ruby app used in the tutorial can be found here.
I hope that helps someone else too, I didn't make detailed notes about what I did so can't give anymore info than that but happy to try and help if you have a question.

Related

TestFlight build is not working same for every user

I'm new to iOS development.
I have a app built with React Native and already deployed on app store. I'm working on version 2.0 of the app. Previous version was built by some other developer company.
They delivered the source code for the version one, I'm gonna work on top of the codes of version one.
I've pushed a build on TestFlight to check if the existing codes are okay.
Now on TestFlight,
most of the testers are not finding any problems but some users can't login. Whenever they try to login, either there is an infinite loading screen or the app takes back to splash screen. The users then tries again to login but again after entering otp, user is sent back to splash screen.
Now this scenario is happening only with 2, out of our 20+ testers. We don't know where the problem is because we can't recreate the same issue in other devices.
Also, this same app with same code is deployed on google play store and working without any issue.
Has anyone else faced similar issue? Is it a problem with the test flight?
N.B: Everyone using iphone with latest iOS update 16.3
Try to log in with their credentials on your simulator/local device where you have access to logs etc.
Sounds to me like there's an issue with some specific accounts, maybe they have some properties in their accounts that has been altered/removed that's making the login process fail / load the correct content.
Edit: If there's infinite loading, have they checked their internet connectivity as well?

Facebook Codeless Event - iOS app does not connect to Events Manager

I'm trying to get Facebook Codeless Event to work, but I can't seem to connect my app to Events Manager.
Followed instruction from this article: https://developers.facebook.com/docs/app-events/codeless-app-events/#ios
After updating Facebook Core SDK to 4.39.1 and even including Marketing SDK just in case. Included I went to Facebook app, and it did have check mark to say that my SDK version is compatible.
Then, the instruction say to open new session and shake the app, but even after vigorous shaking for more than 10 seconds, nothing happens in the app nor in the web browser.
Anybody know what can be done to properly set it up?
I had the same issue, it seems like the FBSDK has a different behaviour for the simulator.
Opening the simulator and executing a "Hardware" -> "Shake Gesture" worked for me.
I was able to get this working by not using Facebook SDK directly from website, but using Carthage to get the frameworks.
By getting 4.40.0 version from Carthage, shaking to connect to the Event Manager worked. There were some error creating events, but this is out of scope for this question, so I will mark this as solved.
Only setting that seems to be needed to connect correctly were: Facebook App Id and bundle id.

iOS simulator build for Facebook app approval crashes

I have done everything specified by Facebook. I even validated the sim build using the ios-sim tools and it runs fine on my Mac. There are no crashes. Has anyone had this problem before? What am I missing. here is a screenshot :
Edit I gave it another try and I got the same results. Even for the Android build. I was thinking tht maybe i sent them a zip by mistake but this time I double checked that I'm sending them a link to a .apk file to download from Mega.nz. Testing the iOS sim build on my end yields nothing since the game runs fine. I'm in dire need of some sage advice from someone who has gone trough this process. Here is another screenshot from todays rejection.
In my case I just set the app in facebook to be active for the public. This allowed my users to log in and share post, from the app to facebook. I'm Only missing the publish_actions permission. Just get your app approved on the app store and send facebook the link for that. Simulation builds just dont work for them
Dude I never tried it before but I read somewhere that if you are getting trouble to get approved by selecting iOS on submitting you can select Android as platform on submission and after approved your facebook integrations will be working fine for iOS apps too.
Doesn't cost too much to have a try ;)

Facebook App Install not recorded in Facebook Insights [iOS App]

I am trying to track down the installs in my iOS app in the Facebook Insights panel and i am not really able to do it. The only reading that i get is the number of App Launches. App install data is not getting recorded.
When i went through the insights panel i came across a banner as follows
"This data can be incomplete as we do not seem to be receiving app launch events corresponding to all your app installs"
Can you please help me with a solutions to track the no of App installs in Facebook Insights panel.
If you are using the FB iOS SDK then this logging is done by the use of FBSDKAppEvents class as described here.
One reason I can think of why you cannot see the data is that you do not have enough data. Wait for more data to log and see if it works.
If you are working with Mobile ads then make sure you follow the instructions here. There is an App Ads Helper as well that you might find handy.

Google Analytics SDK for iOS

I'm trying to integrate Google Analytics SDK with my iPhone app.
As it's described in the docs, before I began using the SDK, I've first created a free account at www.google.com/analytics and created a new website profile in that account using a fake but descriptive website URL.
For the created profile tracking status is always "Tracking Not Installed".
So, my question is, will it cause a problem to send tracking requests from my iPhone application? If yes, please advice me what to do then.
Thanks a lot.
Ok, I have found the answer...When I run the my app in Simulator, it is not sending trucking requests, but everything is fine, when I run it on the device.

Resources