SKPaymentTransactionObserver crashes in purchasing status - ios6

I'm new to in-app purchases, and following the tutorials, I've got the product request going, an observer, and everything. However, at the point that the modal purchase dialog comes up (while the observer thinks the transaction is in "Purchasing" state, the app freezes up.
In the logs, I'm getting a crazy EXC_BAD_ACCESS error right here:
0x35b822b4: blx 0x35f9bb18 ; symbol stub for: -[_UIHostedTextServiceSession dismissTextServiceAnimated:]
0x35b822b8: movs r0, #0 <--EXC_BAD_ACCESS (Code=1, address=0x69466469)
The interesting thing is that even though the app freezes, the purchase process continues, although with the app frozen, it will never finalize.
Based on some of the other posts I've seen, I've tried it on the simulator, multiple devices, as well as using ad hoc (TestFlight) distribution in case it was an issue with the development cert, and nothing works.
One possibility I haven't seen an answer for is that the product in question hasn't yet been approved. I assume that, since I'm connecting in sandbox mode, and since the product request process is clearly getting data back from the app store, that wasn't an issue. Is it possible that an un-approved store item is causing the problem?
If it is the case that the unapproved SKU is breaking things, I'm really confused because iTunes Connect indicates that I can't submit a SKU except with a new version of the app for review, and, well, if I can't test the store feature, I don't want to submit that new version. Anyone here have any experience with this who can tell me why everything is going kablooey?
EDIT: One other thing that might be important is that the purchase button is in a modal push (specifically a page-curl) view. I know that Twitter requests can't be called from modal views. Is there a reason a store transaction couldn't be done in this view?

Related

Changes in real time with react, express, node mongodb/postgress

in the last few months i've done some MERN projects, and i found something that really bothered me, not because i didn't know what was that thing, but because it's something i've never heard about.
What i'm trying to say, is that, every project i did, i can not see the changes in real time, for example, i did a facebook clone, where you register and post stuff, and you can see how things change in your pc, changes in real tme in your pc, but, if i try to see those changes from another pc, i can't i have to update the page with f5 to see those results
what do i have to learn to make my big apps, like the facebook clone, to make everything in real time, like facebook, whatsapp, instagram, twitter do ?
I am not sure what Facebook, Whatsapp, Instagram, etc. use but as far as real time updates is concerned, you need to learn Websockets or Socket.io. You can also opt for services like Firebase that offer services that provide real time updates. Twilio is also another one that offers such services. But if you want to build it on your own, then you need Websockets.
I am not sure about Facebook but Whatsapp and any other messenger or chat services probably use sockets under the hood.
Look at this list of open source clones and some of the projects use the MERN stack along with socket.io just in case it helps: https://gourav.io/clone-wars . I looked through that list and found this one that may be helpful: https://github.com/Sandermoen/instaclone
I am personally taking a course on Udemy by Robert Bunch that is completely on socket.io.

React - Best tactic to update UI after long async POST request

After making a post request to add a blog, i then want to display those blogs on the same screen.
So there is no refresh.
What is the best way to get that updated list of blogs. Do i:
make another GET request to get the list of blogs and show a loading bar
just show the posted blog and assume the async POST will be successful
or is there a better way to tackle this?
Thanks
The best tactic really depends on the user experience and your opinion of what the new blog being on the screen might suggest to the user.
For some products, having the page move on immediately, and assuming the back-end is keeping up (eg for dragging a card to another column on a scrum board), will be the most pleasant for the user - no lag, and if the update it didn't go through and the card jumps back, no big issue.
For posting a blog though, a user might expect that if they can see their blog on the website, that that is confirmation of it going through the backend successfully. For that reason I think that another GET request is the better option, as it implicitly confirms to the user a successful POST.
It depends on the rest of your app and what you value.
The first one makes sense if you are using that same back-end controller in another part of your app that shows the blogs (maybe even before the blog is added) and you want to reuse it there.
The second one makes sense if you want to be network efficient and don't mind writing different back-end controllers for different back-end interactions. Also, you don't need to asume it will be successful, you need to catch errors and handle them.
An approach could be to do an empty post that returns the blogs but if the post has a new blog, then it is added and also returns all other blogs.

SPA DTM analytics pagename issue

I am using Angular SPA with DTM.Using custom event based rules, I am able to get all my data including pageName, v41,v42 as correct. Now inside adobe editor, i am storing pagename to s.pageName and some hard-coded value to s.server. I have verified that all my data is correctly populating using OMNIBUG tool as server,pageName, v41 and v42.
Problem is coming in Omniture reporting, as server and page data are not coming through. Page-name data only showing SPA homepage in all page visits and server also coming as default from s.code and not the one i am passing from s.server. eVar/prop are all coming fine.Even if I do prop40=s.pageName/prop41=s.server, then in omniutre reporting i am seeing correct data populating in prop40/prop41 but not under Page and server. And again I cant use prop40/prop41 for pagename/server as its not a correct way to follow and PAGE-VISITS are ZERO in that case.
Any help how to get data in page/server in omniture for SPA or anything wrong in my implementation? Thanks in advance!!
If you really do see the correct values in Omnibug (or more specifically, network request to Adobe collection server), then the issue is not in the code.
Check against another AA hit debugger. Possible Omnibug is somehow bugging out. There are a ton of alternatives out there. Adobe Experience Cloud Debugger. Observepoint. Charles Proxy. Fiddler. Or just use the browser dev tool network tab (what I usually do as a backup).
Make sure you are looking in the correct report suite. Perhaps your data is being sent to a dev report suite, and you are looking at prod report suite, or visa versa?
Check to see if you have any Processing Rules that are overriding your values.
Contact your Adobe Rep to check if there are any VISTA Rules present for the report suite, that are overriding your values.
If you have verified none of the above is the case, then sorry, but it sounds like the issue must really be in your code, but there is a problem with your QA method (e.g. maybe you are looking at the wrong AA request, or something).
Update:
Based on your comment:
Earlier, i was making s.tl() call, but replacing it with s.t() call
resolved my problem for data was not populating
pageName/server/page-views in Omniture and now it is. But the current
problem is we need PageName on all SPA clicks (can be achieved by
s.t() call ) , but the page-Views are not needed on all clicks. So,
its like link-tracking needed only but with PageName data. I am
struggling not to populate page-views on a s.t() call or vice-versa
how to get PageName populated on s.tl() call. Again, omnibug shows all
requests just fine but the issue comes in reports in omniture
When Adobe processes a hit, it wipes pageName for s.tl calls, as that's how it determines whether to count the request as a page view or not. If you want to see page name even for s.tl calls, the common practice is to dupe the pageName value to a prop or eVar and send in with the s.tl call, and look at that report. In fact, most clients I work with don't even use the native pages report, and instead use the (usually eVar) report.

Weird data binding behavior with socket.io

I am creating a socket.io app using angular 2 on the frontend and I am getting a very weird behavior that I have never seen before when working with socket.io. I have no idea if my code is causing the issue or if it is something within the interaction between angular2 and socket.io, but if it is my code, I can't say what code I might need to post.
The mysterious behavior: At first instinct, my process for testing if my sockets connections are working properly is to open up an incognito tab, go to my project site, log in as a different user and see if API requests are emitted properly across the users. However; right now EVERY action that is made on either of the users happens to the other user. EX: if I type into a form one of the clients, the other clients form will get updated with the same information. If I click the forms submit button to post the data in the form, the other clients submit button will be clicked as well. Occasionally, it happens when navigating between states, where the other client will also navigate to the state. The behavior also occurs when logging on to a completely different computer, so imagine it is an issue with how socket.io emits data.
All the clients are connecting and disconnecting appropriately and are getting assigned unique socket ID's.
Turns out, the solution was a bit simpler than I was expecting it to be. I strange behavior occurs through a conflict with npm live-server running at the same time as my socket.io connection. I still cannot explain why the conflict was manifested as this sort of strange behavior, but at least I got it to stop by running the app as an express app serving up the index.html.
If anyone could explain why this might have been happening, I would love to hear.

Windows Phone 7, MVVM, Silverlight and navigation best practice / patterns and strategies

Whilst building a Windows Phone 7 app. using the MVVM pattern we've struggled to get to grips with a pattern or technique to centralise navigation logic that will fit with MVVM.
To give an example, everytime the app. calls our web service we check that the logon token we've assigned the app. earlier hasn't expired. We always return some status to the phone from the web service and one of those might be Enum.AuthenticationExpired.
If we receive that I'd imagine we'd alert the user and navigate back to the login screen. (this is one of many examples of status we might receive)
Now, wanting to keep things DRY, that sort of logic feels like it should be in one place. Therein lies my question.
How should I go about modelling navigation that relies on (essentially) switch or if statements to tell us where to navigate to next without repeating that in every view.
Are there recognised patterns or techniques that someone could recommend?
Thanks
It sounds like you have a "state" (something you would switch on) followed by an action (where you would navigate to). There are a number of ways to handle it. One would be to create an INavigationService that exposes the NavigateTo(something) method, where something encapsulates the current state, and the method returns the next state. Perhaps that method would also perform the page swapping itself.
Another way might be to create an IEnumerable that drives the pages, which would make sense in an application driving forward but gets a little fuzzy when you are trying to manage the back button.
With the INavigate, you can push and pop pages (enqueue/dequeue) and then the login would get pushed to the top of the stack and do its thing, then pop the page to return to.
I can't say about specific patterns or techniques, but it looks like you could navigate forward to the login page, not back, when the logon token has expired. If you do the same for all statuses, you will be able to code your status handling logic in one place and call it wherever needed.

Resources