Deployment issue to iOS App Store

Hi. I just made an update to my iOS app and when going to build for the App Store, I’m getting the following error:
Compilation of “DTR Practice Exam To Go” failed
Failed to link files

I went back to the docs to see if there are special things needed to be done when submitting an update (http://developer.xojo.com/submitting-to-the-app-store). I see there is a mention to a few things that seem to be missing in the Build settings under Build Xojo App:

  • In Xojo, set “Build for App Store” property to ON in the iOS Build Settings. Note: This setting is always set to False when the project is opened.
  • Select the appropriate Code Signing team and optionally specify any entitlements (as a plist file).
  • Verify that the bundle ID matches your wildcard app ID.

Has anything changed with submitting apps to more recent versions of Xojo? I just updated to Release 2.2

I’d check any declares you might have to be sure they’re correct.

Thanks Travis. When I first compiled, I got an error at these two sections in a Wrapper module. Saying expected Uint32 but got Ptr. I just commented these out since I didn’t see them being used anywhere. I don’t know much at all when it comes to declares. Do you know what needs to be changed here?

ClearFocus

[code] declare sub resignFirstResponder lib “Foundation.Framework” selector “resignFirstResponder” (obj_id as Uint32)

resignFirstResponder(UInt32(c.handle))[/code]

SetFocus

[code] declare sub becomeFirstResponder lib “Foundation.Framework” selector “becomeFirstResponder” (obj_id as Uint32)

becomeFirstResponder(UInt32(c.handle))[/code]

Ryan, open up the Console application and look for any messages put there by Xojo during the compile. They will describe why it failed to link. If you post the message here someone can help you track down the problem.

[quote=191693:@Ryan Hartz]Thanks Travis. When I first compiled, I got an error at these two sections in a Wrapper module. Saying expected Uint32 but got Ptr. I just commented these out since I didn’t see them being used anywhere. I don’t know much at all when it comes to declares. Do you know what needs to be changed here?

ClearFocus

[code] declare sub resignFirstResponder lib “Foundation.Framework” selector “resignFirstResponder” (obj_id as Uint32)

resignFirstResponder(UInt32(c.handle))[/code]

SetFocus

[code] declare sub becomeFirstResponder lib “Foundation.Framework” selector “becomeFirstResponder” (obj_id as Uint32)

becomeFirstResponder(UInt32(c.handle))[/code][/quote]

If you are using XojoiOSWrapper this is outdated code. You should simply download the latest version which has been updated. iOS now requires handles to be pointers, as in

declare sub resignFirstResponder lib "Foundation.Framework" selector "resignFirstResponder" (obj_id as Ptr) resignFirstResponder(c.handle)

See https://github.com/Mitchboo/XojoiOSWrapper

Thanks guys. I deleted my Wrapper module in the project, downloaded the new one, added it to the project, and still getting the linking error.

Here is the info from the Console. Not sure if this is what you wanted to see but only thing I could find from Xojo
6/3/15 1:36:49.734 PM Xojo[424]: ld: framework not found Cocoa

Ok so the problem is that one of your declares is into the Cocoa framework which is not available in iOS. To fix this search your project for “Cocoa” and then post those declares here so that we can tell you what lib they need to be changed to.

Edit: And yes that is exactly what I was talking about.

Thank you Jason.

Here are two instances of Cocoa in MainScreenScale

[code] declare function NSClassFromString lib “Foundation” (aClassName as CFStringRef) as Ptr
soft declare function scale lib “Cocoa” selector “scale” (classRef as Ptr) as single
soft declare function mainScreen lib “Cocoa” selector “mainScreen” (classRef as Ptr) as ptr

return scale(mainScreen(NSClassFromString(“UIScreen”)))[/code]

If you change those libs to “UIKit” it should fix the problem and compile.

I have corrected and updated XojoiOSWrapper. Thank you Jason.

Thanks Jason. That seemed to get past the errors I was getting before. Now it’s saying I need a development profile in order to build an iOS app. I had gone through this in Apple Dev site with my first version. Do I need to go through this all again?

So I have two apps that are basically the same, just different content. The one complied just fine and created the IPA file, but with the other one, I am still getting the message
A development profile is required when building an iOS application

These were first created both together and both have the same updates to push through. Why is this message coming up? On a previous version of Xojo, there were more options in Build settings to enter in your Dev profile and bundle ID, which is referred to in the docs. I just compared the setting in the one that compiled and the one that didn’t and they’re both identical. Is there a setting somewhere I need to assign in this app in Xojo or Xcode? Xcode is showing both signing identities and provisioning profiles as valid until next year

I take it back lol… Thinking I would go ahead and submit the one to the app store, it appears the IPA file present was the initial one in January. The ones it created just earlier were the program and the dSYM files