• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

iOS5/ARC-compatible touch SDK coming?

New Here ,
Feb 26, 2012 Feb 26, 2012

Copy link to clipboard

Copied

I'm trying to build my first iOS app that uses the touch SDK, but the current version available for download has not been updated for ARC and iOS5.

I can manually clean up the autorelease and dealloc issues, but there are some other issues (like bridged casting) that are a bit more complex, and I'd prefer to use official supported code than my best guess at what needs to happen.

iOS5 has been out for a while now. Is there an update scheduled?

- Steve Linberg

(sorry about the spastic screen name, which apparently can't be changed once it's (mistakenly) entered)

TOPICS
SDK

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Adobe Employee ,
Feb 27, 2012 Feb 27, 2012

Copy link to clipboard

Copied

The SDK does not use the ARC setting and we don't plan to change that. If you want to enable that setting in your project feel free to do so and modify the SDK code and remove the retain and release calls.

We are not aware of any iOS5 issues with the SDK at this time. Can you give details on what is not working for you when building with the iOS5 SDK?

Also, please elaborate on what you mean by “bridged casting”?

Regards,

-Tom Ruark

- Photoshop Developer Support

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2012 Feb 27, 2012

Copy link to clipboard

Copied

Hi Tom, thanks for your reply.

I hope that at some point you'll revisit your stance on ARC... it's the way forward from Apple's perspective, and they have it enabled on all new projects by default; there are good reasons to use it. Of course, you're not bound by their design philosophy, but there will probably come a point where ARC is mandatory under XCode, at which point the Adobe SDK may not be usable anymore. Anyway, that's all conjecture, no point in grinding on it now.

Converting the SDK to ARC is not as simple as just removing the retain and releases, although of course that's part of it. I did a few hours of that and it eliminated one category of errors, but there were many more that were a lot more difficult. Part of the issue is that you're using some open-source code (I believe) that was written in 2009 or earlier, and all of THAT needs to be corrected as well, and some of the socket/network and security code - like Peter Bakhyryev's NetConnection.m/.h in psconnection/networking, is especially complex. I tried to find some updated examples of that code that would work in the project, but it seems like some of it changed in ways that may not work well with the original SDK. (I admit I'm a little out of my depth at the sockets level.)

Bridged casting is needed for Core Foundation code, as in:

CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, (__bridge CFStringRef)(myServerName), 49494, &readStream, &writeStream);
inputStream = (__bridge NSInputStream *) readStream;
outputStream = (__bridge NSOutputStream *) writeStream;

To be honest, I had never heard of bridged casting until I had to get this code to compile and had to learn enough to get it going. It's related to memory management and I had to make a guess that this was the correct variant. I did manage to get enough code going to allow a connection to PS to happen and to successfully transmit some simple commands, by removing release/retain and using this bridged casting mode when needed, but it's probably a fairly small subset of the overall kit's potential functionality. Maybe it'll be enough for what I need right at the moment, but I guess we'll have to see how it works going forward.

Here's a stackoverflow thread with a bridged casting issue:

http://stackoverflow.com/questions/6725558/cast-of-objective-c-pointer-type-nsstring-to-c-pointer-ty...

To be clearer, the problematic issues are related to ARC and probably not iOS5 specifically. But trying to integrate the whole networking library (as the documentation for the kit instructs) into an existing project that had ARC on was a real nightmare. I even tried disabling ARC on the networking library files individually with the -fno-obj-arc, but that didn't solve the problem, some ARC issues persisted and I didn't know how to solve them. 😕

(As an aside, can you feed the Forum Gods and undo my idiotic "msubzbbvsj" screen name? Either clear it, or set it to "slinberg" or "Steve Linberg" or something sensible like that? I didn't realize I was creating anything when I accidentally typed that, and it looks like I can't change it myself.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 27, 2012 Feb 27, 2012

Copy link to clipboard

Copied

Let me look into all that..thanks for the details.

In the meantime you should be able to fix your name. Here is some information:

That comes from their Adobe ID account. They should be able to change it themselves at Adobe.com (instructions below), or call Customer Service to have them change it. The forums pick up the name from Adobe when the user signs in.

To change your screen name/nickname

Go to http://www.adobe.com

If you are not signed in there, use the Sign In link in the upper right corner (beneath the search box) Once signed in with your Adobe ID, you should be taken to a "My Adobe" page There, click on My Information Look for the My Personal Profile section of that page Look for the Screen Name field in the My Personal Profile section Change the screen name to something new Scroll down and look for the Save My Changes button on the right side of the page (it won't appear until you make a change in the screen name).

Click on the save my changes button

The next time you sign into http://forums.adobe.com it should read that change to your account and show the new name in the Forums

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2012 Feb 27, 2012

Copy link to clipboard

Copied

LATEST

Ahhh, there we go. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines