9

I have updated a currently submitted Titanium app and added a watch extension using swift.

Everything works fine if I build and test on sim and build directly to device. I only get an issue when I submit the app to the Apple app store (via XCode Organizer).

The binary submits, passing validation but I get am email from iTunes Connect as follows:

Dear developer,

We have discovered one or more issues with your recent delivery for "xxxxxxxxxxx". To process your delivery, the following issues must be corrected:

Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.

Once these issues have been corrected, you can then redeliver the corrected binary.

It seems as though it may be related to a build setting: Embedded Content Contains Swift Code.

It looks like this needs to be set to Yes if the Titanium project contains embedded Swift.

As of now I am stuck as I cannot submit the app. Is this a Ti problem or is there another step I should follow?

XCode: 7.3, SDK: 5.2.2.GA - Project created and built using only the Ti CLI.

Steve
  • 557
  • 5
  • 17
  • Are you using the Xcode 7.3 GA version from the AppStore (no beta)? Also make sure your appc-cli ist up2date by running `appc setup`. If it still persists, compare your watchos-template with the latest recommended [here](https://jira.appcelerator.org/browse/TIMOB-19455). – Hans Knöchel Apr 25 '16 at 15:38
  • Yes as specified above, 7.3 release version from the App Store. Watch template generated with the CLI option using the watch-os2 swift option so template auto generated by CLI – Steve Apr 25 '16 at 18:40
  • Has anyone used Swift for a watch app in a Ti project and actually managed to successfully upload the binary to the app store and had it accepted? – Steve Apr 27 '16 at 05:24
  • Appcelerator support suggested setting the **Embedded Content Contains Swift Code** setting to **Yes** in the Ti SDK folder, which I did and tried a re-build. But I still have the same issue, – Steve May 01 '16 at 13:38
  • Thanks Steve, I've reported this under https://jira.appcelerator.org/browse/TIMOB-23313. Could you try setting the *Embedded Content Contains Swift Code* to *Yes* in the extension Xcode project for both targets? So not the Titanium generated project, but that of the extension. Let's discuss further on JIRA. – Fokke Zandbergen May 04 '16 at 11:44
  • @user805981 There is supposed to be a fix in 6.0.1.GA of the SDK release, but I have not had time to try this yet. See https://jira.appcelerator.org/browse/TIMOB-23313 for more details. – Steve Dec 31 '16 at 13:23

4 Answers4

4

First you should check your .ipa file by

unzip yourapp.ipa

If the only Payload exists, the Apple reject your app.

You should create SwiftSupport/iphoneos directory and put the appropriate swift library files.

You can know which libraries are necessary by checking Payload/yourapp.app/Framesworks. But this library files can not be used as SwiftSupport/iphoneos.

You must copy the appropriate libraries from your mac's /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos directory. The file names are same as the above Payload/yourapp.app/Frameworks but the contents are different.

After you get the Payload and SwiftSupport directory, do package these directories by

$ zip -r yournewapp.ipa Payload SwiftSupport

(Remark: remove all .DS_Store files if exist)

Then Apple accespt yournewapp.ipa.

KNaito
  • 3,930
  • 2
  • 19
  • 21
1

For future reference: I had to Archive the Titanium project through Xcode because one of my third-party libraries requested to execute a script in the Build phases.

Received the same message from Apple and fortunately fixed it just changing the Embedded Content Contains Swift Code to No.

Alberto M
  • 1,608
  • 1
  • 18
  • 42
1

You should choose "Save for iOS App Store Deployment" option at the time of exporting ipa file.enter image description here

Pranit
  • 892
  • 12
  • 20
0

This issue has now be resolved, there is a new version of the Titanium SDK, 6.0.1.GA that specifically has a fix in for this issue. I have now created, submitted and have a Titanium app with associated watch app now published in the app store.

Steve
  • 557
  • 5
  • 17